diff --git a/Changelog.md b/Changelog.md index 32afaff1d..f8a71d977 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - ReleaseDate +### Added + +- Update Vulkan-Headers to 1.3.244 (#697) + ## [0.37.2] - 2022-01-11 ### Added diff --git a/ash/Cargo.toml b/ash/Cargo.toml index 1db730a23..02aa73cb8 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.37.2+1.3.238" +version = "0.37.2+1.3.244" authors = [ "Maik Klein ", "Benjamin Saunders ", diff --git a/ash/src/vk/bitflags.rs b/ash/src/vk/bitflags.rs index 66699d721..2f48e7dea 100644 --- a/ash/src/vk/bitflags.rs +++ b/ash/src/vk/bitflags.rs @@ -1280,13 +1280,23 @@ impl VideoEncodeCapabilityFlagsKHR { } #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEncodeFeedbackFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEncodeFeedbackFlagsKHR, Flags); +impl VideoEncodeFeedbackFlagsKHR { + pub const BITSTREAM_BUFFER_OFFSET: Self = Self(0b1); + pub const BITSTREAM_BYTES_WRITTEN: Self = Self(0b10); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] #[doc = ""] pub struct VideoEncodeRateControlModeFlagsKHR(pub(crate) Flags); vk_bitflags_wrapped!(VideoEncodeRateControlModeFlagsKHR, Flags); impl VideoEncodeRateControlModeFlagsKHR { - pub const NONE: Self = Self(0); - pub const CBR: Self = Self(1); - pub const VBR: Self = Self(2); + pub const DEFAULT: Self = Self(0); + pub const DISABLED: Self = Self(0b1); + pub const CBR: Self = Self(0b10); + pub const VBR: Self = Self(0b100); } #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -1319,26 +1329,7 @@ impl VideoEncodeH264CapabilityFlagsEXT { pub const ROW_UNALIGNED_SLICE: Self = Self(0b100_0000_0000_0000_0000_0000); pub const DIFFERENT_SLICE_TYPE: Self = Self(0b1000_0000_0000_0000_0000_0000); pub const B_FRAME_IN_L1_LIST: Self = Self(0b1_0000_0000_0000_0000_0000_0000); -} -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] -#[doc = ""] -pub struct VideoEncodeH264InputModeFlagsEXT(pub(crate) Flags); -vk_bitflags_wrapped!(VideoEncodeH264InputModeFlagsEXT, Flags); -impl VideoEncodeH264InputModeFlagsEXT { - pub const FRAME: Self = Self(0b1); - pub const SLICE: Self = Self(0b10); - pub const NON_VCL: Self = Self(0b100); -} -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] -#[doc = ""] -pub struct VideoEncodeH264OutputModeFlagsEXT(pub(crate) Flags); -vk_bitflags_wrapped!(VideoEncodeH264OutputModeFlagsEXT, Flags); -impl VideoEncodeH264OutputModeFlagsEXT { - pub const FRAME: Self = Self(0b1); - pub const SLICE: Self = Self(0b10); - pub const NON_VCL: Self = Self(0b100); + pub const DIFFERENT_REFERENCE_FINAL_LISTS: Self = Self(0b10_0000_0000_0000_0000_0000_0000); } #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -1474,26 +1465,7 @@ impl VideoEncodeH265CapabilityFlagsEXT { pub const DEPENDENT_SLICE_SEGMENT: Self = Self(0b1000_0000_0000_0000_0000_0000); pub const DIFFERENT_SLICE_TYPE: Self = Self(0b1_0000_0000_0000_0000_0000_0000); pub const B_FRAME_IN_L1_LIST: Self = Self(0b10_0000_0000_0000_0000_0000_0000); -} -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] -#[doc = ""] -pub struct VideoEncodeH265InputModeFlagsEXT(pub(crate) Flags); -vk_bitflags_wrapped!(VideoEncodeH265InputModeFlagsEXT, Flags); -impl VideoEncodeH265InputModeFlagsEXT { - pub const FRAME: Self = Self(0b1); - pub const SLICE_SEGMENT: Self = Self(0b10); - pub const NON_VCL: Self = Self(0b100); -} -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] -#[doc = ""] -pub struct VideoEncodeH265OutputModeFlagsEXT(pub(crate) Flags); -vk_bitflags_wrapped!(VideoEncodeH265OutputModeFlagsEXT, Flags); -impl VideoEncodeH265OutputModeFlagsEXT { - pub const FRAME: Self = Self(0b1); - pub const SLICE_SEGMENT: Self = Self(0b10); - pub const NON_VCL: Self = Self(0b100); + pub const DIFFERENT_REFERENCE_FINAL_LISTS: Self = Self(0b100_0000_0000_0000_0000_0000_0000); } #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/ash/src/vk/const_debugs.rs b/ash/src/vk/const_debugs.rs index 6508306e3..37c8baf63 100644 --- a/ash/src/vk/const_debugs.rs +++ b/ash/src/vk/const_debugs.rs @@ -1204,6 +1204,10 @@ impl fmt::Debug for DescriptorSetLayoutCreateFlags { DescriptorSetLayoutCreateFlags::HOST_ONLY_POOL_EXT.0, "HOST_ONLY_POOL_EXT", ), + ( + DescriptorSetLayoutCreateFlags::RESERVED_6_EXT.0, + "RESERVED_6_EXT", + ), ( DescriptorSetLayoutCreateFlags::UPDATE_AFTER_BIND_POOL.0, "UPDATE_AFTER_BIND_POOL", @@ -1525,6 +1529,7 @@ impl fmt::Debug for DriverId { Self::MESA_VENUS => Some("MESA_VENUS"), Self::MESA_DOZEN => Some("MESA_DOZEN"), Self::MESA_NVK => Some("MESA_NVK"), + Self::IMAGINATION_OPEN_SOURCE_MESA => Some("IMAGINATION_OPEN_SOURCE_MESA"), _ => None, }; if let Some(x) = name { @@ -1548,12 +1553,15 @@ impl fmt::Debug for DynamicState { Self::STENCIL_REFERENCE => Some("STENCIL_REFERENCE"), Self::VIEWPORT_W_SCALING_NV => Some("VIEWPORT_W_SCALING_NV"), Self::DISCARD_RECTANGLE_EXT => Some("DISCARD_RECTANGLE_EXT"), + Self::DISCARD_RECTANGLE_ENABLE_EXT => Some("DISCARD_RECTANGLE_ENABLE_EXT"), + Self::DISCARD_RECTANGLE_MODE_EXT => Some("DISCARD_RECTANGLE_MODE_EXT"), Self::SAMPLE_LOCATIONS_EXT => Some("SAMPLE_LOCATIONS_EXT"), Self::RAY_TRACING_PIPELINE_STACK_SIZE_KHR => { Some("RAY_TRACING_PIPELINE_STACK_SIZE_KHR") } Self::VIEWPORT_SHADING_RATE_PALETTE_NV => Some("VIEWPORT_SHADING_RATE_PALETTE_NV"), Self::VIEWPORT_COARSE_SAMPLE_ORDER_NV => Some("VIEWPORT_COARSE_SAMPLE_ORDER_NV"), + Self::EXCLUSIVE_SCISSOR_ENABLE_NV => Some("EXCLUSIVE_SCISSOR_ENABLE_NV"), Self::EXCLUSIVE_SCISSOR_NV => Some("EXCLUSIVE_SCISSOR_NV"), Self::FRAGMENT_SHADING_RATE_KHR => Some("FRAGMENT_SHADING_RATE_KHR"), Self::LINE_STIPPLE_EXT => Some("LINE_STIPPLE_EXT"), @@ -1680,14 +1688,6 @@ impl fmt::Debug for ExternalFenceHandleTypeFlags { "OPAQUE_WIN32_KMT", ), (ExternalFenceHandleTypeFlags::SYNC_FD.0, "SYNC_FD"), - ( - ExternalFenceHandleTypeFlags::RESERVED_4_NV.0, - "RESERVED_4_NV", - ), - ( - ExternalFenceHandleTypeFlags::RESERVED_5_NV.0, - "RESERVED_5_NV", - ), ]; debug_flags(f, KNOWN, self.0) } @@ -1764,10 +1764,6 @@ impl fmt::Debug for ExternalMemoryHandleTypeFlags { ExternalMemoryHandleTypeFlags::RDMA_ADDRESS_NV.0, "RDMA_ADDRESS_NV", ), - ( - ExternalMemoryHandleTypeFlags::RESERVED_13_NV.0, - "RESERVED_13_NV", - ), ]; debug_flags(f, KNOWN, self.0) } @@ -1825,10 +1821,6 @@ impl fmt::Debug for ExternalSemaphoreHandleTypeFlags { ExternalSemaphoreHandleTypeFlags::ZIRCON_EVENT_FUCHSIA.0, "ZIRCON_EVENT_FUCHSIA", ), - ( - ExternalSemaphoreHandleTypeFlags::RESERVED_5_NV.0, - "RESERVED_5_NV", - ), ]; debug_flags(f, KNOWN, self.0) } @@ -2740,7 +2732,6 @@ impl fmt::Debug for ImageViewCreateFlags { ImageViewCreateFlags::FRAGMENT_DENSITY_MAP_DEFERRED_EXT.0, "FRAGMENT_DENSITY_MAP_DEFERRED_EXT", ), - (ImageViewCreateFlags::RESERVED_3_EXT.0, "RESERVED_3_EXT"), ]; debug_flags(f, KNOWN, self.0) } @@ -2925,7 +2916,6 @@ impl fmt::Debug for MemoryHeapFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ (MemoryHeapFlags::DEVICE_LOCAL.0, "DEVICE_LOCAL"), - (MemoryHeapFlags::RESERVED_2_KHR.0, "RESERVED_2_KHR"), (MemoryHeapFlags::MULTI_INSTANCE.0, "MULTI_INSTANCE"), ]; debug_flags(f, KNOWN, self.0) @@ -2974,6 +2964,12 @@ impl fmt::Debug for MemoryPropertyFlags { debug_flags(f, KNOWN, self.0) } } +impl fmt::Debug for MemoryUnmapFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[]; + debug_flags(f, KNOWN, self.0) + } +} impl fmt::Debug for MetalSurfaceCreateFlagsEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[]; @@ -3307,14 +3303,10 @@ impl fmt::Debug for PipelineBindPoint { } impl fmt::Debug for PipelineCacheCreateFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (PipelineCacheCreateFlags::RESERVED_1_EXT.0, "RESERVED_1_EXT"), - (PipelineCacheCreateFlags::RESERVED_2_KHR.0, "RESERVED_2_KHR"), - ( - PipelineCacheCreateFlags::EXTERNALLY_SYNCHRONIZED.0, - "EXTERNALLY_SYNCHRONIZED", - ), - ]; + const KNOWN: &[(Flags, &str)] = &[( + PipelineCacheCreateFlags::EXTERNALLY_SYNCHRONIZED.0, + "EXTERNALLY_SYNCHRONIZED", + )]; debug_flags(f, KNOWN, self.0) } } @@ -3800,8 +3792,8 @@ impl fmt::Debug for PipelineStageFlags2 { "MICROMAP_BUILD_EXT", ), ( - PipelineStageFlags2::RESEVED_41_HUAWEI.0, - "RESEVED_41_HUAWEI", + PipelineStageFlags2::CLUSTER_CULLING_SHADER_HUAWEI.0, + "CLUSTER_CULLING_SHADER_HUAWEI", ), (PipelineStageFlags2::OPTICAL_FLOW_NV.0, "OPTICAL_FLOW_NV"), ]; @@ -3928,7 +3920,8 @@ impl fmt::Debug for PrimitiveTopology { } impl fmt::Debug for PrivateDataSlotCreateFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[]; + const KNOWN: &[(Flags, &str)] = + &[(PrivateDataSlotCreateFlags::RESERVED_0_NV.0, "RESERVED_0_NV")]; debug_flags(f, KNOWN, self.0) } } @@ -4007,6 +4000,10 @@ impl fmt::Debug for QueryPipelineStatisticFlags { QueryPipelineStatisticFlags::MESH_SHADER_INVOCATIONS_EXT.0, "MESH_SHADER_INVOCATIONS_EXT", ), + ( + QueryPipelineStatisticFlags::CLUSTER_CULLING_SHADER_INVOCATIONS_HUAWEI.0, + "CLUSTER_CULLING_SHADER_INVOCATIONS_HUAWEI", + ), ]; debug_flags(f, KNOWN, self.0) } @@ -4076,9 +4073,7 @@ impl fmt::Debug for QueryType { Some("ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV") } Self::PERFORMANCE_QUERY_INTEL => Some("PERFORMANCE_QUERY_INTEL"), - Self::VIDEO_ENCODESTREAM_BUFFER_RANGE_KHR => { - Some("VIDEO_ENCODESTREAM_BUFFER_RANGE_KHR") - } + Self::VIDEO_ENCODE_FEEDBACK_KHR => Some("VIDEO_ENCODE_FEEDBACK_KHR"), Self::MESH_PRIMITIVES_GENERATED_EXT => Some("MESH_PRIMITIVES_GENERATED_EXT"), Self::PRIMITIVES_GENERATED_EXT => Some("PRIMITIVES_GENERATED_EXT"), Self::ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR => { @@ -4466,7 +4461,10 @@ impl fmt::Debug for ShaderStageFlags { ShaderStageFlags::SUBPASS_SHADING_HUAWEI.0, "SUBPASS_SHADING_HUAWEI", ), - (ShaderStageFlags::RESERVED_19_HUAWEI.0, "RESERVED_19_HUAWEI"), + ( + ShaderStageFlags::CLUSTER_CULLING_HUAWEI.0, + "CLUSTER_CULLING_HUAWEI", + ), (ShaderStageFlags::EXT_483_RESERVE_15.0, "EXT_483_RESERVE_15"), (ShaderStageFlags::EXT_483_RESERVE_16.0, "EXT_483_RESERVE_16"), (ShaderStageFlags::EXT_483_RESERVE_17.0, "EXT_483_RESERVE_17"), @@ -4745,9 +4743,6 @@ impl fmt::Debug for StructureType { Self::VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT => { Some("VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT") } - Self::VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT => { - Some("VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT") - } Self::VIDEO_ENCODE_H264_PROFILE_INFO_EXT => Some("VIDEO_ENCODE_H264_PROFILE_INFO_EXT"), Self::VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT => { Some("VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT") @@ -4755,9 +4750,6 @@ impl fmt::Debug for StructureType { Self::VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT => { Some("VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT") } - Self::VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT => { - Some("VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT") - } Self::VIDEO_ENCODE_H265_CAPABILITIES_EXT => Some("VIDEO_ENCODE_H265_CAPABILITIES_EXT"), Self::VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT => { Some("VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT") @@ -4774,13 +4766,7 @@ impl fmt::Debug for StructureType { Self::VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT => { Some("VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT") } - Self::VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT => { - Some("VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT") - } Self::VIDEO_ENCODE_H265_PROFILE_INFO_EXT => Some("VIDEO_ENCODE_H265_PROFILE_INFO_EXT"), - Self::VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT => { - Some("VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT") - } Self::VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT => { Some("VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT") } @@ -5374,6 +5360,8 @@ impl fmt::Debug for StructureType { Self::PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR => { Some("PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR") } + Self::MEMORY_MAP_INFO_KHR => Some("MEMORY_MAP_INFO_KHR"), + Self::MEMORY_UNMAP_INFO_KHR => Some("MEMORY_UNMAP_INFO_KHR"), Self::PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT => { Some("PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT") } @@ -5476,6 +5464,9 @@ impl fmt::Debug for StructureType { } Self::VIDEO_ENCODE_CAPABILITIES_KHR => Some("VIDEO_ENCODE_CAPABILITIES_KHR"), Self::VIDEO_ENCODE_USAGE_INFO_KHR => Some("VIDEO_ENCODE_USAGE_INFO_KHR"), + Self::QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR => { + Some("QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR") + } Self::PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV => { Some("PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV") } @@ -5483,6 +5474,7 @@ impl fmt::Debug for StructureType { Some("DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV") } Self::RESERVED_QCOM => Some("RESERVED_QCOM"), + Self::QUERY_LOW_LATENCY_SUPPORT_NV => Some("QUERY_LOW_LATENCY_SUPPORT_NV"), Self::EXPORT_METAL_OBJECT_CREATE_INFO_EXT => { Some("EXPORT_METAL_OBJECT_CREATE_INFO_EXT") } @@ -5752,6 +5744,12 @@ impl fmt::Debug for StructureType { Self::ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT => { Some("ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT") } + Self::PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI => { + Some("PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI") + } + Self::PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI => { + Some("PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI") + } Self::PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT => { Some("PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT") } @@ -5761,6 +5759,13 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT => { Some("PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT") } + Self::PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM => { + Some("PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM") + } + Self::PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT") + } + Self::IMAGE_VIEW_SLICED_CREATE_INFO_EXT => Some("IMAGE_VIEW_SLICED_CREATE_INFO_EXT"), Self::PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE => { Some("PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE") } @@ -5895,6 +5900,15 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM => { Some("PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM") } + Self::PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT") + } + Self::PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM => { + Some("PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM") + } + Self::MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM => { + Some("MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM") + } Self::PHYSICAL_DEVICE_SUBGROUP_PROPERTIES => { Some("PHYSICAL_DEVICE_SUBGROUP_PROPERTIES") } @@ -6550,6 +6564,7 @@ impl fmt::Debug for VendorId { Self::CODEPLAY => Some("CODEPLAY"), Self::MESA => Some("MESA"), Self::POCL => Some("POCL"), + Self::MOBILEYE => Some("MOBILEYE"), _ => None, }; if let Some(x) = name { @@ -6728,6 +6743,21 @@ impl fmt::Debug for VideoEncodeContentFlagsKHR { debug_flags(f, KNOWN, self.0) } } +impl fmt::Debug for VideoEncodeFeedbackFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + VideoEncodeFeedbackFlagsKHR::BITSTREAM_BUFFER_OFFSET.0, + "BITSTREAM_BUFFER_OFFSET", + ), + ( + VideoEncodeFeedbackFlagsKHR::BITSTREAM_BYTES_WRITTEN.0, + "BITSTREAM_BYTES_WRITTEN", + ), + ]; + debug_flags(f, KNOWN, self.0) + } +} impl fmt::Debug for VideoEncodeFlagsKHR { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[]; @@ -6831,26 +6861,10 @@ impl fmt::Debug for VideoEncodeH264CapabilityFlagsEXT { VideoEncodeH264CapabilityFlagsEXT::B_FRAME_IN_L1_LIST.0, "B_FRAME_IN_L1_LIST", ), - ]; - debug_flags(f, KNOWN, self.0) - } -} -impl fmt::Debug for VideoEncodeH264InputModeFlagsEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (VideoEncodeH264InputModeFlagsEXT::FRAME.0, "FRAME"), - (VideoEncodeH264InputModeFlagsEXT::SLICE.0, "SLICE"), - (VideoEncodeH264InputModeFlagsEXT::NON_VCL.0, "NON_VCL"), - ]; - debug_flags(f, KNOWN, self.0) - } -} -impl fmt::Debug for VideoEncodeH264OutputModeFlagsEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (VideoEncodeH264OutputModeFlagsEXT::FRAME.0, "FRAME"), - (VideoEncodeH264OutputModeFlagsEXT::SLICE.0, "SLICE"), - (VideoEncodeH264OutputModeFlagsEXT::NON_VCL.0, "NON_VCL"), + ( + VideoEncodeH264CapabilityFlagsEXT::DIFFERENT_REFERENCE_FINAL_LISTS.0, + "DIFFERENT_REFERENCE_FINAL_LISTS", + ), ]; debug_flags(f, KNOWN, self.0) } @@ -6977,6 +6991,10 @@ impl fmt::Debug for VideoEncodeH265CapabilityFlagsEXT { VideoEncodeH265CapabilityFlagsEXT::B_FRAME_IN_L1_LIST.0, "B_FRAME_IN_L1_LIST", ), + ( + VideoEncodeH265CapabilityFlagsEXT::DIFFERENT_REFERENCE_FINAL_LISTS.0, + "DIFFERENT_REFERENCE_FINAL_LISTS", + ), ]; debug_flags(f, KNOWN, self.0) } @@ -6991,32 +7009,6 @@ impl fmt::Debug for VideoEncodeH265CtbSizeFlagsEXT { debug_flags(f, KNOWN, self.0) } } -impl fmt::Debug for VideoEncodeH265InputModeFlagsEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (VideoEncodeH265InputModeFlagsEXT::FRAME.0, "FRAME"), - ( - VideoEncodeH265InputModeFlagsEXT::SLICE_SEGMENT.0, - "SLICE_SEGMENT", - ), - (VideoEncodeH265InputModeFlagsEXT::NON_VCL.0, "NON_VCL"), - ]; - debug_flags(f, KNOWN, self.0) - } -} -impl fmt::Debug for VideoEncodeH265OutputModeFlagsEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (VideoEncodeH265OutputModeFlagsEXT::FRAME.0, "FRAME"), - ( - VideoEncodeH265OutputModeFlagsEXT::SLICE_SEGMENT.0, - "SLICE_SEGMENT", - ), - (VideoEncodeH265OutputModeFlagsEXT::NON_VCL.0, "NON_VCL"), - ]; - debug_flags(f, KNOWN, self.0) - } -} impl fmt::Debug for VideoEncodeH265RateControlStructureEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -7064,7 +7056,8 @@ impl fmt::Debug for VideoEncodeRateControlFlagsKHR { impl fmt::Debug for VideoEncodeRateControlModeFlagsKHR { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ - (VideoEncodeRateControlModeFlagsKHR::NONE.0, "NONE"), + (VideoEncodeRateControlModeFlagsKHR::DEFAULT.0, "DEFAULT"), + (VideoEncodeRateControlModeFlagsKHR::DISABLED.0, "DISABLED"), (VideoEncodeRateControlModeFlagsKHR::CBR.0, "CBR"), (VideoEncodeRateControlModeFlagsKHR::VBR.0, "VBR"), ]; diff --git a/ash/src/vk/constants.rs b/ash/src/vk/constants.rs index 78da55ec7..384e28a20 100644 --- a/ash/src/vk/constants.rs +++ b/ash/src/vk/constants.rs @@ -10,6 +10,7 @@ pub const MAX_MEMORY_HEAPS: usize = 16; pub const LOD_CLAMP_NONE: f32 = 1000.00; pub const REMAINING_MIP_LEVELS: u32 = !0; pub const REMAINING_ARRAY_LAYERS: u32 = !0; +pub const REMAINING_3D_SLICES_EXT: u32 = !0; pub const WHOLE_SIZE: u64 = !0; pub const ATTACHMENT_UNUSED: u32 = !0; pub const TRUE: Bool32 = 1; diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index 72a61fcab..52a4f2b30 100644 --- a/ash/src/vk/definitions.rs +++ b/ash/src/vk/definitions.rs @@ -57,7 +57,7 @@ pub const API_VERSION_1_2: u32 = make_api_version(0, 1, 2, 0); #[doc = ""] pub const API_VERSION_1_3: u32 = make_api_version(0, 1, 3, 0); #[doc = ""] -pub const HEADER_VERSION: u32 = 238; +pub const HEADER_VERSION: u32 = 244; #[doc = ""] pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 3, HEADER_VERSION); #[doc = ""] @@ -327,6 +327,11 @@ vk_bitflags_wrapped!(VideoEncodeFlagsKHR, Flags); #[doc = ""] pub struct VideoEncodeRateControlFlagsKHR(pub(crate) Flags); vk_bitflags_wrapped!(VideoEncodeRateControlFlagsKHR, Flags); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct MemoryUnmapFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(MemoryUnmapFlagsKHR, Flags); define_handle!( Instance, INSTANCE, @@ -1601,7 +1606,9 @@ pub struct DeviceCreateInfo { pub flags: DeviceCreateFlags, pub queue_create_info_count: u32, pub p_queue_create_infos: *const DeviceQueueCreateInfo, + #[deprecated = "functionality described by this member no longer operates"] pub enabled_layer_count: u32, + #[deprecated = "functionality described by this member no longer operates"] pub pp_enabled_layer_names: *const *const c_char, pub enabled_extension_count: u32, pub pp_enabled_extension_names: *const *const c_char, @@ -1610,6 +1617,7 @@ pub struct DeviceCreateInfo { impl ::std::default::Default for DeviceCreateInfo { #[inline] fn default() -> Self { + #[allow(deprecated)] Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), @@ -1665,6 +1673,8 @@ impl<'a> DeviceCreateInfoBuilder<'a> { self } #[inline] + #[deprecated = "functionality described by this member no longer operates"] + #[allow(deprecated)] pub fn enabled_layer_names(mut self, enabled_layer_names: &'a [*const c_char]) -> Self { self.inner.enabled_layer_count = enabled_layer_names.len() as _; self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr(); @@ -23885,6 +23895,74 @@ impl<'a> ImageViewUsageCreateInfoBuilder<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct ImageViewSlicedCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub slice_offset: u32, + pub slice_count: u32, +} +impl ::std::default::Default for ImageViewSlicedCreateInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + slice_offset: u32::default(), + slice_count: u32::default(), + } + } +} +unsafe impl TaggedStructure for ImageViewSlicedCreateInfoEXT { + const STRUCTURE_TYPE: StructureType = StructureType::IMAGE_VIEW_SLICED_CREATE_INFO_EXT; +} +impl ImageViewSlicedCreateInfoEXT { + pub fn builder<'a>() -> ImageViewSlicedCreateInfoEXTBuilder<'a> { + ImageViewSlicedCreateInfoEXTBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct ImageViewSlicedCreateInfoEXTBuilder<'a> { + inner: ImageViewSlicedCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsImageViewCreateInfo for ImageViewSlicedCreateInfoEXTBuilder<'_> {} +unsafe impl ExtendsImageViewCreateInfo for ImageViewSlicedCreateInfoEXT {} +impl<'a> ::std::ops::Deref for ImageViewSlicedCreateInfoEXTBuilder<'a> { + type Target = ImageViewSlicedCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for ImageViewSlicedCreateInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> ImageViewSlicedCreateInfoEXTBuilder<'a> { + #[inline] + pub fn slice_offset(mut self, slice_offset: u32) -> Self { + self.inner.slice_offset = slice_offset; + self + } + #[inline] + pub fn slice_count(mut self, slice_count: u32) -> Self { + self.inner.slice_count = slice_count; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> ImageViewSlicedCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PipelineTessellationDomainOriginStateCreateInfo { pub s_type: StructureType, @@ -44599,6 +44677,98 @@ impl<'a> PhysicalDeviceSubpassShadingPropertiesHUAWEIBuilder<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceClusterCullingShaderPropertiesHUAWEI { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_work_group_count: [u32; 3], + pub max_work_group_size: [u32; 3], + pub max_output_cluster_count: u32, + pub indirect_buffer_offset_alignment: DeviceSize, +} +impl ::std::default::Default for PhysicalDeviceClusterCullingShaderPropertiesHUAWEI { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + max_work_group_count: unsafe { ::std::mem::zeroed() }, + max_work_group_size: unsafe { ::std::mem::zeroed() }, + max_output_cluster_count: u32::default(), + indirect_buffer_offset_alignment: DeviceSize::default(), + } + } +} +unsafe impl TaggedStructure for PhysicalDeviceClusterCullingShaderPropertiesHUAWEI { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI; +} +impl PhysicalDeviceClusterCullingShaderPropertiesHUAWEI { + pub fn builder<'a>() -> PhysicalDeviceClusterCullingShaderPropertiesHUAWEIBuilder<'a> { + PhysicalDeviceClusterCullingShaderPropertiesHUAWEIBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceClusterCullingShaderPropertiesHUAWEIBuilder<'a> { + inner: PhysicalDeviceClusterCullingShaderPropertiesHUAWEI, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceProperties2 + for PhysicalDeviceClusterCullingShaderPropertiesHUAWEIBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceProperties2 + for PhysicalDeviceClusterCullingShaderPropertiesHUAWEI +{ +} +impl<'a> ::std::ops::Deref for PhysicalDeviceClusterCullingShaderPropertiesHUAWEIBuilder<'a> { + type Target = PhysicalDeviceClusterCullingShaderPropertiesHUAWEI; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceClusterCullingShaderPropertiesHUAWEIBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceClusterCullingShaderPropertiesHUAWEIBuilder<'a> { + #[inline] + pub fn max_work_group_count(mut self, max_work_group_count: [u32; 3]) -> Self { + self.inner.max_work_group_count = max_work_group_count; + self + } + #[inline] + pub fn max_work_group_size(mut self, max_work_group_size: [u32; 3]) -> Self { + self.inner.max_work_group_size = max_work_group_size; + self + } + #[inline] + pub fn max_output_cluster_count(mut self, max_output_cluster_count: u32) -> Self { + self.inner.max_output_cluster_count = max_output_cluster_count; + self + } + #[inline] + pub fn indirect_buffer_offset_alignment( + mut self, + indirect_buffer_offset_alignment: DeviceSize, + ) -> Self { + self.inner.indirect_buffer_offset_alignment = indirect_buffer_offset_alignment; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceClusterCullingShaderPropertiesHUAWEI { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct MemoryOpaqueCaptureAddressAllocateInfo { pub s_type: StructureType, @@ -51238,6 +51408,86 @@ impl<'a> PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceClusterCullingShaderFeaturesHUAWEI { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub clusterculling_shader: Bool32, + pub multiview_cluster_culling_shader: Bool32, +} +impl ::std::default::Default for PhysicalDeviceClusterCullingShaderFeaturesHUAWEI { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + clusterculling_shader: Bool32::default(), + multiview_cluster_culling_shader: Bool32::default(), + } + } +} +unsafe impl TaggedStructure for PhysicalDeviceClusterCullingShaderFeaturesHUAWEI { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI; +} +impl PhysicalDeviceClusterCullingShaderFeaturesHUAWEI { + pub fn builder<'a>() -> PhysicalDeviceClusterCullingShaderFeaturesHUAWEIBuilder<'a> { + PhysicalDeviceClusterCullingShaderFeaturesHUAWEIBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceClusterCullingShaderFeaturesHUAWEIBuilder<'a> { + inner: PhysicalDeviceClusterCullingShaderFeaturesHUAWEI, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceClusterCullingShaderFeaturesHUAWEIBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceClusterCullingShaderFeaturesHUAWEI {} +unsafe impl ExtendsDeviceCreateInfo + for PhysicalDeviceClusterCullingShaderFeaturesHUAWEIBuilder<'_> +{ +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceClusterCullingShaderFeaturesHUAWEI {} +impl<'a> ::std::ops::Deref for PhysicalDeviceClusterCullingShaderFeaturesHUAWEIBuilder<'a> { + type Target = PhysicalDeviceClusterCullingShaderFeaturesHUAWEI; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceClusterCullingShaderFeaturesHUAWEIBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceClusterCullingShaderFeaturesHUAWEIBuilder<'a> { + #[inline] + pub fn clusterculling_shader(mut self, clusterculling_shader: bool) -> Self { + self.inner.clusterculling_shader = clusterculling_shader.into(); + self + } + #[inline] + pub fn multiview_cluster_culling_shader( + mut self, + multiview_cluster_culling_shader: bool, + ) -> Self { + self.inner.multiview_cluster_culling_shader = multiview_cluster_culling_shader.into(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceClusterCullingShaderFeaturesHUAWEI { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct BufferCopy2 { pub s_type: StructureType, @@ -53277,6 +53527,73 @@ impl<'a> PhysicalDeviceImage2DViewOf3DFeaturesEXTBuilder<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceImageSlicedViewOf3DFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub image_sliced_view_of3_d: Bool32, +} +impl ::std::default::Default for PhysicalDeviceImageSlicedViewOf3DFeaturesEXT { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + image_sliced_view_of3_d: Bool32::default(), + } + } +} +unsafe impl TaggedStructure for PhysicalDeviceImageSlicedViewOf3DFeaturesEXT { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT; +} +impl PhysicalDeviceImageSlicedViewOf3DFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceImageSlicedViewOf3DFeaturesEXTBuilder<'a> { + PhysicalDeviceImageSlicedViewOf3DFeaturesEXTBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceImageSlicedViewOf3DFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceImageSlicedViewOf3DFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceImageSlicedViewOf3DFeaturesEXTBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceImageSlicedViewOf3DFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceImageSlicedViewOf3DFeaturesEXTBuilder<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceImageSlicedViewOf3DFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceImageSlicedViewOf3DFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceImageSlicedViewOf3DFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceImageSlicedViewOf3DFeaturesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceImageSlicedViewOf3DFeaturesEXTBuilder<'a> { + #[inline] + pub fn image_sliced_view_of3_d(mut self, image_sliced_view_of3_d: bool) -> Self { + self.inner.image_sliced_view_of3_d = image_sliced_view_of3_d.into(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceImageSlicedViewOf3DFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PhysicalDeviceMutableDescriptorTypeFeaturesEXT { pub s_type: StructureType, @@ -57990,9 +58307,9 @@ pub struct VideoEncodeInfoKHR { pub p_next: *const c_void, pub flags: VideoEncodeFlagsKHR, pub quality_level: u32, - pub dst_bitstream_buffer: Buffer, - pub dst_bitstream_buffer_offset: DeviceSize, - pub dst_bitstream_buffer_max_range: DeviceSize, + pub dst_buffer: Buffer, + pub dst_buffer_offset: DeviceSize, + pub dst_buffer_range: DeviceSize, pub src_picture_resource: VideoPictureResourceInfoKHR, pub p_setup_reference_slot: *const VideoReferenceSlotInfoKHR, pub reference_slot_count: u32, @@ -58007,9 +58324,9 @@ impl ::std::default::Default for VideoEncodeInfoKHR { p_next: ::std::ptr::null(), flags: VideoEncodeFlagsKHR::default(), quality_level: u32::default(), - dst_bitstream_buffer: Buffer::default(), - dst_bitstream_buffer_offset: DeviceSize::default(), - dst_bitstream_buffer_max_range: DeviceSize::default(), + dst_buffer: Buffer::default(), + dst_buffer_offset: DeviceSize::default(), + dst_buffer_range: DeviceSize::default(), src_picture_resource: VideoPictureResourceInfoKHR::default(), p_setup_reference_slot: ::std::ptr::null(), reference_slot_count: u32::default(), @@ -58058,21 +58375,18 @@ impl<'a> VideoEncodeInfoKHRBuilder<'a> { self } #[inline] - pub fn dst_bitstream_buffer(mut self, dst_bitstream_buffer: Buffer) -> Self { - self.inner.dst_bitstream_buffer = dst_bitstream_buffer; + pub fn dst_buffer(mut self, dst_buffer: Buffer) -> Self { + self.inner.dst_buffer = dst_buffer; self } #[inline] - pub fn dst_bitstream_buffer_offset(mut self, dst_bitstream_buffer_offset: DeviceSize) -> Self { - self.inner.dst_bitstream_buffer_offset = dst_bitstream_buffer_offset; + pub fn dst_buffer_offset(mut self, dst_buffer_offset: DeviceSize) -> Self { + self.inner.dst_buffer_offset = dst_buffer_offset; self } #[inline] - pub fn dst_bitstream_buffer_max_range( - mut self, - dst_bitstream_buffer_max_range: DeviceSize, - ) -> Self { - self.inner.dst_bitstream_buffer_max_range = dst_bitstream_buffer_max_range; + pub fn dst_buffer_range(mut self, dst_buffer_range: DeviceSize) -> Self { + self.inner.dst_buffer_range = dst_buffer_range; self } #[inline] @@ -58129,14 +58443,79 @@ impl<'a> VideoEncodeInfoKHRBuilder<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct QueryPoolVideoEncodeFeedbackCreateInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub encode_feedback_flags: VideoEncodeFeedbackFlagsKHR, +} +impl ::std::default::Default for QueryPoolVideoEncodeFeedbackCreateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + encode_feedback_flags: VideoEncodeFeedbackFlagsKHR::default(), + } + } +} +unsafe impl TaggedStructure for QueryPoolVideoEncodeFeedbackCreateInfoKHR { + const STRUCTURE_TYPE: StructureType = + StructureType::QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR; +} +impl QueryPoolVideoEncodeFeedbackCreateInfoKHR { + pub fn builder<'a>() -> QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder<'a> { + QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder<'a> { + inner: QueryPoolVideoEncodeFeedbackCreateInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsQueryPoolCreateInfo for QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder<'_> {} +unsafe impl ExtendsQueryPoolCreateInfo for QueryPoolVideoEncodeFeedbackCreateInfoKHR {} +impl<'a> ::std::ops::Deref for QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder<'a> { + type Target = QueryPoolVideoEncodeFeedbackCreateInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder<'a> { + #[inline] + pub fn encode_feedback_flags( + mut self, + encode_feedback_flags: VideoEncodeFeedbackFlagsKHR, + ) -> Self { + self.inner.encode_feedback_flags = encode_feedback_flags; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> QueryPoolVideoEncodeFeedbackCreateInfoKHR { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct VideoEncodeRateControlInfoKHR { pub s_type: StructureType, pub p_next: *const c_void, pub flags: VideoEncodeRateControlFlagsKHR, pub rate_control_mode: VideoEncodeRateControlModeFlagsKHR, - pub layer_count: u8, - pub p_layer_configs: *const VideoEncodeRateControlLayerInfoKHR, + pub layer_count: u32, + pub p_layers: *const VideoEncodeRateControlLayerInfoKHR, } impl ::std::default::Default for VideoEncodeRateControlInfoKHR { #[inline] @@ -58146,8 +58525,8 @@ impl ::std::default::Default for VideoEncodeRateControlInfoKHR { p_next: ::std::ptr::null(), flags: VideoEncodeRateControlFlagsKHR::default(), rate_control_mode: VideoEncodeRateControlModeFlagsKHR::default(), - layer_count: u8::default(), - p_layer_configs: ::std::ptr::null(), + layer_count: u32::default(), + p_layers: ::std::ptr::null(), } } } @@ -58195,12 +58574,9 @@ impl<'a> VideoEncodeRateControlInfoKHRBuilder<'a> { self } #[inline] - pub fn layer_configs( - mut self, - layer_configs: &'a [VideoEncodeRateControlLayerInfoKHR], - ) -> Self { - self.inner.layer_count = layer_configs.len() as _; - self.inner.p_layer_configs = layer_configs.as_ptr(); + pub fn layers(mut self, layers: &'a [VideoEncodeRateControlLayerInfoKHR]) -> Self { + self.inner.layer_count = layers.len() as _; + self.inner.p_layers = layers.as_ptr(); self } #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] @@ -58217,8 +58593,8 @@ impl<'a> VideoEncodeRateControlInfoKHRBuilder<'a> { pub struct VideoEncodeRateControlLayerInfoKHR { pub s_type: StructureType, pub p_next: *const c_void, - pub average_bitrate: u32, - pub max_bitrate: u32, + pub average_bitrate: u64, + pub max_bitrate: u64, pub frame_rate_numerator: u32, pub frame_rate_denominator: u32, pub virtual_buffer_size_in_ms: u32, @@ -58230,8 +58606,8 @@ impl ::std::default::Default for VideoEncodeRateControlLayerInfoKHR { Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), - average_bitrate: u32::default(), - max_bitrate: u32::default(), + average_bitrate: u64::default(), + max_bitrate: u64::default(), frame_rate_numerator: u32::default(), frame_rate_denominator: u32::default(), virtual_buffer_size_in_ms: u32::default(), @@ -58271,12 +58647,12 @@ impl<'a> ::std::ops::DerefMut for VideoEncodeRateControlLayerInfoKHRBuilder<'a> } impl<'a> VideoEncodeRateControlLayerInfoKHRBuilder<'a> { #[inline] - pub fn average_bitrate(mut self, average_bitrate: u32) -> Self { + pub fn average_bitrate(mut self, average_bitrate: u64) -> Self { self.inner.average_bitrate = average_bitrate; self } #[inline] - pub fn max_bitrate(mut self, max_bitrate: u32) -> Self { + pub fn max_bitrate(mut self, max_bitrate: u64) -> Self { self.inner.max_bitrate = max_bitrate; self } @@ -58336,9 +58712,10 @@ pub struct VideoEncodeCapabilitiesKHR { pub p_next: *mut c_void, pub flags: VideoEncodeCapabilityFlagsKHR, pub rate_control_modes: VideoEncodeRateControlModeFlagsKHR, - pub rate_control_layer_count: u8, - pub quality_level_count: u8, + pub max_rate_control_layers: u32, + pub max_quality_levels: u32, pub input_image_data_fill_alignment: Extent2D, + pub supported_encode_feedback_flags: VideoEncodeFeedbackFlagsKHR, } impl ::std::default::Default for VideoEncodeCapabilitiesKHR { #[inline] @@ -58348,9 +58725,10 @@ impl ::std::default::Default for VideoEncodeCapabilitiesKHR { p_next: ::std::ptr::null_mut(), flags: VideoEncodeCapabilityFlagsKHR::default(), rate_control_modes: VideoEncodeRateControlModeFlagsKHR::default(), - rate_control_layer_count: u8::default(), - quality_level_count: u8::default(), + max_rate_control_layers: u32::default(), + max_quality_levels: u32::default(), input_image_data_fill_alignment: Extent2D::default(), + supported_encode_feedback_flags: VideoEncodeFeedbackFlagsKHR::default(), } } } @@ -58398,13 +58776,13 @@ impl<'a> VideoEncodeCapabilitiesKHRBuilder<'a> { self } #[inline] - pub fn rate_control_layer_count(mut self, rate_control_layer_count: u8) -> Self { - self.inner.rate_control_layer_count = rate_control_layer_count; + pub fn max_rate_control_layers(mut self, max_rate_control_layers: u32) -> Self { + self.inner.max_rate_control_layers = max_rate_control_layers; self } #[inline] - pub fn quality_level_count(mut self, quality_level_count: u8) -> Self { - self.inner.quality_level_count = quality_level_count; + pub fn max_quality_levels(mut self, max_quality_levels: u32) -> Self { + self.inner.max_quality_levels = max_quality_levels; self } #[inline] @@ -58415,6 +58793,14 @@ impl<'a> VideoEncodeCapabilitiesKHRBuilder<'a> { self.inner.input_image_data_fill_alignment = input_image_data_fill_alignment; self } + #[inline] + pub fn supported_encode_feedback_flags( + mut self, + supported_encode_feedback_flags: VideoEncodeFeedbackFlagsKHR, + ) -> Self { + self.inner.supported_encode_feedback_flags = supported_encode_feedback_flags; + self + } #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] #[doc = r" so references to builders can be passed directly to Vulkan functions."] @@ -58430,11 +58816,9 @@ pub struct VideoEncodeH264CapabilitiesEXT { pub s_type: StructureType, pub p_next: *mut c_void, pub flags: VideoEncodeH264CapabilityFlagsEXT, - pub input_mode_flags: VideoEncodeH264InputModeFlagsEXT, - pub output_mode_flags: VideoEncodeH264OutputModeFlagsEXT, - pub max_p_picture_l0_reference_count: u8, - pub max_b_picture_l0_reference_count: u8, - pub max_l1_reference_count: u8, + pub max_p_picture_l0_reference_count: u32, + pub max_b_picture_l0_reference_count: u32, + pub max_l1_reference_count: u32, pub motion_vectors_over_pic_boundaries_flag: Bool32, pub max_bytes_per_pic_denom: u32, pub max_bits_per_mb_denom: u32, @@ -58448,11 +58832,9 @@ impl ::std::default::Default for VideoEncodeH264CapabilitiesEXT { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null_mut(), flags: VideoEncodeH264CapabilityFlagsEXT::default(), - input_mode_flags: VideoEncodeH264InputModeFlagsEXT::default(), - output_mode_flags: VideoEncodeH264OutputModeFlagsEXT::default(), - max_p_picture_l0_reference_count: u8::default(), - max_b_picture_l0_reference_count: u8::default(), - max_l1_reference_count: u8::default(), + max_p_picture_l0_reference_count: u32::default(), + max_b_picture_l0_reference_count: u32::default(), + max_l1_reference_count: u32::default(), motion_vectors_over_pic_boundaries_flag: Bool32::default(), max_bytes_per_pic_denom: u32::default(), max_bits_per_mb_denom: u32::default(), @@ -58497,22 +58879,9 @@ impl<'a> VideoEncodeH264CapabilitiesEXTBuilder<'a> { self } #[inline] - pub fn input_mode_flags(mut self, input_mode_flags: VideoEncodeH264InputModeFlagsEXT) -> Self { - self.inner.input_mode_flags = input_mode_flags; - self - } - #[inline] - pub fn output_mode_flags( - mut self, - output_mode_flags: VideoEncodeH264OutputModeFlagsEXT, - ) -> Self { - self.inner.output_mode_flags = output_mode_flags; - self - } - #[inline] pub fn max_p_picture_l0_reference_count( mut self, - max_p_picture_l0_reference_count: u8, + max_p_picture_l0_reference_count: u32, ) -> Self { self.inner.max_p_picture_l0_reference_count = max_p_picture_l0_reference_count; self @@ -58520,13 +58889,13 @@ impl<'a> VideoEncodeH264CapabilitiesEXTBuilder<'a> { #[inline] pub fn max_b_picture_l0_reference_count( mut self, - max_b_picture_l0_reference_count: u8, + max_b_picture_l0_reference_count: u32, ) -> Self { self.inner.max_b_picture_l0_reference_count = max_b_picture_l0_reference_count; self } #[inline] - pub fn max_l1_reference_count(mut self, max_l1_reference_count: u8) -> Self { + pub fn max_l1_reference_count(mut self, max_l1_reference_count: u32) -> Self { self.inner.max_l1_reference_count = max_l1_reference_count; self } @@ -58739,7 +59108,6 @@ impl<'a> VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'a> { pub struct VideoEncodeH264DpbSlotInfoEXT { pub s_type: StructureType, pub p_next: *const c_void, - pub slot_index: i8, pub p_std_reference_info: *const StdVideoEncodeH264ReferenceInfo, } impl ::std::default::Default for VideoEncodeH264DpbSlotInfoEXT { @@ -58748,7 +59116,6 @@ impl ::std::default::Default for VideoEncodeH264DpbSlotInfoEXT { Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), - slot_index: i8::default(), p_std_reference_info: ::std::ptr::null(), } } @@ -58769,6 +59136,8 @@ pub struct VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { inner: VideoEncodeH264DpbSlotInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +unsafe impl ExtendsVideoReferenceSlotInfoKHR for VideoEncodeH264DpbSlotInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoReferenceSlotInfoKHR for VideoEncodeH264DpbSlotInfoEXT {} impl<'a> ::std::ops::Deref for VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { type Target = VideoEncodeH264DpbSlotInfoEXT; fn deref(&self) -> &Self::Target { @@ -58781,11 +59150,6 @@ impl<'a> ::std::ops::DerefMut for VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { } } impl<'a> VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { - #[inline] - pub fn slot_index(mut self, slot_index: i8) -> Self { - self.inner.slot_index = slot_index; - self - } #[inline] pub fn std_reference_info( mut self, @@ -58808,10 +59172,10 @@ impl<'a> VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { pub struct VideoEncodeH264VclFrameInfoEXT { pub s_type: StructureType, pub p_next: *const c_void, - pub p_reference_final_lists: *const VideoEncodeH264ReferenceListsInfoEXT, + pub p_std_reference_final_lists: *const StdVideoEncodeH264ReferenceListsInfo, pub nalu_slice_entry_count: u32, pub p_nalu_slice_entries: *const VideoEncodeH264NaluSliceInfoEXT, - pub p_current_picture_info: *const StdVideoEncodeH264PictureInfo, + pub p_std_picture_info: *const StdVideoEncodeH264PictureInfo, } impl ::std::default::Default for VideoEncodeH264VclFrameInfoEXT { #[inline] @@ -58819,10 +59183,10 @@ impl ::std::default::Default for VideoEncodeH264VclFrameInfoEXT { Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), - p_reference_final_lists: ::std::ptr::null(), + p_std_reference_final_lists: ::std::ptr::null(), nalu_slice_entry_count: u32::default(), p_nalu_slice_entries: ::std::ptr::null(), - p_current_picture_info: ::std::ptr::null(), + p_std_picture_info: ::std::ptr::null(), } } } @@ -58857,11 +59221,11 @@ impl<'a> ::std::ops::DerefMut for VideoEncodeH264VclFrameInfoEXTBuilder<'a> { } impl<'a> VideoEncodeH264VclFrameInfoEXTBuilder<'a> { #[inline] - pub fn reference_final_lists( + pub fn std_reference_final_lists( mut self, - reference_final_lists: &'a VideoEncodeH264ReferenceListsInfoEXT, + std_reference_final_lists: &'a StdVideoEncodeH264ReferenceListsInfo, ) -> Self { - self.inner.p_reference_final_lists = reference_final_lists; + self.inner.p_std_reference_final_lists = std_reference_final_lists; self } #[inline] @@ -58874,11 +59238,8 @@ impl<'a> VideoEncodeH264VclFrameInfoEXTBuilder<'a> { self } #[inline] - pub fn current_picture_info( - mut self, - current_picture_info: &'a StdVideoEncodeH264PictureInfo, - ) -> Self { - self.inner.p_current_picture_info = current_picture_info; + pub fn std_picture_info(mut self, std_picture_info: &'a StdVideoEncodeH264PictureInfo) -> Self { + self.inner.p_std_picture_info = std_picture_info; self } #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] @@ -58891,173 +59252,6 @@ impl<'a> VideoEncodeH264VclFrameInfoEXTBuilder<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] -#[doc = ""] -pub struct VideoEncodeH264ReferenceListsInfoEXT { - pub s_type: StructureType, - pub p_next: *const c_void, - pub reference_list0_entry_count: u8, - pub p_reference_list0_entries: *const VideoEncodeH264DpbSlotInfoEXT, - pub reference_list1_entry_count: u8, - pub p_reference_list1_entries: *const VideoEncodeH264DpbSlotInfoEXT, - pub p_mem_mgmt_ctrl_operations: *const StdVideoEncodeH264RefMemMgmtCtrlOperations, -} -impl ::std::default::Default for VideoEncodeH264ReferenceListsInfoEXT { - #[inline] - fn default() -> Self { - Self { - s_type: Self::STRUCTURE_TYPE, - p_next: ::std::ptr::null(), - reference_list0_entry_count: u8::default(), - p_reference_list0_entries: ::std::ptr::null(), - reference_list1_entry_count: u8::default(), - p_reference_list1_entries: ::std::ptr::null(), - p_mem_mgmt_ctrl_operations: ::std::ptr::null(), - } - } -} -unsafe impl TaggedStructure for VideoEncodeH264ReferenceListsInfoEXT { - const STRUCTURE_TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT; -} -impl VideoEncodeH264ReferenceListsInfoEXT { - pub fn builder<'a>() -> VideoEncodeH264ReferenceListsInfoEXTBuilder<'a> { - VideoEncodeH264ReferenceListsInfoEXTBuilder { - inner: Self::default(), - marker: ::std::marker::PhantomData, - } - } -} -#[repr(transparent)] -pub struct VideoEncodeH264ReferenceListsInfoEXTBuilder<'a> { - inner: VideoEncodeH264ReferenceListsInfoEXT, - marker: ::std::marker::PhantomData<&'a ()>, -} -impl<'a> ::std::ops::Deref for VideoEncodeH264ReferenceListsInfoEXTBuilder<'a> { - type Target = VideoEncodeH264ReferenceListsInfoEXT; - fn deref(&self) -> &Self::Target { - &self.inner - } -} -impl<'a> ::std::ops::DerefMut for VideoEncodeH264ReferenceListsInfoEXTBuilder<'a> { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.inner - } -} -impl<'a> VideoEncodeH264ReferenceListsInfoEXTBuilder<'a> { - #[inline] - pub fn reference_list0_entries( - mut self, - reference_list0_entries: &'a [VideoEncodeH264DpbSlotInfoEXT], - ) -> Self { - self.inner.reference_list0_entry_count = reference_list0_entries.len() as _; - self.inner.p_reference_list0_entries = reference_list0_entries.as_ptr(); - self - } - #[inline] - pub fn reference_list1_entries( - mut self, - reference_list1_entries: &'a [VideoEncodeH264DpbSlotInfoEXT], - ) -> Self { - self.inner.reference_list1_entry_count = reference_list1_entries.len() as _; - self.inner.p_reference_list1_entries = reference_list1_entries.as_ptr(); - self - } - #[inline] - pub fn mem_mgmt_ctrl_operations( - mut self, - mem_mgmt_ctrl_operations: &'a StdVideoEncodeH264RefMemMgmtCtrlOperations, - ) -> Self { - self.inner.p_mem_mgmt_ctrl_operations = mem_mgmt_ctrl_operations; - self - } - #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] - #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] - #[doc = r" so references to builders can be passed directly to Vulkan functions."] - pub fn build(self) -> VideoEncodeH264ReferenceListsInfoEXT { - self.inner - } -} -#[repr(C)] -#[cfg_attr(feature = "debug", derive(Debug))] -#[derive(Copy, Clone)] -#[doc = ""] -pub struct VideoEncodeH264EmitPictureParametersInfoEXT { - pub s_type: StructureType, - pub p_next: *const c_void, - pub sps_id: u8, - pub emit_sps_enable: Bool32, - pub pps_id_entry_count: u32, - pub pps_id_entries: *const u8, -} -impl ::std::default::Default for VideoEncodeH264EmitPictureParametersInfoEXT { - #[inline] - fn default() -> Self { - Self { - s_type: Self::STRUCTURE_TYPE, - p_next: ::std::ptr::null(), - sps_id: u8::default(), - emit_sps_enable: Bool32::default(), - pps_id_entry_count: u32::default(), - pps_id_entries: ::std::ptr::null(), - } - } -} -unsafe impl TaggedStructure for VideoEncodeH264EmitPictureParametersInfoEXT { - const STRUCTURE_TYPE: StructureType = - StructureType::VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT; -} -impl VideoEncodeH264EmitPictureParametersInfoEXT { - pub fn builder<'a>() -> VideoEncodeH264EmitPictureParametersInfoEXTBuilder<'a> { - VideoEncodeH264EmitPictureParametersInfoEXTBuilder { - inner: Self::default(), - marker: ::std::marker::PhantomData, - } - } -} -#[repr(transparent)] -pub struct VideoEncodeH264EmitPictureParametersInfoEXTBuilder<'a> { - inner: VideoEncodeH264EmitPictureParametersInfoEXT, - marker: ::std::marker::PhantomData<&'a ()>, -} -unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH264EmitPictureParametersInfoEXTBuilder<'_> {} -unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH264EmitPictureParametersInfoEXT {} -impl<'a> ::std::ops::Deref for VideoEncodeH264EmitPictureParametersInfoEXTBuilder<'a> { - type Target = VideoEncodeH264EmitPictureParametersInfoEXT; - fn deref(&self) -> &Self::Target { - &self.inner - } -} -impl<'a> ::std::ops::DerefMut for VideoEncodeH264EmitPictureParametersInfoEXTBuilder<'a> { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.inner - } -} -impl<'a> VideoEncodeH264EmitPictureParametersInfoEXTBuilder<'a> { - #[inline] - pub fn sps_id(mut self, sps_id: u8) -> Self { - self.inner.sps_id = sps_id; - self - } - #[inline] - pub fn emit_sps_enable(mut self, emit_sps_enable: bool) -> Self { - self.inner.emit_sps_enable = emit_sps_enable.into(); - self - } - #[inline] - pub fn pps_id_entries(mut self, pps_id_entries: &'a [u8]) -> Self { - self.inner.pps_id_entry_count = pps_id_entries.len() as _; - self.inner.pps_id_entries = pps_id_entries.as_ptr(); - self - } - #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] - #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] - #[doc = r" so references to builders can be passed directly to Vulkan functions."] - pub fn build(self) -> VideoEncodeH264EmitPictureParametersInfoEXT { - self.inner - } -} -#[repr(C)] -#[cfg_attr(feature = "debug", derive(Debug))] -#[derive(Copy, Clone)] #[doc = ""] pub struct VideoEncodeH264ProfileInfoEXT { pub s_type: StructureType, @@ -59126,8 +59320,8 @@ pub struct VideoEncodeH264NaluSliceInfoEXT { pub s_type: StructureType, pub p_next: *const c_void, pub mb_count: u32, - pub p_reference_final_lists: *const VideoEncodeH264ReferenceListsInfoEXT, - pub p_slice_header_std: *const StdVideoEncodeH264SliceHeader, + pub p_std_reference_final_lists: *const StdVideoEncodeH264ReferenceListsInfo, + pub p_std_slice_header: *const StdVideoEncodeH264SliceHeader, } impl ::std::default::Default for VideoEncodeH264NaluSliceInfoEXT { #[inline] @@ -59136,8 +59330,8 @@ impl ::std::default::Default for VideoEncodeH264NaluSliceInfoEXT { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), mb_count: u32::default(), - p_reference_final_lists: ::std::ptr::null(), - p_slice_header_std: ::std::ptr::null(), + p_std_reference_final_lists: ::std::ptr::null(), + p_std_slice_header: ::std::ptr::null(), } } } @@ -59175,16 +59369,16 @@ impl<'a> VideoEncodeH264NaluSliceInfoEXTBuilder<'a> { self } #[inline] - pub fn reference_final_lists( + pub fn std_reference_final_lists( mut self, - reference_final_lists: &'a VideoEncodeH264ReferenceListsInfoEXT, + std_reference_final_lists: &'a StdVideoEncodeH264ReferenceListsInfo, ) -> Self { - self.inner.p_reference_final_lists = reference_final_lists; + self.inner.p_std_reference_final_lists = std_reference_final_lists; self } #[inline] - pub fn slice_header_std(mut self, slice_header_std: &'a StdVideoEncodeH264SliceHeader) -> Self { - self.inner.p_slice_header_std = slice_header_std; + pub fn std_slice_header(mut self, std_slice_header: &'a StdVideoEncodeH264SliceHeader) -> Self { + self.inner.p_std_slice_header = std_slice_header; self } #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] @@ -59205,7 +59399,7 @@ pub struct VideoEncodeH264RateControlInfoEXT { pub idr_period: u32, pub consecutive_b_frame_count: u32, pub rate_control_structure: VideoEncodeH264RateControlStructureEXT, - pub temporal_layer_count: u8, + pub temporal_layer_count: u32, } impl ::std::default::Default for VideoEncodeH264RateControlInfoEXT { #[inline] @@ -59217,7 +59411,7 @@ impl ::std::default::Default for VideoEncodeH264RateControlInfoEXT { idr_period: u32::default(), consecutive_b_frame_count: u32::default(), rate_control_structure: VideoEncodeH264RateControlStructureEXT::default(), - temporal_layer_count: u8::default(), + temporal_layer_count: u32::default(), } } } @@ -59275,7 +59469,7 @@ impl<'a> VideoEncodeH264RateControlInfoEXTBuilder<'a> { self } #[inline] - pub fn temporal_layer_count(mut self, temporal_layer_count: u8) -> Self { + pub fn temporal_layer_count(mut self, temporal_layer_count: u32) -> Self { self.inner.temporal_layer_count = temporal_layer_count; self } @@ -59405,7 +59599,7 @@ impl<'a> VideoEncodeH264FrameSizeEXTBuilder<'a> { pub struct VideoEncodeH264RateControlLayerInfoEXT { pub s_type: StructureType, pub p_next: *const c_void, - pub temporal_layer_id: u8, + pub temporal_layer_id: u32, pub use_initial_rc_qp: Bool32, pub initial_rc_qp: VideoEncodeH264QpEXT, pub use_min_qp: Bool32, @@ -59421,7 +59615,7 @@ impl ::std::default::Default for VideoEncodeH264RateControlLayerInfoEXT { Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), - temporal_layer_id: u8::default(), + temporal_layer_id: u32::default(), use_initial_rc_qp: Bool32::default(), initial_rc_qp: VideoEncodeH264QpEXT::default(), use_min_qp: Bool32::default(), @@ -59470,7 +59664,7 @@ impl<'a> ::std::ops::DerefMut for VideoEncodeH264RateControlLayerInfoEXTBuilder< } impl<'a> VideoEncodeH264RateControlLayerInfoEXTBuilder<'a> { #[inline] - pub fn temporal_layer_id(mut self, temporal_layer_id: u8) -> Self { + pub fn temporal_layer_id(mut self, temporal_layer_id: u32) -> Self { self.inner.temporal_layer_id = temporal_layer_id; self } @@ -59529,25 +59723,23 @@ pub struct VideoEncodeH265CapabilitiesEXT { pub s_type: StructureType, pub p_next: *mut c_void, pub flags: VideoEncodeH265CapabilityFlagsEXT, - pub input_mode_flags: VideoEncodeH265InputModeFlagsEXT, - pub output_mode_flags: VideoEncodeH265OutputModeFlagsEXT, pub ctb_sizes: VideoEncodeH265CtbSizeFlagsEXT, pub transform_block_sizes: VideoEncodeH265TransformBlockSizeFlagsEXT, - pub max_p_picture_l0_reference_count: u8, - pub max_b_picture_l0_reference_count: u8, - pub max_l1_reference_count: u8, - pub max_sub_layers_count: u8, - pub min_log2_min_luma_coding_block_size_minus3: u8, - pub max_log2_min_luma_coding_block_size_minus3: u8, - pub min_log2_min_luma_transform_block_size_minus2: u8, - pub max_log2_min_luma_transform_block_size_minus2: u8, - pub min_max_transform_hierarchy_depth_inter: u8, - pub max_max_transform_hierarchy_depth_inter: u8, - pub min_max_transform_hierarchy_depth_intra: u8, - pub max_max_transform_hierarchy_depth_intra: u8, - pub max_diff_cu_qp_delta_depth: u8, - pub min_max_num_merge_cand: u8, - pub max_max_num_merge_cand: u8, + pub max_p_picture_l0_reference_count: u32, + pub max_b_picture_l0_reference_count: u32, + pub max_l1_reference_count: u32, + pub max_sub_layers_count: u32, + pub min_log2_min_luma_coding_block_size_minus3: u32, + pub max_log2_min_luma_coding_block_size_minus3: u32, + pub min_log2_min_luma_transform_block_size_minus2: u32, + pub max_log2_min_luma_transform_block_size_minus2: u32, + pub min_max_transform_hierarchy_depth_inter: u32, + pub max_max_transform_hierarchy_depth_inter: u32, + pub min_max_transform_hierarchy_depth_intra: u32, + pub max_max_transform_hierarchy_depth_intra: u32, + pub max_diff_cu_qp_delta_depth: u32, + pub min_max_num_merge_cand: u32, + pub max_max_num_merge_cand: u32, } impl ::std::default::Default for VideoEncodeH265CapabilitiesEXT { #[inline] @@ -59556,25 +59748,23 @@ impl ::std::default::Default for VideoEncodeH265CapabilitiesEXT { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null_mut(), flags: VideoEncodeH265CapabilityFlagsEXT::default(), - input_mode_flags: VideoEncodeH265InputModeFlagsEXT::default(), - output_mode_flags: VideoEncodeH265OutputModeFlagsEXT::default(), ctb_sizes: VideoEncodeH265CtbSizeFlagsEXT::default(), transform_block_sizes: VideoEncodeH265TransformBlockSizeFlagsEXT::default(), - max_p_picture_l0_reference_count: u8::default(), - max_b_picture_l0_reference_count: u8::default(), - max_l1_reference_count: u8::default(), - max_sub_layers_count: u8::default(), - min_log2_min_luma_coding_block_size_minus3: u8::default(), - max_log2_min_luma_coding_block_size_minus3: u8::default(), - min_log2_min_luma_transform_block_size_minus2: u8::default(), - max_log2_min_luma_transform_block_size_minus2: u8::default(), - min_max_transform_hierarchy_depth_inter: u8::default(), - max_max_transform_hierarchy_depth_inter: u8::default(), - min_max_transform_hierarchy_depth_intra: u8::default(), - max_max_transform_hierarchy_depth_intra: u8::default(), - max_diff_cu_qp_delta_depth: u8::default(), - min_max_num_merge_cand: u8::default(), - max_max_num_merge_cand: u8::default(), + max_p_picture_l0_reference_count: u32::default(), + max_b_picture_l0_reference_count: u32::default(), + max_l1_reference_count: u32::default(), + max_sub_layers_count: u32::default(), + min_log2_min_luma_coding_block_size_minus3: u32::default(), + max_log2_min_luma_coding_block_size_minus3: u32::default(), + min_log2_min_luma_transform_block_size_minus2: u32::default(), + max_log2_min_luma_transform_block_size_minus2: u32::default(), + min_max_transform_hierarchy_depth_inter: u32::default(), + max_max_transform_hierarchy_depth_inter: u32::default(), + min_max_transform_hierarchy_depth_intra: u32::default(), + max_max_transform_hierarchy_depth_intra: u32::default(), + max_diff_cu_qp_delta_depth: u32::default(), + min_max_num_merge_cand: u32::default(), + max_max_num_merge_cand: u32::default(), } } } @@ -59614,19 +59804,6 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { self } #[inline] - pub fn input_mode_flags(mut self, input_mode_flags: VideoEncodeH265InputModeFlagsEXT) -> Self { - self.inner.input_mode_flags = input_mode_flags; - self - } - #[inline] - pub fn output_mode_flags( - mut self, - output_mode_flags: VideoEncodeH265OutputModeFlagsEXT, - ) -> Self { - self.inner.output_mode_flags = output_mode_flags; - self - } - #[inline] pub fn ctb_sizes(mut self, ctb_sizes: VideoEncodeH265CtbSizeFlagsEXT) -> Self { self.inner.ctb_sizes = ctb_sizes; self @@ -59642,7 +59819,7 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn max_p_picture_l0_reference_count( mut self, - max_p_picture_l0_reference_count: u8, + max_p_picture_l0_reference_count: u32, ) -> Self { self.inner.max_p_picture_l0_reference_count = max_p_picture_l0_reference_count; self @@ -59650,25 +59827,25 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn max_b_picture_l0_reference_count( mut self, - max_b_picture_l0_reference_count: u8, + max_b_picture_l0_reference_count: u32, ) -> Self { self.inner.max_b_picture_l0_reference_count = max_b_picture_l0_reference_count; self } #[inline] - pub fn max_l1_reference_count(mut self, max_l1_reference_count: u8) -> Self { + pub fn max_l1_reference_count(mut self, max_l1_reference_count: u32) -> Self { self.inner.max_l1_reference_count = max_l1_reference_count; self } #[inline] - pub fn max_sub_layers_count(mut self, max_sub_layers_count: u8) -> Self { + pub fn max_sub_layers_count(mut self, max_sub_layers_count: u32) -> Self { self.inner.max_sub_layers_count = max_sub_layers_count; self } #[inline] pub fn min_log2_min_luma_coding_block_size_minus3( mut self, - min_log2_min_luma_coding_block_size_minus3: u8, + min_log2_min_luma_coding_block_size_minus3: u32, ) -> Self { self.inner.min_log2_min_luma_coding_block_size_minus3 = min_log2_min_luma_coding_block_size_minus3; @@ -59677,7 +59854,7 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn max_log2_min_luma_coding_block_size_minus3( mut self, - max_log2_min_luma_coding_block_size_minus3: u8, + max_log2_min_luma_coding_block_size_minus3: u32, ) -> Self { self.inner.max_log2_min_luma_coding_block_size_minus3 = max_log2_min_luma_coding_block_size_minus3; @@ -59686,7 +59863,7 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn min_log2_min_luma_transform_block_size_minus2( mut self, - min_log2_min_luma_transform_block_size_minus2: u8, + min_log2_min_luma_transform_block_size_minus2: u32, ) -> Self { self.inner.min_log2_min_luma_transform_block_size_minus2 = min_log2_min_luma_transform_block_size_minus2; @@ -59695,7 +59872,7 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn max_log2_min_luma_transform_block_size_minus2( mut self, - max_log2_min_luma_transform_block_size_minus2: u8, + max_log2_min_luma_transform_block_size_minus2: u32, ) -> Self { self.inner.max_log2_min_luma_transform_block_size_minus2 = max_log2_min_luma_transform_block_size_minus2; @@ -59704,7 +59881,7 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn min_max_transform_hierarchy_depth_inter( mut self, - min_max_transform_hierarchy_depth_inter: u8, + min_max_transform_hierarchy_depth_inter: u32, ) -> Self { self.inner.min_max_transform_hierarchy_depth_inter = min_max_transform_hierarchy_depth_inter; @@ -59713,7 +59890,7 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn max_max_transform_hierarchy_depth_inter( mut self, - max_max_transform_hierarchy_depth_inter: u8, + max_max_transform_hierarchy_depth_inter: u32, ) -> Self { self.inner.max_max_transform_hierarchy_depth_inter = max_max_transform_hierarchy_depth_inter; @@ -59722,7 +59899,7 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn min_max_transform_hierarchy_depth_intra( mut self, - min_max_transform_hierarchy_depth_intra: u8, + min_max_transform_hierarchy_depth_intra: u32, ) -> Self { self.inner.min_max_transform_hierarchy_depth_intra = min_max_transform_hierarchy_depth_intra; @@ -59731,24 +59908,24 @@ impl<'a> VideoEncodeH265CapabilitiesEXTBuilder<'a> { #[inline] pub fn max_max_transform_hierarchy_depth_intra( mut self, - max_max_transform_hierarchy_depth_intra: u8, + max_max_transform_hierarchy_depth_intra: u32, ) -> Self { self.inner.max_max_transform_hierarchy_depth_intra = max_max_transform_hierarchy_depth_intra; self } #[inline] - pub fn max_diff_cu_qp_delta_depth(mut self, max_diff_cu_qp_delta_depth: u8) -> Self { + pub fn max_diff_cu_qp_delta_depth(mut self, max_diff_cu_qp_delta_depth: u32) -> Self { self.inner.max_diff_cu_qp_delta_depth = max_diff_cu_qp_delta_depth; self } #[inline] - pub fn min_max_num_merge_cand(mut self, min_max_num_merge_cand: u8) -> Self { + pub fn min_max_num_merge_cand(mut self, min_max_num_merge_cand: u32) -> Self { self.inner.min_max_num_merge_cand = min_max_num_merge_cand; self } #[inline] - pub fn max_max_num_merge_cand(mut self, max_max_num_merge_cand: u8) -> Self { + pub fn max_max_num_merge_cand(mut self, max_max_num_merge_cand: u32) -> Self { self.inner.max_max_num_merge_cand = max_max_num_merge_cand; self } @@ -59949,10 +60126,10 @@ impl<'a> VideoEncodeH265SessionParametersCreateInfoEXTBuilder<'a> { pub struct VideoEncodeH265VclFrameInfoEXT { pub s_type: StructureType, pub p_next: *const c_void, - pub p_reference_final_lists: *const VideoEncodeH265ReferenceListsInfoEXT, + pub p_std_reference_final_lists: *const StdVideoEncodeH265ReferenceListsInfo, pub nalu_slice_segment_entry_count: u32, pub p_nalu_slice_segment_entries: *const VideoEncodeH265NaluSliceSegmentInfoEXT, - pub p_current_picture_info: *const StdVideoEncodeH265PictureInfo, + pub p_std_picture_info: *const StdVideoEncodeH265PictureInfo, } impl ::std::default::Default for VideoEncodeH265VclFrameInfoEXT { #[inline] @@ -59960,10 +60137,10 @@ impl ::std::default::Default for VideoEncodeH265VclFrameInfoEXT { Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), - p_reference_final_lists: ::std::ptr::null(), + p_std_reference_final_lists: ::std::ptr::null(), nalu_slice_segment_entry_count: u32::default(), p_nalu_slice_segment_entries: ::std::ptr::null(), - p_current_picture_info: ::std::ptr::null(), + p_std_picture_info: ::std::ptr::null(), } } } @@ -59998,11 +60175,11 @@ impl<'a> ::std::ops::DerefMut for VideoEncodeH265VclFrameInfoEXTBuilder<'a> { } impl<'a> VideoEncodeH265VclFrameInfoEXTBuilder<'a> { #[inline] - pub fn reference_final_lists( + pub fn std_reference_final_lists( mut self, - reference_final_lists: &'a VideoEncodeH265ReferenceListsInfoEXT, + std_reference_final_lists: &'a StdVideoEncodeH265ReferenceListsInfo, ) -> Self { - self.inner.p_reference_final_lists = reference_final_lists; + self.inner.p_std_reference_final_lists = std_reference_final_lists; self } #[inline] @@ -60015,11 +60192,8 @@ impl<'a> VideoEncodeH265VclFrameInfoEXTBuilder<'a> { self } #[inline] - pub fn current_picture_info( - mut self, - current_picture_info: &'a StdVideoEncodeH265PictureInfo, - ) -> Self { - self.inner.p_current_picture_info = current_picture_info; + pub fn std_picture_info(mut self, std_picture_info: &'a StdVideoEncodeH265PictureInfo) -> Self { + self.inner.p_std_picture_info = std_picture_info; self } #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] @@ -60032,106 +60206,13 @@ impl<'a> VideoEncodeH265VclFrameInfoEXTBuilder<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] -#[doc = ""] -pub struct VideoEncodeH265EmitPictureParametersInfoEXT { - pub s_type: StructureType, - pub p_next: *const c_void, - pub vps_id: u8, - pub sps_id: u8, - pub emit_vps_enable: Bool32, - pub emit_sps_enable: Bool32, - pub pps_id_entry_count: u32, - pub pps_id_entries: *const u8, -} -impl ::std::default::Default for VideoEncodeH265EmitPictureParametersInfoEXT { - #[inline] - fn default() -> Self { - Self { - s_type: Self::STRUCTURE_TYPE, - p_next: ::std::ptr::null(), - vps_id: u8::default(), - sps_id: u8::default(), - emit_vps_enable: Bool32::default(), - emit_sps_enable: Bool32::default(), - pps_id_entry_count: u32::default(), - pps_id_entries: ::std::ptr::null(), - } - } -} -unsafe impl TaggedStructure for VideoEncodeH265EmitPictureParametersInfoEXT { - const STRUCTURE_TYPE: StructureType = - StructureType::VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT; -} -impl VideoEncodeH265EmitPictureParametersInfoEXT { - pub fn builder<'a>() -> VideoEncodeH265EmitPictureParametersInfoEXTBuilder<'a> { - VideoEncodeH265EmitPictureParametersInfoEXTBuilder { - inner: Self::default(), - marker: ::std::marker::PhantomData, - } - } -} -#[repr(transparent)] -pub struct VideoEncodeH265EmitPictureParametersInfoEXTBuilder<'a> { - inner: VideoEncodeH265EmitPictureParametersInfoEXT, - marker: ::std::marker::PhantomData<&'a ()>, -} -unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH265EmitPictureParametersInfoEXTBuilder<'_> {} -unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH265EmitPictureParametersInfoEXT {} -impl<'a> ::std::ops::Deref for VideoEncodeH265EmitPictureParametersInfoEXTBuilder<'a> { - type Target = VideoEncodeH265EmitPictureParametersInfoEXT; - fn deref(&self) -> &Self::Target { - &self.inner - } -} -impl<'a> ::std::ops::DerefMut for VideoEncodeH265EmitPictureParametersInfoEXTBuilder<'a> { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.inner - } -} -impl<'a> VideoEncodeH265EmitPictureParametersInfoEXTBuilder<'a> { - #[inline] - pub fn vps_id(mut self, vps_id: u8) -> Self { - self.inner.vps_id = vps_id; - self - } - #[inline] - pub fn sps_id(mut self, sps_id: u8) -> Self { - self.inner.sps_id = sps_id; - self - } - #[inline] - pub fn emit_vps_enable(mut self, emit_vps_enable: bool) -> Self { - self.inner.emit_vps_enable = emit_vps_enable.into(); - self - } - #[inline] - pub fn emit_sps_enable(mut self, emit_sps_enable: bool) -> Self { - self.inner.emit_sps_enable = emit_sps_enable.into(); - self - } - #[inline] - pub fn pps_id_entries(mut self, pps_id_entries: &'a [u8]) -> Self { - self.inner.pps_id_entry_count = pps_id_entries.len() as _; - self.inner.pps_id_entries = pps_id_entries.as_ptr(); - self - } - #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] - #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] - #[doc = r" so references to builders can be passed directly to Vulkan functions."] - pub fn build(self) -> VideoEncodeH265EmitPictureParametersInfoEXT { - self.inner - } -} -#[repr(C)] -#[cfg_attr(feature = "debug", derive(Debug))] -#[derive(Copy, Clone)] #[doc = ""] pub struct VideoEncodeH265NaluSliceSegmentInfoEXT { pub s_type: StructureType, pub p_next: *const c_void, pub ctb_count: u32, - pub p_reference_final_lists: *const VideoEncodeH265ReferenceListsInfoEXT, - pub p_slice_segment_header_std: *const StdVideoEncodeH265SliceSegmentHeader, + pub p_std_reference_final_lists: *const StdVideoEncodeH265ReferenceListsInfo, + pub p_std_slice_segment_header: *const StdVideoEncodeH265SliceSegmentHeader, } impl ::std::default::Default for VideoEncodeH265NaluSliceSegmentInfoEXT { #[inline] @@ -60140,8 +60221,8 @@ impl ::std::default::Default for VideoEncodeH265NaluSliceSegmentInfoEXT { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), ctb_count: u32::default(), - p_reference_final_lists: ::std::ptr::null(), - p_slice_segment_header_std: ::std::ptr::null(), + p_std_reference_final_lists: ::std::ptr::null(), + p_std_slice_segment_header: ::std::ptr::null(), } } } @@ -60180,19 +60261,19 @@ impl<'a> VideoEncodeH265NaluSliceSegmentInfoEXTBuilder<'a> { self } #[inline] - pub fn reference_final_lists( + pub fn std_reference_final_lists( mut self, - reference_final_lists: &'a VideoEncodeH265ReferenceListsInfoEXT, + std_reference_final_lists: &'a StdVideoEncodeH265ReferenceListsInfo, ) -> Self { - self.inner.p_reference_final_lists = reference_final_lists; + self.inner.p_std_reference_final_lists = std_reference_final_lists; self } #[inline] - pub fn slice_segment_header_std( + pub fn std_slice_segment_header( mut self, - slice_segment_header_std: &'a StdVideoEncodeH265SliceSegmentHeader, + std_slice_segment_header: &'a StdVideoEncodeH265SliceSegmentHeader, ) -> Self { - self.inner.p_slice_segment_header_std = slice_segment_header_std; + self.inner.p_std_slice_segment_header = std_slice_segment_header; self } #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] @@ -60213,7 +60294,7 @@ pub struct VideoEncodeH265RateControlInfoEXT { pub idr_period: u32, pub consecutive_b_frame_count: u32, pub rate_control_structure: VideoEncodeH265RateControlStructureEXT, - pub sub_layer_count: u8, + pub sub_layer_count: u32, } impl ::std::default::Default for VideoEncodeH265RateControlInfoEXT { #[inline] @@ -60225,7 +60306,7 @@ impl ::std::default::Default for VideoEncodeH265RateControlInfoEXT { idr_period: u32::default(), consecutive_b_frame_count: u32::default(), rate_control_structure: VideoEncodeH265RateControlStructureEXT::default(), - sub_layer_count: u8::default(), + sub_layer_count: u32::default(), } } } @@ -60283,7 +60364,7 @@ impl<'a> VideoEncodeH265RateControlInfoEXTBuilder<'a> { self } #[inline] - pub fn sub_layer_count(mut self, sub_layer_count: u8) -> Self { + pub fn sub_layer_count(mut self, sub_layer_count: u32) -> Self { self.inner.sub_layer_count = sub_layer_count; self } @@ -60413,7 +60494,7 @@ impl<'a> VideoEncodeH265FrameSizeEXTBuilder<'a> { pub struct VideoEncodeH265RateControlLayerInfoEXT { pub s_type: StructureType, pub p_next: *const c_void, - pub temporal_id: u8, + pub temporal_id: u32, pub use_initial_rc_qp: Bool32, pub initial_rc_qp: VideoEncodeH265QpEXT, pub use_min_qp: Bool32, @@ -60429,7 +60510,7 @@ impl ::std::default::Default for VideoEncodeH265RateControlLayerInfoEXT { Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), - temporal_id: u8::default(), + temporal_id: u32::default(), use_initial_rc_qp: Bool32::default(), initial_rc_qp: VideoEncodeH265QpEXT::default(), use_min_qp: Bool32::default(), @@ -60478,7 +60559,7 @@ impl<'a> ::std::ops::DerefMut for VideoEncodeH265RateControlLayerInfoEXTBuilder< } impl<'a> VideoEncodeH265RateControlLayerInfoEXTBuilder<'a> { #[inline] - pub fn temporal_id(mut self, temporal_id: u8) -> Self { + pub fn temporal_id(mut self, temporal_id: u32) -> Self { self.inner.temporal_id = temporal_id; self } @@ -60599,7 +60680,6 @@ impl<'a> VideoEncodeH265ProfileInfoEXTBuilder<'a> { pub struct VideoEncodeH265DpbSlotInfoEXT { pub s_type: StructureType, pub p_next: *const c_void, - pub slot_index: i8, pub p_std_reference_info: *const StdVideoEncodeH265ReferenceInfo, } impl ::std::default::Default for VideoEncodeH265DpbSlotInfoEXT { @@ -60608,7 +60688,6 @@ impl ::std::default::Default for VideoEncodeH265DpbSlotInfoEXT { Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), - slot_index: i8::default(), p_std_reference_info: ::std::ptr::null(), } } @@ -60629,6 +60708,8 @@ pub struct VideoEncodeH265DpbSlotInfoEXTBuilder<'a> { inner: VideoEncodeH265DpbSlotInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +unsafe impl ExtendsVideoReferenceSlotInfoKHR for VideoEncodeH265DpbSlotInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoReferenceSlotInfoKHR for VideoEncodeH265DpbSlotInfoEXT {} impl<'a> ::std::ops::Deref for VideoEncodeH265DpbSlotInfoEXTBuilder<'a> { type Target = VideoEncodeH265DpbSlotInfoEXT; fn deref(&self) -> &Self::Target { @@ -60641,11 +60722,6 @@ impl<'a> ::std::ops::DerefMut for VideoEncodeH265DpbSlotInfoEXTBuilder<'a> { } } impl<'a> VideoEncodeH265DpbSlotInfoEXTBuilder<'a> { - #[inline] - pub fn slot_index(mut self, slot_index: i8) -> Self { - self.inner.slot_index = slot_index; - self - } #[inline] pub fn std_reference_info( mut self, @@ -60664,94 +60740,6 @@ impl<'a> VideoEncodeH265DpbSlotInfoEXTBuilder<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] -#[doc = ""] -pub struct VideoEncodeH265ReferenceListsInfoEXT { - pub s_type: StructureType, - pub p_next: *const c_void, - pub reference_list0_entry_count: u8, - pub p_reference_list0_entries: *const VideoEncodeH265DpbSlotInfoEXT, - pub reference_list1_entry_count: u8, - pub p_reference_list1_entries: *const VideoEncodeH265DpbSlotInfoEXT, - pub p_reference_modifications: *const StdVideoEncodeH265ReferenceModifications, -} -impl ::std::default::Default for VideoEncodeH265ReferenceListsInfoEXT { - #[inline] - fn default() -> Self { - Self { - s_type: Self::STRUCTURE_TYPE, - p_next: ::std::ptr::null(), - reference_list0_entry_count: u8::default(), - p_reference_list0_entries: ::std::ptr::null(), - reference_list1_entry_count: u8::default(), - p_reference_list1_entries: ::std::ptr::null(), - p_reference_modifications: ::std::ptr::null(), - } - } -} -unsafe impl TaggedStructure for VideoEncodeH265ReferenceListsInfoEXT { - const STRUCTURE_TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT; -} -impl VideoEncodeH265ReferenceListsInfoEXT { - pub fn builder<'a>() -> VideoEncodeH265ReferenceListsInfoEXTBuilder<'a> { - VideoEncodeH265ReferenceListsInfoEXTBuilder { - inner: Self::default(), - marker: ::std::marker::PhantomData, - } - } -} -#[repr(transparent)] -pub struct VideoEncodeH265ReferenceListsInfoEXTBuilder<'a> { - inner: VideoEncodeH265ReferenceListsInfoEXT, - marker: ::std::marker::PhantomData<&'a ()>, -} -impl<'a> ::std::ops::Deref for VideoEncodeH265ReferenceListsInfoEXTBuilder<'a> { - type Target = VideoEncodeH265ReferenceListsInfoEXT; - fn deref(&self) -> &Self::Target { - &self.inner - } -} -impl<'a> ::std::ops::DerefMut for VideoEncodeH265ReferenceListsInfoEXTBuilder<'a> { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.inner - } -} -impl<'a> VideoEncodeH265ReferenceListsInfoEXTBuilder<'a> { - #[inline] - pub fn reference_list0_entries( - mut self, - reference_list0_entries: &'a [VideoEncodeH265DpbSlotInfoEXT], - ) -> Self { - self.inner.reference_list0_entry_count = reference_list0_entries.len() as _; - self.inner.p_reference_list0_entries = reference_list0_entries.as_ptr(); - self - } - #[inline] - pub fn reference_list1_entries( - mut self, - reference_list1_entries: &'a [VideoEncodeH265DpbSlotInfoEXT], - ) -> Self { - self.inner.reference_list1_entry_count = reference_list1_entries.len() as _; - self.inner.p_reference_list1_entries = reference_list1_entries.as_ptr(); - self - } - #[inline] - pub fn reference_modifications( - mut self, - reference_modifications: &'a StdVideoEncodeH265ReferenceModifications, - ) -> Self { - self.inner.p_reference_modifications = reference_modifications; - self - } - #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] - #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] - #[doc = r" so references to builders can be passed directly to Vulkan functions."] - pub fn build(self) -> VideoEncodeH265ReferenceListsInfoEXT { - self.inner - } -} -#[repr(C)] -#[cfg_attr(feature = "debug", derive(Debug))] -#[derive(Copy, Clone)] #[doc = ""] pub struct PhysicalDeviceInheritedViewportScissorFeaturesNV { pub s_type: StructureType, @@ -71970,6 +71958,79 @@ impl<'a> DeviceFaultVendorBinaryHeaderVersionOneEXTBuilder<'a> { } #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub pipeline_library_group_handles: Bool32, +} +impl ::std::default::Default for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + pipeline_library_group_handles: Bool32::default(), + } + } +} +unsafe impl TaggedStructure for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT; +} +impl PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { + pub fn builder<'a>() -> PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXTBuilder<'a> { + PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXTBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXTBuilder<'a> { + inner: PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXTBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT +{ +} +unsafe impl ExtendsDeviceCreateInfo + for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXTBuilder<'_> +{ +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXTBuilder<'a> { + type Target = PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXTBuilder<'a> { + #[inline] + pub fn pipeline_library_group_handles(mut self, pipeline_library_group_handles: bool) -> Self { + self.inner.pipeline_library_group_handles = pipeline_library_group_handles.into(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone, Default)] #[doc = ""] pub struct DecompressMemoryRegionNV { @@ -72481,7 +72542,7 @@ impl<'a> PhysicalDeviceSwapchainMaintenance1FeaturesEXTBuilder<'a> { #[doc = ""] pub struct SwapchainPresentFenceInfoEXT { pub s_type: StructureType, - pub p_next: *mut c_void, + pub p_next: *const c_void, pub swapchain_count: u32, pub p_fences: *const Fence, } @@ -72490,7 +72551,7 @@ impl ::std::default::Default for SwapchainPresentFenceInfoEXT { fn default() -> Self { Self { s_type: Self::STRUCTURE_TYPE, - p_next: ::std::ptr::null_mut(), + p_next: ::std::ptr::null(), swapchain_count: u32::default(), p_fences: ::std::ptr::null(), } @@ -72545,7 +72606,7 @@ impl<'a> SwapchainPresentFenceInfoEXTBuilder<'a> { #[doc = ""] pub struct SwapchainPresentModesCreateInfoEXT { pub s_type: StructureType, - pub p_next: *mut c_void, + pub p_next: *const c_void, pub present_mode_count: u32, pub p_present_modes: *const PresentModeKHR, } @@ -72554,7 +72615,7 @@ impl ::std::default::Default for SwapchainPresentModesCreateInfoEXT { fn default() -> Self { Self { s_type: Self::STRUCTURE_TYPE, - p_next: ::std::ptr::null_mut(), + p_next: ::std::ptr::null(), present_mode_count: u32::default(), p_present_modes: ::std::ptr::null(), } @@ -72609,7 +72670,7 @@ impl<'a> SwapchainPresentModesCreateInfoEXTBuilder<'a> { #[doc = ""] pub struct SwapchainPresentModeInfoEXT { pub s_type: StructureType, - pub p_next: *mut c_void, + pub p_next: *const c_void, pub swapchain_count: u32, pub p_present_modes: *const PresentModeKHR, } @@ -72618,7 +72679,7 @@ impl ::std::default::Default for SwapchainPresentModeInfoEXT { fn default() -> Self { Self { s_type: Self::STRUCTURE_TYPE, - p_next: ::std::ptr::null_mut(), + p_next: ::std::ptr::null(), swapchain_count: u32::default(), p_present_modes: ::std::ptr::null(), } @@ -73177,3 +73238,431 @@ impl<'a> PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOMBuilder<'a> { self.inner } } +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceShaderCorePropertiesARM { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub pixel_rate: u32, + pub texel_rate: u32, + pub fma_rate: u32, +} +impl ::std::default::Default for PhysicalDeviceShaderCorePropertiesARM { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + pixel_rate: u32::default(), + texel_rate: u32::default(), + fma_rate: u32::default(), + } + } +} +unsafe impl TaggedStructure for PhysicalDeviceShaderCorePropertiesARM { + const STRUCTURE_TYPE: StructureType = StructureType::PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM; +} +impl PhysicalDeviceShaderCorePropertiesARM { + pub fn builder<'a>() -> PhysicalDeviceShaderCorePropertiesARMBuilder<'a> { + PhysicalDeviceShaderCorePropertiesARMBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceShaderCorePropertiesARMBuilder<'a> { + inner: PhysicalDeviceShaderCorePropertiesARM, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceShaderCorePropertiesARMBuilder<'_> {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceShaderCorePropertiesARM {} +impl<'a> ::std::ops::Deref for PhysicalDeviceShaderCorePropertiesARMBuilder<'a> { + type Target = PhysicalDeviceShaderCorePropertiesARM; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceShaderCorePropertiesARMBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceShaderCorePropertiesARMBuilder<'a> { + #[inline] + pub fn pixel_rate(mut self, pixel_rate: u32) -> Self { + self.inner.pixel_rate = pixel_rate; + self + } + #[inline] + pub fn texel_rate(mut self, texel_rate: u32) -> Self { + self.inner.texel_rate = texel_rate; + self + } + #[inline] + pub fn fma_rate(mut self, fma_rate: u32) -> Self { + self.inner.fma_rate = fma_rate; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceShaderCorePropertiesARM { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub multiview_per_view_render_areas: Bool32, +} +impl ::std::default::Default for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + multiview_per_view_render_areas: Bool32::default(), + } + } +} +unsafe impl TaggedStructure for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM; +} +impl PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { + pub fn builder<'a>() -> PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOMBuilder<'a> { + PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOMBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOMBuilder<'a> { + inner: PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOMBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM +{ +} +unsafe impl ExtendsDeviceCreateInfo + for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOMBuilder<'_> +{ +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM {} +impl<'a> ::std::ops::Deref for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOMBuilder<'a> { + type Target = PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOMBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOMBuilder<'a> { + #[inline] + pub fn multiview_per_view_render_areas( + mut self, + multiview_per_view_render_areas: bool, + ) -> Self { + self.inner.multiview_per_view_render_areas = multiview_per_view_render_areas.into(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { + pub s_type: StructureType, + pub p_next: *const c_void, + pub per_view_render_area_count: u32, + pub p_per_view_render_areas: *const Rect2D, +} +impl ::std::default::Default for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + per_view_render_area_count: u32::default(), + p_per_view_render_areas: ::std::ptr::null(), + } + } +} +unsafe impl TaggedStructure for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { + const STRUCTURE_TYPE: StructureType = + StructureType::MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM; +} +impl MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { + pub fn builder<'a>() -> MultiviewPerViewRenderAreasRenderPassBeginInfoQCOMBuilder<'a> { + MultiviewPerViewRenderAreasRenderPassBeginInfoQCOMBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct MultiviewPerViewRenderAreasRenderPassBeginInfoQCOMBuilder<'a> { + inner: MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsRenderPassBeginInfo + for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOMBuilder<'_> +{ +} +unsafe impl ExtendsRenderPassBeginInfo for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM {} +unsafe impl ExtendsRenderingInfo for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOMBuilder<'_> {} +unsafe impl ExtendsRenderingInfo for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM {} +impl<'a> ::std::ops::Deref for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOMBuilder<'a> { + type Target = MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOMBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> MultiviewPerViewRenderAreasRenderPassBeginInfoQCOMBuilder<'a> { + #[inline] + pub fn per_view_render_areas(mut self, per_view_render_areas: &'a [Rect2D]) -> Self { + self.inner.per_view_render_area_count = per_view_render_areas.len() as _; + self.inner.p_per_view_render_areas = per_view_render_areas.as_ptr(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct QueryLowLatencySupportNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_queried_low_latency_data: *mut c_void, +} +impl ::std::default::Default for QueryLowLatencySupportNV { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + p_queried_low_latency_data: ::std::ptr::null_mut(), + } + } +} +unsafe impl TaggedStructure for QueryLowLatencySupportNV { + const STRUCTURE_TYPE: StructureType = StructureType::QUERY_LOW_LATENCY_SUPPORT_NV; +} +impl QueryLowLatencySupportNV { + pub fn builder<'a>() -> QueryLowLatencySupportNVBuilder<'a> { + QueryLowLatencySupportNVBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct QueryLowLatencySupportNVBuilder<'a> { + inner: QueryLowLatencySupportNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsSemaphoreCreateInfo for QueryLowLatencySupportNVBuilder<'_> {} +unsafe impl ExtendsSemaphoreCreateInfo for QueryLowLatencySupportNV {} +impl<'a> ::std::ops::Deref for QueryLowLatencySupportNVBuilder<'a> { + type Target = QueryLowLatencySupportNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for QueryLowLatencySupportNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> QueryLowLatencySupportNVBuilder<'a> { + #[inline] + pub fn queried_low_latency_data(mut self, queried_low_latency_data: *mut c_void) -> Self { + self.inner.p_queried_low_latency_data = queried_low_latency_data; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> QueryLowLatencySupportNV { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct MemoryMapInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: MemoryMapFlags, + pub memory: DeviceMemory, + pub offset: DeviceSize, + pub size: DeviceSize, +} +impl ::std::default::Default for MemoryMapInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + flags: MemoryMapFlags::default(), + memory: DeviceMemory::default(), + offset: DeviceSize::default(), + size: DeviceSize::default(), + } + } +} +unsafe impl TaggedStructure for MemoryMapInfoKHR { + const STRUCTURE_TYPE: StructureType = StructureType::MEMORY_MAP_INFO_KHR; +} +impl MemoryMapInfoKHR { + pub fn builder<'a>() -> MemoryMapInfoKHRBuilder<'a> { + MemoryMapInfoKHRBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct MemoryMapInfoKHRBuilder<'a> { + inner: MemoryMapInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for MemoryMapInfoKHRBuilder<'a> { + type Target = MemoryMapInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for MemoryMapInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> MemoryMapInfoKHRBuilder<'a> { + #[inline] + pub fn flags(mut self, flags: MemoryMapFlags) -> Self { + self.inner.flags = flags; + self + } + #[inline] + pub fn memory(mut self, memory: DeviceMemory) -> Self { + self.inner.memory = memory; + self + } + #[inline] + pub fn offset(mut self, offset: DeviceSize) -> Self { + self.inner.offset = offset; + self + } + #[inline] + pub fn size(mut self, size: DeviceSize) -> Self { + self.inner.size = size; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> MemoryMapInfoKHR { + self.inner + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct MemoryUnmapInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: MemoryUnmapFlagsKHR, + pub memory: DeviceMemory, +} +impl ::std::default::Default for MemoryUnmapInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + flags: MemoryUnmapFlagsKHR::default(), + memory: DeviceMemory::default(), + } + } +} +unsafe impl TaggedStructure for MemoryUnmapInfoKHR { + const STRUCTURE_TYPE: StructureType = StructureType::MEMORY_UNMAP_INFO_KHR; +} +impl MemoryUnmapInfoKHR { + pub fn builder<'a>() -> MemoryUnmapInfoKHRBuilder<'a> { + MemoryUnmapInfoKHRBuilder { + inner: Self::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct MemoryUnmapInfoKHRBuilder<'a> { + inner: MemoryUnmapInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for MemoryUnmapInfoKHRBuilder<'a> { + type Target = MemoryUnmapInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for MemoryUnmapInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> MemoryUnmapInfoKHRBuilder<'a> { + #[inline] + pub fn flags(mut self, flags: MemoryUnmapFlagsKHR) -> Self { + self.inner.flags = flags; + self + } + #[inline] + pub fn memory(mut self, memory: DeviceMemory) -> Self { + self.inner.memory = memory; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> MemoryUnmapInfoKHR { + self.inner + } +} diff --git a/ash/src/vk/enums.rs b/ash/src/vk/enums.rs index a27a55b40..289b6219f 100644 --- a/ash/src/vk/enums.rs +++ b/ash/src/vk/enums.rs @@ -1744,6 +1744,8 @@ impl VendorId { pub const MESA: Self = Self(0x1_0005); #[doc = "PoCL vendor ID"] pub const POCL: Self = Self(0x1_0006); + #[doc = "Mobileye vendor ID"] + pub const MOBILEYE: Self = Self(0x1_0007); } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] @@ -1808,6 +1810,8 @@ impl DriverId { pub const MESA_DOZEN: Self = Self(23); #[doc = "Mesa open source project"] pub const MESA_NVK: Self = Self(24); + #[doc = "Imagination Technologies"] + pub const IMAGINATION_OPEN_SOURCE_MESA: Self = Self(25); } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] @@ -2898,6 +2902,9 @@ impl fmt::Debug for Result { Self::THREAD_DONE_KHR => Some("THREAD_DONE_KHR"), Self::OPERATION_DEFERRED_KHR => Some("OPERATION_DEFERRED_KHR"), Self::OPERATION_NOT_DEFERRED_KHR => Some("OPERATION_NOT_DEFERRED_KHR"), + Self::ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR => { + Some("ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR") + } Self::ERROR_COMPRESSION_EXHAUSTED_EXT => Some("ERROR_COMPRESSION_EXHAUSTED_EXT"), Self::ERROR_OUT_OF_POOL_MEMORY => Some("ERROR_OUT_OF_POOL_MEMORY"), Self::ERROR_INVALID_EXTERNAL_HANDLE => Some("ERROR_INVALID_EXTERNAL_HANDLE"), diff --git a/ash/src/vk/extensions.rs b/ash/src/vk/extensions.rs index 2e1a283a2..bee1c89e0 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -1538,8 +1538,6 @@ impl KhrSamplerMirrorClampToEdgeFn { impl SamplerAddressMode { #[doc = "Note that this defines what was previously a core enum, and so uses the 'value' attribute rather than 'offset', and does not have a suffix. This is a special case, and should not be repeated"] pub const MIRROR_CLAMP_TO_EDGE: Self = Self(4); - #[deprecated = "Alias introduced for consistency with extension suffixing rules"] - pub const MIRROR_CLAMP_TO_EDGE_KHR: Self = Self::MIRROR_CLAMP_TO_EDGE; } impl ImgFilterCubicFn { #[inline] @@ -3096,7 +3094,7 @@ impl ExtVideoEncodeH264Fn { pub const fn name() -> &'static ::std::ffi::CStr { unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_video_encode_h264\0") } } - pub const SPEC_VERSION: u32 = 9u32; + pub const SPEC_VERSION: u32 = 10u32; } #[derive(Clone)] pub struct ExtVideoEncodeH264Fn {} @@ -3118,11 +3116,9 @@ impl StructureType { pub const VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT: Self = Self(1_000_038_003); pub const VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT: Self = Self(1_000_038_004); pub const VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT: Self = Self(1_000_038_005); - pub const VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT: Self = Self(1_000_038_006); pub const VIDEO_ENCODE_H264_PROFILE_INFO_EXT: Self = Self(1_000_038_007); pub const VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT: Self = Self(1_000_038_008); pub const VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT: Self = Self(1_000_038_009); - pub const VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT: Self = Self(1_000_038_010); } #[doc = "Generated from 'VK_EXT_video_encode_h264'"] impl VideoCodecOperationFlagsKHR { @@ -3133,7 +3129,7 @@ impl ExtVideoEncodeH265Fn { pub const fn name() -> &'static ::std::ffi::CStr { unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_video_encode_h265\0") } } - pub const SPEC_VERSION: u32 = 9u32; + pub const SPEC_VERSION: u32 = 10u32; } #[derive(Clone)] pub struct ExtVideoEncodeH265Fn {} @@ -3155,9 +3151,7 @@ impl StructureType { pub const VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT: Self = Self(1_000_039_003); pub const VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT: Self = Self(1_000_039_004); pub const VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT: Self = Self(1_000_039_005); - pub const VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT: Self = Self(1_000_039_006); pub const VIDEO_ENCODE_H265_PROFILE_INFO_EXT: Self = Self(1_000_039_007); - pub const VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT: Self = Self(1_000_039_008); pub const VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT: Self = Self(1_000_039_009); pub const VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT: Self = Self(1_000_039_010); } @@ -3545,25 +3539,6 @@ impl ImageCreateFlags { impl StructureType { pub const PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV: Self = Self(1_000_050_000); } -impl NvExtension52Fn { - #[inline] - pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_extension_52\0") } - } - pub const SPEC_VERSION: u32 = 0u32; -} -#[derive(Clone)] -pub struct NvExtension52Fn {} -unsafe impl Send for NvExtension52Fn {} -unsafe impl Sync for NvExtension52Fn {} -impl NvExtension52Fn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - Self {} - } -} impl NvExtension53Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -6094,6 +6069,25 @@ impl GoogleDisplayTimingFn { impl StructureType { pub const PRESENT_TIMES_INFO_GOOGLE: Self = Self(1_000_092_000); } +impl ReservedDoNotUse94Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_RESERVED_do_not_use_94\0") } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +pub struct ReservedDoNotUse94Fn {} +unsafe impl Send for ReservedDoNotUse94Fn {} +unsafe impl Sync for ReservedDoNotUse94Fn {} +impl ReservedDoNotUse94Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} impl NvSampleMaskOverrideCoverageFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -6218,7 +6212,7 @@ impl ExtDiscardRectanglesFn { pub const fn name() -> &'static ::std::ffi::CStr { unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_discard_rectangles\0") } } - pub const SPEC_VERSION: u32 = 1u32; + pub const SPEC_VERSION: u32 = 2u32; } #[allow(non_camel_case_types)] pub type PFN_vkCmdSetDiscardRectangleEXT = unsafe extern "system" fn( @@ -6227,9 +6221,19 @@ pub type PFN_vkCmdSetDiscardRectangleEXT = unsafe extern "system" fn( discard_rectangle_count: u32, p_discard_rectangles: *const Rect2D, ); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetDiscardRectangleEnableEXT = + unsafe extern "system" fn(command_buffer: CommandBuffer, discard_rectangle_enable: Bool32); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetDiscardRectangleModeEXT = unsafe extern "system" fn( + command_buffer: CommandBuffer, + discard_rectangle_mode: DiscardRectangleModeEXT, +); #[derive(Clone)] pub struct ExtDiscardRectanglesFn { pub cmd_set_discard_rectangle_ext: PFN_vkCmdSetDiscardRectangleEXT, + pub cmd_set_discard_rectangle_enable_ext: PFN_vkCmdSetDiscardRectangleEnableEXT, + pub cmd_set_discard_rectangle_mode_ext: PFN_vkCmdSetDiscardRectangleModeEXT, } unsafe impl Send for ExtDiscardRectanglesFn {} unsafe impl Sync for ExtDiscardRectanglesFn {} @@ -6261,12 +6265,54 @@ impl ExtDiscardRectanglesFn { ::std::mem::transmute(val) } }, + cmd_set_discard_rectangle_enable_ext: unsafe { + unsafe extern "system" fn cmd_set_discard_rectangle_enable_ext( + _command_buffer: CommandBuffer, + _discard_rectangle_enable: Bool32, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_discard_rectangle_enable_ext) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdSetDiscardRectangleEnableEXT\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_set_discard_rectangle_enable_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_set_discard_rectangle_mode_ext: unsafe { + unsafe extern "system" fn cmd_set_discard_rectangle_mode_ext( + _command_buffer: CommandBuffer, + _discard_rectangle_mode: DiscardRectangleModeEXT, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_discard_rectangle_mode_ext) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdSetDiscardRectangleModeEXT\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_set_discard_rectangle_mode_ext + } else { + ::std::mem::transmute(val) + } + }, } } } #[doc = "Generated from 'VK_EXT_discard_rectangles'"] impl DynamicState { pub const DISCARD_RECTANGLE_EXT: Self = Self(1_000_099_000); + pub const DISCARD_RECTANGLE_ENABLE_EXT: Self = Self(1_000_099_001); + pub const DISCARD_RECTANGLE_MODE_EXT: Self = Self(1_000_099_002); } #[doc = "Generated from 'VK_EXT_discard_rectangles'"] impl StructureType { @@ -6361,6 +6407,10 @@ impl NvExtension104Fn { Self {} } } +#[doc = "Generated from 'VK_NV_extension_104'"] +impl PrivateDataSlotCreateFlags { + pub const RESERVED_0_NV: Self = Self(0b1); +} impl ExtSwapchainColorspaceFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -8468,6 +8518,25 @@ impl KhrRelaxedBlockLayoutFn { Self {} } } +impl ReservedDoNotUse146Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_RESERVED_do_not_use_146\0") } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +pub struct ReservedDoNotUse146Fn {} +unsafe impl Send for ReservedDoNotUse146Fn {} +unsafe impl Sync for ReservedDoNotUse146Fn {} +impl ReservedDoNotUse146Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} impl KhrGetMemoryRequirements2Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -11884,29 +11953,6 @@ impl GoogleExtension195Fn { Self {} } } -impl GoogleExtension196Fn { - #[inline] - pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_GOOGLE_extension_196\0") } - } - pub const SPEC_VERSION: u32 = 0u32; -} -#[derive(Clone)] -pub struct GoogleExtension196Fn {} -unsafe impl Send for GoogleExtension196Fn {} -unsafe impl Sync for GoogleExtension196Fn {} -impl GoogleExtension196Fn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - Self {} - } -} -#[doc = "Generated from 'VK_GOOGLE_extension_196'"] -impl PipelineCacheCreateFlags { - pub const RESERVED_1_EXT: Self = Self(0b10); -} impl KhrDriverPropertiesFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -12272,9 +12318,16 @@ impl NvScissorExclusiveFn { pub const fn name() -> &'static ::std::ffi::CStr { unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_scissor_exclusive\0") } } - pub const SPEC_VERSION: u32 = 1u32; + pub const SPEC_VERSION: u32 = 2u32; } #[allow(non_camel_case_types)] +pub type PFN_vkCmdSetExclusiveScissorEnableNV = unsafe extern "system" fn( + command_buffer: CommandBuffer, + first_exclusive_scissor: u32, + exclusive_scissor_count: u32, + p_exclusive_scissor_enables: *const Bool32, +); +#[allow(non_camel_case_types)] pub type PFN_vkCmdSetExclusiveScissorNV = unsafe extern "system" fn( command_buffer: CommandBuffer, first_exclusive_scissor: u32, @@ -12283,6 +12336,7 @@ pub type PFN_vkCmdSetExclusiveScissorNV = unsafe extern "system" fn( ); #[derive(Clone)] pub struct NvScissorExclusiveFn { + pub cmd_set_exclusive_scissor_enable_nv: PFN_vkCmdSetExclusiveScissorEnableNV, pub cmd_set_exclusive_scissor_nv: PFN_vkCmdSetExclusiveScissorNV, } unsafe impl Send for NvScissorExclusiveFn {} @@ -12293,6 +12347,28 @@ impl NvScissorExclusiveFn { F: FnMut(&::std::ffi::CStr) -> *const c_void, { Self { + cmd_set_exclusive_scissor_enable_nv: unsafe { + unsafe extern "system" fn cmd_set_exclusive_scissor_enable_nv( + _command_buffer: CommandBuffer, + _first_exclusive_scissor: u32, + _exclusive_scissor_count: u32, + _p_exclusive_scissor_enables: *const Bool32, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_exclusive_scissor_enable_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdSetExclusiveScissorEnableNV\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_set_exclusive_scissor_enable_nv + } else { + ::std::mem::transmute(val) + } + }, cmd_set_exclusive_scissor_nv: unsafe { unsafe extern "system" fn cmd_set_exclusive_scissor_nv( _command_buffer: CommandBuffer, @@ -12320,6 +12396,7 @@ impl NvScissorExclusiveFn { } #[doc = "Generated from 'VK_NV_scissor_exclusive'"] impl DynamicState { + pub const EXCLUSIVE_SCISSOR_ENABLE_NV: Self = Self(1_000_205_000); pub const EXCLUSIVE_SCISSOR_NV: Self = Self(1_000_205_001); } #[doc = "Generated from 'VK_NV_scissor_exclusive'"] @@ -15537,25 +15614,76 @@ impl IntelExtension271Fn { impl ImageUsageFlags { pub const RESERVED_22_EXT: Self = Self(0b100_0000_0000_0000_0000_0000); } -impl IntelExtension272Fn { +impl KhrMapMemory2Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_INTEL_extension_272\0") } + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_map_memory2\0") } } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkMapMemory2KHR = unsafe extern "system" fn( + device: Device, + p_memory_map_info: *const MemoryMapInfoKHR, + pp_data: *mut *mut c_void, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkUnmapMemory2KHR = unsafe extern "system" fn( + device: Device, + p_memory_unmap_info: *const MemoryUnmapInfoKHR, +) -> Result; #[derive(Clone)] -pub struct IntelExtension272Fn {} -unsafe impl Send for IntelExtension272Fn {} -unsafe impl Sync for IntelExtension272Fn {} -impl IntelExtension272Fn { +pub struct KhrMapMemory2Fn { + pub map_memory2_khr: PFN_vkMapMemory2KHR, + pub unmap_memory2_khr: PFN_vkUnmapMemory2KHR, +} +unsafe impl Send for KhrMapMemory2Fn {} +unsafe impl Sync for KhrMapMemory2Fn {} +impl KhrMapMemory2Fn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - Self {} + Self { + map_memory2_khr: unsafe { + unsafe extern "system" fn map_memory2_khr( + _device: Device, + _p_memory_map_info: *const MemoryMapInfoKHR, + _pp_data: *mut *mut c_void, + ) -> Result { + panic!(concat!("Unable to load ", stringify!(map_memory2_khr))) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkMapMemory2KHR\0"); + let val = _f(cname); + if val.is_null() { + map_memory2_khr + } else { + ::std::mem::transmute(val) + } + }, + unmap_memory2_khr: unsafe { + unsafe extern "system" fn unmap_memory2_khr( + _device: Device, + _p_memory_unmap_info: *const MemoryUnmapInfoKHR, + ) -> Result { + panic!(concat!("Unable to load ", stringify!(unmap_memory2_khr))) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkUnmapMemory2KHR\0"); + let val = _f(cname); + if val.is_null() { + unmap_memory2_khr + } else { + ::std::mem::transmute(val) + } + }, + } } } +#[doc = "Generated from 'VK_KHR_map_memory2'"] +impl StructureType { + pub const MEMORY_MAP_INFO_KHR: Self = Self(1_000_271_000); + pub const MEMORY_UNMAP_INFO_KHR: Self = Self(1_000_271_001); +} impl IntelExtension273Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -16656,21 +16784,12 @@ impl KhrExtension299Fn { Self {} } } -#[doc = "Generated from 'VK_KHR_extension_299'"] -impl MemoryHeapFlags { - pub const RESERVED_2_KHR: Self = Self(0b100); -} -#[doc = "Generated from 'VK_KHR_extension_299'"] -impl PipelineCacheCreateFlags { - pub const RESERVED_1_KHR: Self = Self::RESERVED_1_EXT; - pub const RESERVED_2_KHR: Self = Self(0b100); -} impl KhrVideoEncodeQueueFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_video_encode_queue\0") } } - pub const SPEC_VERSION: u32 = 7u32; + pub const SPEC_VERSION: u32 = 8u32; } #[allow(non_camel_case_types)] pub type PFN_vkCmdEncodeVideoKHR = unsafe extern "system" fn( @@ -16747,19 +16866,24 @@ impl PipelineStageFlags2 { } #[doc = "Generated from 'VK_KHR_video_encode_queue'"] impl QueryType { - pub const VIDEO_ENCODESTREAM_BUFFER_RANGE_KHR: Self = Self(1_000_299_000); + pub const VIDEO_ENCODE_FEEDBACK_KHR: Self = Self(1_000_299_000); } #[doc = "Generated from 'VK_KHR_video_encode_queue'"] impl QueueFlags { pub const VIDEO_ENCODE_KHR: Self = Self(0b100_0000); } #[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl Result { + pub const ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR: Self = Self(-1_000_299_000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] impl StructureType { pub const VIDEO_ENCODE_INFO_KHR: Self = Self(1_000_299_000); pub const VIDEO_ENCODE_RATE_CONTROL_INFO_KHR: Self = Self(1_000_299_001); pub const VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR: Self = Self(1_000_299_002); pub const VIDEO_ENCODE_CAPABILITIES_KHR: Self = Self(1_000_299_003); pub const VIDEO_ENCODE_USAGE_INFO_KHR: Self = Self(1_000_299_004); + pub const QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR: Self = Self(1_000_299_005); } #[doc = "Generated from 'VK_KHR_video_encode_queue'"] impl VideoCodingControlFlagsKHR { @@ -16931,25 +17055,6 @@ impl NvExtension308Fn { Self {} } } -impl KhrExtension309Fn { - #[inline] - pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_extension_309\0") } - } - pub const SPEC_VERSION: u32 = 0u32; -} -#[derive(Clone)] -pub struct KhrExtension309Fn {} -unsafe impl Send for KhrExtension309Fn {} -unsafe impl Sync for KhrExtension309Fn {} -impl KhrExtension309Fn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - Self {} - } -} impl QcomExtension310Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -16973,18 +17078,18 @@ impl QcomExtension310Fn { impl StructureType { pub const RESERVED_QCOM: Self = Self(1_000_309_000); } -impl NvExtension311Fn { +impl NvLowLatencyFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_extension_311\0") } + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_low_latency\0") } } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct NvExtension311Fn {} -unsafe impl Send for NvExtension311Fn {} -unsafe impl Sync for NvExtension311Fn {} -impl NvExtension311Fn { +pub struct NvLowLatencyFn {} +unsafe impl Send for NvLowLatencyFn {} +unsafe impl Sync for NvLowLatencyFn {} +impl NvLowLatencyFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, @@ -16992,6 +17097,10 @@ impl NvExtension311Fn { Self {} } } +#[doc = "Generated from 'VK_NV_low_latency'"] +impl StructureType { + pub const QUERY_LOW_LATENCY_SUPPORT_NV: Self = Self(1_000_310_000); +} impl ExtMetalObjectsFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -20169,57 +20278,6 @@ impl StructureType { pub const PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT: Self = Self(1_000_372_001); pub const PIPELINE_INFO_EXT: Self = Self::PIPELINE_INFO_KHR; } -impl NvExtension374Fn { - #[inline] - pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_extension_374\0") } - } - pub const SPEC_VERSION: u32 = 0u32; -} -#[derive(Clone)] -pub struct NvExtension374Fn {} -unsafe impl Send for NvExtension374Fn {} -unsafe impl Sync for NvExtension374Fn {} -impl NvExtension374Fn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - Self {} - } -} -#[doc = "Generated from 'VK_NV_extension_374'"] -impl ExternalFenceHandleTypeFlags { - pub const RESERVED_4_NV: Self = Self(0b1_0000); - pub const RESERVED_5_NV: Self = Self(0b10_0000); -} -#[doc = "Generated from 'VK_NV_extension_374'"] -impl ExternalSemaphoreHandleTypeFlags { - pub const RESERVED_5_NV: Self = Self(0b10_0000); -} -impl NvExtension375Fn { - #[inline] - pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_extension_375\0") } - } - pub const SPEC_VERSION: u32 = 0u32; -} -#[derive(Clone)] -pub struct NvExtension375Fn {} -unsafe impl Send for NvExtension375Fn {} -unsafe impl Sync for NvExtension375Fn {} -impl NvExtension375Fn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - Self {} - } -} -#[doc = "Generated from 'VK_NV_extension_375'"] -impl ExternalMemoryHandleTypeFlags { - pub const RESERVED_13_NV: Self = Self(0b10_0000_0000_0000); -} impl ExtExtension376Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -21638,35 +21696,102 @@ impl FbExtension404Fn { Self {} } } -impl HuaweiExtension405Fn { +impl HuaweiClusterCullingShaderFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_HUAWEI_extension_405\0") } + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_HUAWEI_cluster_culling_shader\0") + } } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawClusterHUAWEI = unsafe extern "system" fn( + command_buffer: CommandBuffer, + group_count_x: u32, + group_count_y: u32, + group_count_z: u32, +); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawClusterIndirectHUAWEI = + unsafe extern "system" fn(command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize); #[derive(Clone)] -pub struct HuaweiExtension405Fn {} -unsafe impl Send for HuaweiExtension405Fn {} -unsafe impl Sync for HuaweiExtension405Fn {} -impl HuaweiExtension405Fn { +pub struct HuaweiClusterCullingShaderFn { + pub cmd_draw_cluster_huawei: PFN_vkCmdDrawClusterHUAWEI, + pub cmd_draw_cluster_indirect_huawei: PFN_vkCmdDrawClusterIndirectHUAWEI, +} +unsafe impl Send for HuaweiClusterCullingShaderFn {} +unsafe impl Sync for HuaweiClusterCullingShaderFn {} +impl HuaweiClusterCullingShaderFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - Self {} + Self { + cmd_draw_cluster_huawei: unsafe { + unsafe extern "system" fn cmd_draw_cluster_huawei( + _command_buffer: CommandBuffer, + _group_count_x: u32, + _group_count_y: u32, + _group_count_z: u32, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_draw_cluster_huawei) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawClusterHUAWEI\0"); + let val = _f(cname); + if val.is_null() { + cmd_draw_cluster_huawei + } else { + ::std::mem::transmute(val) + } + }, + cmd_draw_cluster_indirect_huawei: unsafe { + unsafe extern "system" fn cmd_draw_cluster_indirect_huawei( + _command_buffer: CommandBuffer, + _buffer: Buffer, + _offset: DeviceSize, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_draw_cluster_indirect_huawei) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdDrawClusterIndirectHUAWEI\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_draw_cluster_indirect_huawei + } else { + ::std::mem::transmute(val) + } + }, + } } } -#[doc = "Generated from 'VK_HUAWEI_extension_405'"] +#[doc = "Generated from 'VK_HUAWEI_cluster_culling_shader'"] impl PipelineStageFlags2 { - pub const RESEVED_41_HUAWEI: Self = + pub const CLUSTER_CULLING_SHADER_HUAWEI: Self = Self(0b10_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000); } -#[doc = "Generated from 'VK_HUAWEI_extension_405'"] +#[doc = "Generated from 'VK_HUAWEI_cluster_culling_shader'"] +impl QueryPipelineStatisticFlags { + pub const CLUSTER_CULLING_SHADER_INVOCATIONS_HUAWEI: Self = Self(0b10_0000_0000_0000); +} +#[doc = "Generated from 'VK_HUAWEI_cluster_culling_shader'"] impl ShaderStageFlags { - pub const RESERVED_19_HUAWEI: Self = Self(0b1000_0000_0000_0000_0000); + pub const CLUSTER_CULLING_HUAWEI: Self = Self(0b1000_0000_0000_0000_0000); } -impl HuaweiExtension406Fn { +#[doc = "Generated from 'VK_HUAWEI_cluster_culling_shader'"] +impl StructureType { + pub const PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI: Self = Self(1_000_404_000); + pub const PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI: Self = Self(1_000_404_001); +} +impl HuaweiExtension406Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_HUAWEI_extension_406\0") } @@ -21998,18 +22123,20 @@ impl HuaweiExtension415Fn { Self {} } } -impl ArmExtension416Fn { +impl ArmShaderCorePropertiesFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_ARM_extension_416\0") } + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_ARM_shader_core_properties\0") + } } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct ArmExtension416Fn {} -unsafe impl Send for ArmExtension416Fn {} -unsafe impl Sync for ArmExtension416Fn {} -impl ArmExtension416Fn { +pub struct ArmShaderCorePropertiesFn {} +unsafe impl Send for ArmShaderCorePropertiesFn {} +unsafe impl Sync for ArmShaderCorePropertiesFn {} +impl ArmShaderCorePropertiesFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, @@ -22017,6 +22144,10 @@ impl ArmExtension416Fn { Self {} } } +#[doc = "Generated from 'VK_ARM_shader_core_properties'"] +impl StructureType { + pub const PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM: Self = Self(1_000_415_000); +} impl KhrExtension417Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -22055,18 +22186,20 @@ impl ArmExtension418Fn { Self {} } } -impl ExtExtension419Fn { +impl ExtImageSlicedViewOf3dFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_419\0") } + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_image_sliced_view_of_3d\0") + } } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct ExtExtension419Fn {} -unsafe impl Send for ExtExtension419Fn {} -unsafe impl Sync for ExtExtension419Fn {} -impl ExtExtension419Fn { +pub struct ExtImageSlicedViewOf3dFn {} +unsafe impl Send for ExtImageSlicedViewOf3dFn {} +unsafe impl Sync for ExtImageSlicedViewOf3dFn {} +impl ExtImageSlicedViewOf3dFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, @@ -22074,9 +22207,10 @@ impl ExtExtension419Fn { Self {} } } -#[doc = "Generated from 'VK_EXT_extension_419'"] -impl ImageViewCreateFlags { - pub const RESERVED_3_EXT: Self = Self(0b1000); +#[doc = "Generated from 'VK_EXT_image_sliced_view_of_3d'"] +impl StructureType { + pub const PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: Self = Self(1_000_418_000); + pub const IMAGE_VIEW_SLICED_CREATE_INFO_EXT: Self = Self(1_000_418_001); } impl ExtExtension420Fn { #[inline] @@ -22633,25 +22767,6 @@ impl KhrExtension435Fn { Self {} } } -impl NvExtension436Fn { - #[inline] - pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_extension_436\0") } - } - pub const SPEC_VERSION: u32 = 0u32; -} -#[derive(Clone)] -pub struct NvExtension436Fn {} -unsafe impl Send for NvExtension436Fn {} -unsafe impl Sync for NvExtension436Fn {} -impl NvExtension436Fn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - Self {} - } -} impl ExtExtension437Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -24962,25 +25077,6 @@ impl StructureType { pub const PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM: Self = Self(1_000_488_000); } -impl NvExtension490Fn { - #[inline] - pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_extension_490\0") } - } - pub const SPEC_VERSION: u32 = 0u32; -} -#[derive(Clone)] -pub struct NvExtension490Fn {} -unsafe impl Send for NvExtension490Fn {} -unsafe impl Sync for NvExtension490Fn {} -impl NvExtension490Fn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - Self {} - } -} impl NvRayTracingInvocationReorderFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -25168,18 +25264,22 @@ impl StructureType { pub const PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM: Self = Self(1_000_497_000); pub const PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM: Self = Self(1_000_497_001); } -impl ExtExtension499Fn { +impl ExtPipelineLibraryGroupHandlesFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_499\0") } + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"VK_EXT_pipeline_library_group_handles\0", + ) + } } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct ExtExtension499Fn {} -unsafe impl Send for ExtExtension499Fn {} -unsafe impl Sync for ExtExtension499Fn {} -impl ExtExtension499Fn { +pub struct ExtPipelineLibraryGroupHandlesFn {} +unsafe impl Send for ExtPipelineLibraryGroupHandlesFn {} +unsafe impl Sync for ExtPipelineLibraryGroupHandlesFn {} +impl ExtPipelineLibraryGroupHandlesFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, @@ -25187,6 +25287,11 @@ impl ExtExtension499Fn { Self {} } } +#[doc = "Generated from 'VK_EXT_pipeline_library_group_handles'"] +impl StructureType { + pub const PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: Self = + Self(1_000_498_000); +} impl ExtExtension500Fn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -25320,3 +25425,322 @@ impl NvExtension506Fn { Self {} } } +impl KhrExtension507Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_extension_507\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct KhrExtension507Fn {} +unsafe impl Send for KhrExtension507Fn {} +unsafe impl Sync for KhrExtension507Fn {} +impl KhrExtension507Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl ExtExtension508Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_508\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct ExtExtension508Fn {} +unsafe impl Send for ExtExtension508Fn {} +unsafe impl Sync for ExtExtension508Fn {} +impl ExtExtension508Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl ExtExtension509Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_509\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct ExtExtension509Fn {} +unsafe impl Send for ExtExtension509Fn {} +unsafe impl Sync for ExtExtension509Fn {} +impl ExtExtension509Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl MesaExtension510Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_MESA_extension_510\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct MesaExtension510Fn {} +unsafe impl Send for MesaExtension510Fn {} +unsafe impl Sync for MesaExtension510Fn {} +impl MesaExtension510Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl QcomMultiviewPerViewRenderAreasFn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"VK_QCOM_multiview_per_view_render_areas\0", + ) + } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +pub struct QcomMultiviewPerViewRenderAreasFn {} +unsafe impl Send for QcomMultiviewPerViewRenderAreasFn {} +unsafe impl Sync for QcomMultiviewPerViewRenderAreasFn {} +impl QcomMultiviewPerViewRenderAreasFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +#[doc = "Generated from 'VK_QCOM_multiview_per_view_render_areas'"] +impl StructureType { + pub const PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM: Self = + Self(1_000_510_000); + pub const MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM: Self = + Self(1_000_510_001); +} +impl ExtExtension512Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_512\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct ExtExtension512Fn {} +unsafe impl Send for ExtExtension512Fn {} +unsafe impl Sync for ExtExtension512Fn {} +impl ExtExtension512Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl KhrExtension513Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_extension_513\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct KhrExtension513Fn {} +unsafe impl Send for KhrExtension513Fn {} +unsafe impl Sync for KhrExtension513Fn {} +impl KhrExtension513Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl KhrExtension514Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_extension_514\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct KhrExtension514Fn {} +unsafe impl Send for KhrExtension514Fn {} +unsafe impl Sync for KhrExtension514Fn {} +impl KhrExtension514Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl KhrExtension515Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_extension_515\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct KhrExtension515Fn {} +unsafe impl Send for KhrExtension515Fn {} +unsafe impl Sync for KhrExtension515Fn {} +impl KhrExtension515Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl KhrExtension516Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_extension_516\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct KhrExtension516Fn {} +unsafe impl Send for KhrExtension516Fn {} +unsafe impl Sync for KhrExtension516Fn {} +impl KhrExtension516Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl ExtExtension517Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_517\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct ExtExtension517Fn {} +unsafe impl Send for ExtExtension517Fn {} +unsafe impl Sync for ExtExtension517Fn {} +impl ExtExtension517Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +#[doc = "Generated from 'VK_EXT_extension_517'"] +impl DescriptorSetLayoutCreateFlags { + pub const RESERVED_6_EXT: Self = Self(0b100_0000); +} +impl MesaExtension518Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_MESA_extension_518\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct MesaExtension518Fn {} +unsafe impl Send for MesaExtension518Fn {} +unsafe impl Sync for MesaExtension518Fn {} +impl MesaExtension518Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl QcomExtension519Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_QCOM_extension_519\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct QcomExtension519Fn {} +unsafe impl Send for QcomExtension519Fn {} +unsafe impl Sync for QcomExtension519Fn {} +impl QcomExtension519Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl QcomExtension520Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_QCOM_extension_520\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct QcomExtension520Fn {} +unsafe impl Send for QcomExtension520Fn {} +unsafe impl Sync for QcomExtension520Fn {} +impl QcomExtension520Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl QcomExtension521Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_QCOM_extension_521\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct QcomExtension521Fn {} +unsafe impl Send for QcomExtension521Fn {} +unsafe impl Sync for QcomExtension521Fn {} +impl QcomExtension521Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +impl QcomExtension522Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_QCOM_extension_522\0") } + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct QcomExtension522Fn {} +unsafe impl Send for QcomExtension522Fn {} +unsafe impl Sync for QcomExtension522Fn {} +impl QcomExtension522Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} diff --git a/ash/src/vk/native.rs b/ash/src/vk/native.rs index 02edfba5c..1a6b58d96 100644 --- a/ash/src/vk/native.rs +++ b/ash/src/vk/native.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.61.0 */ +/* automatically generated by rust-bindgen 0.63.0 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -7050,42 +7050,48 @@ impl StdVideoEncodeH264ReferenceInfoFlags { #[repr(C)] #[repr(align(4))] #[derive(Debug, Copy, Clone)] -pub struct StdVideoEncodeH264RefMgmtFlags { +pub struct StdVideoEncodeH264ReferenceListsInfoFlags { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, pub __bindgen_padding_0: [u8; 3usize], } #[test] -fn bindgen_test_layout_StdVideoEncodeH264RefMgmtFlags() { +fn bindgen_test_layout_StdVideoEncodeH264ReferenceListsInfoFlags() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(StdVideoEncodeH264RefMgmtFlags)) + concat!( + "Size of: ", + stringify!(StdVideoEncodeH264ReferenceListsInfoFlags) + ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(StdVideoEncodeH264RefMgmtFlags)) + concat!( + "Alignment of ", + stringify!(StdVideoEncodeH264ReferenceListsInfoFlags) + ) ); } -impl StdVideoEncodeH264RefMgmtFlags { +impl StdVideoEncodeH264ReferenceListsInfoFlags { #[inline] - pub fn ref_pic_list_modification_l0_flag(&self) -> u32 { + pub fn ref_pic_list_modification_flag_l0(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } } #[inline] - pub fn set_ref_pic_list_modification_l0_flag(&mut self, val: u32) { + pub fn set_ref_pic_list_modification_flag_l0(&mut self, val: u32) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] - pub fn ref_pic_list_modification_l1_flag(&self) -> u32 { + pub fn ref_pic_list_modification_flag_l1(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } #[inline] - pub fn set_ref_pic_list_modification_l1_flag(&mut self, val: u32) { + pub fn set_ref_pic_list_modification_flag_l1(&mut self, val: u32) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(1usize, 1u8, val as u64) @@ -7093,19 +7099,19 @@ impl StdVideoEncodeH264RefMgmtFlags { } #[inline] pub fn new_bitfield_1( - ref_pic_list_modification_l0_flag: u32, - ref_pic_list_modification_l1_flag: u32, + ref_pic_list_modification_flag_l0: u32, + ref_pic_list_modification_flag_l1: u32, ) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { - let ref_pic_list_modification_l0_flag: u32 = - unsafe { ::std::mem::transmute(ref_pic_list_modification_l0_flag) }; - ref_pic_list_modification_l0_flag as u64 + let ref_pic_list_modification_flag_l0: u32 = + unsafe { ::std::mem::transmute(ref_pic_list_modification_flag_l0) }; + ref_pic_list_modification_flag_l0 as u64 }); __bindgen_bitfield_unit.set(1usize, 1u8, { - let ref_pic_list_modification_l1_flag: u32 = - unsafe { ::std::mem::transmute(ref_pic_list_modification_l1_flag) }; - ref_pic_list_modification_l1_flag as u64 + let ref_pic_list_modification_flag_l1: u32 = + unsafe { ::std::mem::transmute(ref_pic_list_modification_flag_l1) }; + ref_pic_list_modification_flag_l1 as u64 }); __bindgen_bitfield_unit } @@ -7255,34 +7261,39 @@ fn bindgen_test_layout_StdVideoEncodeH264RefPicMarkingEntry() { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct StdVideoEncodeH264RefMemMgmtCtrlOperations { - pub flags: StdVideoEncodeH264RefMgmtFlags, +pub struct StdVideoEncodeH264ReferenceListsInfo { + pub flags: StdVideoEncodeH264ReferenceListsInfoFlags, + pub refPicList0EntryCount: u8, + pub refPicList1EntryCount: u8, pub refList0ModOpCount: u8, - pub pRefList0ModOperations: *const StdVideoEncodeH264RefListModEntry, pub refList1ModOpCount: u8, - pub pRefList1ModOperations: *const StdVideoEncodeH264RefListModEntry, pub refPicMarkingOpCount: u8, + pub reserved1: [u8; 7usize], + pub pRefPicList0Entries: *const u8, + pub pRefPicList1Entries: *const u8, + pub pRefList0ModOperations: *const StdVideoEncodeH264RefListModEntry, + pub pRefList1ModOperations: *const StdVideoEncodeH264RefListModEntry, pub pRefPicMarkingOperations: *const StdVideoEncodeH264RefPicMarkingEntry, } #[test] -fn bindgen_test_layout_StdVideoEncodeH264RefMemMgmtCtrlOperations() { - const UNINIT: ::std::mem::MaybeUninit = +fn bindgen_test_layout_StdVideoEncodeH264ReferenceListsInfo() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 48usize, + ::std::mem::size_of::(), + 56usize, concat!( "Size of: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations) + stringify!(StdVideoEncodeH264ReferenceListsInfo) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations) + stringify!(StdVideoEncodeH264ReferenceListsInfo) ) ); assert_eq!( @@ -7290,67 +7301,117 @@ fn bindgen_test_layout_StdVideoEncodeH264RefMemMgmtCtrlOperations() { 0usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + stringify!(StdVideoEncodeH264ReferenceListsInfo), "::", stringify!(flags) ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).refList0ModOpCount) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).refPicList0EntryCount) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + stringify!(StdVideoEncodeH264ReferenceListsInfo), + "::", + stringify!(refPicList0EntryCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).refPicList1EntryCount) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceListsInfo), + "::", + stringify!(refPicList1EntryCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).refList0ModOpCount) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceListsInfo), "::", stringify!(refList0ModOpCount) ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRefList0ModOperations) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).refList1ModOpCount) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceListsInfo), + "::", + stringify!(refList1ModOpCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).refPicMarkingOpCount) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + stringify!(StdVideoEncodeH264ReferenceListsInfo), "::", - stringify!(pRefList0ModOperations) + stringify!(refPicMarkingOpCount) ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).refList1ModOpCount) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceListsInfo), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pRefPicList0Entries) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + stringify!(StdVideoEncodeH264ReferenceListsInfo), "::", - stringify!(refList1ModOpCount) + stringify!(pRefPicList0Entries) ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRefList1ModOperations) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pRefPicList1Entries) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + stringify!(StdVideoEncodeH264ReferenceListsInfo), "::", - stringify!(pRefList1ModOperations) + stringify!(pRefPicList1Entries) ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).refPicMarkingOpCount) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pRefList0ModOperations) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + stringify!(StdVideoEncodeH264ReferenceListsInfo), "::", - stringify!(refPicMarkingOpCount) + stringify!(pRefList0ModOperations) ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRefPicMarkingOperations) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pRefList1ModOperations) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + stringify!(StdVideoEncodeH264ReferenceListsInfo), + "::", + stringify!(pRefList1ModOperations) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pRefPicMarkingOperations) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceListsInfo), "::", stringify!(pRefPicMarkingOperations) ) @@ -7362,6 +7423,7 @@ pub struct StdVideoEncodeH264PictureInfo { pub flags: StdVideoEncodeH264PictureInfoFlags, pub seq_parameter_set_id: u8, pub pic_parameter_set_id: u8, + pub reserved1: u16, pub pictureType: StdVideoH264PictureType, pub frame_num: u32, pub PicOrderCnt: i32, @@ -7411,6 +7473,16 @@ fn bindgen_test_layout_StdVideoEncodeH264PictureInfo() { stringify!(pic_parameter_set_id) ) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(reserved1) + ) + ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pictureType) as usize - ptr as usize }, 8usize, @@ -7446,6 +7518,7 @@ fn bindgen_test_layout_StdVideoEncodeH264PictureInfo() { #[derive(Debug, Copy, Clone)] pub struct StdVideoEncodeH264ReferenceInfo { pub flags: StdVideoEncodeH264ReferenceInfoFlags, + pub pictureType: StdVideoH264PictureType, pub FrameNum: u32, pub PicOrderCnt: i32, pub long_term_pic_num: u16, @@ -7458,7 +7531,7 @@ fn bindgen_test_layout_StdVideoEncodeH264ReferenceInfo() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 16usize, + 20usize, concat!("Size of: ", stringify!(StdVideoEncodeH264ReferenceInfo)) ); assert_eq!( @@ -7477,8 +7550,18 @@ fn bindgen_test_layout_StdVideoEncodeH264ReferenceInfo() { ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).FrameNum) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pictureType) as usize - ptr as usize }, 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceInfo), + "::", + stringify!(pictureType) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).FrameNum) as usize - ptr as usize }, + 8usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH264ReferenceInfo), @@ -7488,7 +7571,7 @@ fn bindgen_test_layout_StdVideoEncodeH264ReferenceInfo() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize }, - 8usize, + 12usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH264ReferenceInfo), @@ -7498,7 +7581,7 @@ fn bindgen_test_layout_StdVideoEncodeH264ReferenceInfo() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).long_term_pic_num) as usize - ptr as usize }, - 12usize, + 16usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH264ReferenceInfo), @@ -7508,7 +7591,7 @@ fn bindgen_test_layout_StdVideoEncodeH264ReferenceInfo() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).long_term_frame_idx) as usize - ptr as usize }, - 14usize, + 18usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH264ReferenceInfo), @@ -7530,6 +7613,8 @@ pub struct StdVideoEncodeH264SliceHeader { pub disable_deblocking_filter_idc: StdVideoH264DisableDeblockingFilterIdc, pub slice_alpha_c0_offset_div2: i8, pub slice_beta_offset_div2: i8, + pub reserved1: u16, + pub reserved2: u32, pub pWeightTable: *const StdVideoEncodeH264WeightTable, } #[test] @@ -7653,6 +7738,26 @@ fn bindgen_test_layout_StdVideoEncodeH264SliceHeader() { stringify!(slice_beta_offset_div2) ) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(reserved2) + ) + ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pWeightTable) as usize - ptr as usize }, 32usize, @@ -8511,31 +8616,31 @@ fn bindgen_test_layout_StdVideoEncodeH265SliceSegmentHeader() { #[repr(C)] #[repr(align(4))] #[derive(Debug, Copy, Clone)] -pub struct StdVideoEncodeH265ReferenceModificationFlags { +pub struct StdVideoEncodeH265ReferenceListsInfoFlags { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, pub __bindgen_padding_0: [u8; 3usize], } #[test] -fn bindgen_test_layout_StdVideoEncodeH265ReferenceModificationFlags() { +fn bindgen_test_layout_StdVideoEncodeH265ReferenceListsInfoFlags() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 4usize, concat!( "Size of: ", - stringify!(StdVideoEncodeH265ReferenceModificationFlags) + stringify!(StdVideoEncodeH265ReferenceListsInfoFlags) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 4usize, concat!( "Alignment of ", - stringify!(StdVideoEncodeH265ReferenceModificationFlags) + stringify!(StdVideoEncodeH265ReferenceListsInfoFlags) ) ); } -impl StdVideoEncodeH265ReferenceModificationFlags { +impl StdVideoEncodeH265ReferenceListsInfoFlags { #[inline] pub fn ref_pic_list_modification_flag_l0(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } @@ -8579,32 +8684,35 @@ impl StdVideoEncodeH265ReferenceModificationFlags { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct StdVideoEncodeH265ReferenceModifications { - pub flags: StdVideoEncodeH265ReferenceModificationFlags, - pub referenceList0ModificationsCount: u8, - pub pReferenceList0Modifications: *const u8, - pub referenceList1ModificationsCount: u8, - pub pReferenceList1Modifications: *const u8, +pub struct StdVideoEncodeH265ReferenceListsInfo { + pub flags: StdVideoEncodeH265ReferenceListsInfoFlags, + pub num_ref_idx_l0_active_minus1: u8, + pub num_ref_idx_l1_active_minus1: u8, + pub reserved1: u16, + pub pRefPicList0Entries: *const u8, + pub pRefPicList1Entries: *const u8, + pub pRefList0Modifications: *const u8, + pub pRefList1Modifications: *const u8, } #[test] -fn bindgen_test_layout_StdVideoEncodeH265ReferenceModifications() { - const UNINIT: ::std::mem::MaybeUninit = +fn bindgen_test_layout_StdVideoEncodeH265ReferenceListsInfo() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 32usize, + ::std::mem::size_of::(), + 40usize, concat!( "Size of: ", - stringify!(StdVideoEncodeH265ReferenceModifications) + stringify!(StdVideoEncodeH265ReferenceListsInfo) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(StdVideoEncodeH265ReferenceModifications) + stringify!(StdVideoEncodeH265ReferenceListsInfo) ) ); assert_eq!( @@ -8612,57 +8720,83 @@ fn bindgen_test_layout_StdVideoEncodeH265ReferenceModifications() { 0usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), + stringify!(StdVideoEncodeH265ReferenceListsInfo), "::", stringify!(flags) ) ); assert_eq!( unsafe { - ::std::ptr::addr_of!((*ptr).referenceList0ModificationsCount) as usize - ptr as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), + stringify!(StdVideoEncodeH265ReferenceListsInfo), "::", - stringify!(referenceList0ModificationsCount) + stringify!(num_ref_idx_l0_active_minus1) ) ); assert_eq!( unsafe { - ::std::ptr::addr_of!((*ptr).pReferenceList0Modifications) as usize - ptr as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceListsInfo), + "::", + stringify!(num_ref_idx_l1_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceListsInfo), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pRefPicList0Entries) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), + stringify!(StdVideoEncodeH265ReferenceListsInfo), "::", - stringify!(pReferenceList0Modifications) + stringify!(pRefPicList0Entries) ) ); assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).referenceList1ModificationsCount) as usize - ptr as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pRefPicList1Entries) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), + stringify!(StdVideoEncodeH265ReferenceListsInfo), "::", - stringify!(referenceList1ModificationsCount) + stringify!(pRefPicList1Entries) ) ); assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).pReferenceList1Modifications) as usize - ptr as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pRefList0Modifications) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), + stringify!(StdVideoEncodeH265ReferenceListsInfo), + "::", + stringify!(pRefList0Modifications) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pRefList1Modifications) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceListsInfo), "::", - stringify!(pReferenceList1Modifications) + stringify!(pRefList1Modifications) ) ); } @@ -8786,8 +8920,8 @@ pub struct StdVideoEncodeH265PictureInfo { pub sps_video_parameter_set_id: u8, pub pps_seq_parameter_set_id: u8, pub pps_pic_parameter_set_id: u8, - pub PicOrderCntVal: i32, pub TemporalId: u8, + pub PicOrderCntVal: i32, } #[test] fn bindgen_test_layout_StdVideoEncodeH265PictureInfo() { @@ -8796,7 +8930,7 @@ fn bindgen_test_layout_StdVideoEncodeH265PictureInfo() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 20usize, + 16usize, concat!("Size of: ", stringify!(StdVideoEncodeH265PictureInfo)) ); assert_eq!( @@ -8855,23 +8989,23 @@ fn bindgen_test_layout_StdVideoEncodeH265PictureInfo() { ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize }, - 12usize, + unsafe { ::std::ptr::addr_of!((*ptr).TemporalId) as usize - ptr as usize }, + 11usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH265PictureInfo), "::", - stringify!(PicOrderCntVal) + stringify!(TemporalId) ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).TemporalId) as usize - ptr as usize }, - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize }, + 12usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH265PictureInfo), "::", - stringify!(TemporalId) + stringify!(PicOrderCntVal) ) ); } @@ -8947,6 +9081,7 @@ impl StdVideoEncodeH265ReferenceInfoFlags { #[derive(Debug, Copy, Clone)] pub struct StdVideoEncodeH265ReferenceInfo { pub flags: StdVideoEncodeH265ReferenceInfoFlags, + pub PictureType: StdVideoH265PictureType, pub PicOrderCntVal: i32, pub TemporalId: u8, } @@ -8957,7 +9092,7 @@ fn bindgen_test_layout_StdVideoEncodeH265ReferenceInfo() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 12usize, + 16usize, concat!("Size of: ", stringify!(StdVideoEncodeH265ReferenceInfo)) ); assert_eq!( @@ -8976,8 +9111,18 @@ fn bindgen_test_layout_StdVideoEncodeH265ReferenceInfo() { ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).PictureType) as usize - ptr as usize }, 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceInfo), + "::", + stringify!(PictureType) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize }, + 8usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH265ReferenceInfo), @@ -8987,7 +9132,7 @@ fn bindgen_test_layout_StdVideoEncodeH265ReferenceInfo() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).TemporalId) as usize - ptr as usize }, - 8usize, + 12usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH265ReferenceInfo), diff --git a/generator/Cargo.toml b/generator/Cargo.toml index 13926e2f2..ec452617f 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Maik Klein "] edition = "2021" [dependencies] -bindgen = "0.61" +bindgen = "0.63" heck = "0.4" itertools = "0.10" nom = "7.1" @@ -13,7 +13,7 @@ once_cell = "1.7" proc-macro2 = "1.0" quote = "1.0" regex = "1.4" -vk-parse = { version = "0.9", features = ["vkxml-convert"] } +vk-parse = { version = "0.10", features = ["vkxml-convert"] } vkxml = "0.3" [dependencies.syn] diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index 00671c64b..fa204df59 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit 00671c64ba5c488ade22ad572a0ef81d5e64c803 +Subproject commit fa204df59c6caea6b9be3cf0754a88cd89056a87 diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 625f87644..b1b8ca087 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -26,6 +26,12 @@ use std::{ }; use syn::Ident; +const DESIRED_API: &str = "vulkan"; + +fn contains_desired_api(api: &str) -> bool { + api.split(',').any(|n| n == DESIRED_API) +} + macro_rules! get_variant { ($variant:path) => { |enum_| match enum_ { @@ -41,8 +47,6 @@ macro_rules! get_variant { }; } -const BACKWARDS_COMPATIBLE_ALIAS_COMMENT: &str = "Backwards-compatible alias containing a typo"; - pub trait ExtensionExt {} #[derive(Copy, Clone, Debug)] pub enum CType { @@ -311,17 +315,9 @@ pub trait ConstantExt { fn is_alias(&self) -> bool { false } - fn doc_attribute(&self) -> TokenStream { - assert_ne!( - self.notation(), - Some(BACKWARDS_COMPATIBLE_ALIAS_COMMENT), - "Backwards-compatible constants should not be emitted" - ); - match self.formatted_notation() { - Some(n) if n.starts_with("Alias") => quote!(#[deprecated = #n]), - Some(n) => quote!(#[doc = #n]), - None => quote!(), - } + fn is_deprecated(&self) -> bool; + fn doc_attribute(&self) -> Option { + self.formatted_notation().map(|n| quote!(#[doc = #n])) } } @@ -335,6 +331,9 @@ impl ConstantExt for vkxml::ExtensionEnum { fn notation(&self) -> Option<&str> { self.notation.as_deref() } + fn is_deprecated(&self) -> bool { + todo!() + } } impl ConstantExt for vk_parse::Enum { @@ -352,6 +351,9 @@ impl ConstantExt for vk_parse::Enum { fn is_alias(&self) -> bool { matches!(self.spec, vk_parse::EnumSpec::Alias { .. }) } + fn is_deprecated(&self) -> bool { + self.deprecated.is_some() + } } impl ConstantExt for vkxml::Constant { @@ -364,6 +366,9 @@ impl ConstantExt for vkxml::Constant { fn notation(&self) -> Option<&str> { self.notation.as_deref() } + fn is_deprecated(&self) -> bool { + todo!() + } } #[derive(Clone, Debug)] @@ -927,6 +932,7 @@ fn generate_function_pointers<'a>( let params: Vec<_> = cmd .params .iter() + .filter(|param| matches!(param.api.as_deref(), None | Some(DESIRED_API))) .map(|param| { let name = param.param_ident(); let ty = param.type_tokens(true); @@ -1072,6 +1078,10 @@ impl<'a> ConstantExt for ExtensionConstant<'a> { fn notation(&self) -> Option<&str> { self.notation } + fn is_deprecated(&self) -> bool { + // We won't create this struct if the extension constant was deprecated + false + } } pub fn generate_extension_constants<'a>( @@ -1083,8 +1093,12 @@ pub fn generate_extension_constants<'a>( ) -> TokenStream { let items = extension_items .iter() - .filter_map(get_variant!(vk_parse::ExtensionChild::Require { items })) - .flatten(); + .filter_map(get_variant!(vk_parse::ExtensionChild::Require { + api, + items + })) + .filter(|(api, _items)| matches!(api.as_deref(), None | Some(DESIRED_API))) + .flat_map(|(_api, items)| items); let mut extended_enums = BTreeMap::>::new(); @@ -1094,7 +1108,11 @@ pub fn generate_extension_constants<'a>( continue; } - if enum_.comment.as_deref() == Some(BACKWARDS_COMPATIBLE_ALIAS_COMMENT) { + if !matches!(enum_.api.as_deref(), None | Some(DESIRED_API)) { + continue; + } + + if enum_.deprecated.is_some() { continue; } @@ -1154,8 +1172,12 @@ pub fn generate_extension_commands<'a>( let mut aliases = HashMap::new(); let names = items .iter() - .filter_map(get_variant!(vk_parse::ExtensionChild::Require { items })) - .flatten() + .filter_map(get_variant!(vk_parse::ExtensionChild::Require { + api, + items + })) + .filter(|(api, _items)| matches!(api.as_deref(), None | Some(DESIRED_API))) + .flat_map(|(_api, items)| items) .filter_map(get_variant!(vk_parse::InterfaceItem::Command { name })); for name in names { if let Some(cmd) = cmd_map.get(name).copied() { @@ -1236,6 +1258,7 @@ pub fn generate_extension<'a>( } pub fn generate_define( define: &vk_parse::Type, + allowed_types: &HashSet<&str>, identifier_renames: &mut BTreeMap, ) -> TokenStream { let vk_parse::TypeSpec::Code(spec) = &define.spec else { @@ -1244,6 +1267,11 @@ pub fn generate_define( let [vk_parse::TypeCodeMarkup::Name(define_name), ..] = &spec.markup[..] else { return quote!(); }; + + if !allowed_types.contains(define_name.as_str()) { + return quote!(); + } + let name = constant_name(define_name); let ident = format_ident!("{}", name); @@ -1257,7 +1285,14 @@ pub fn generate_define( let deprecated = comment .and_then(|c| c.trim().strip_prefix("DEPRECATED: ")) - .map(|comment| (quote!(#[deprecated = #comment]))); + .map(|comment| quote!(#[deprecated = #comment])) + .or_else(|| match define.deprecated.as_ref()?.as_str() { + "true" => Some(quote!(#[deprecated])), + "aliased" => { + Some(quote!(#[deprecated = "an old name not following Vulkan conventions"])) + } + x => panic!("Unknown deprecation reason {}", x), + }); let (code, ident) = if let Some(parameters) = parameters { let params = parameters @@ -1425,7 +1460,7 @@ pub fn bitflags_impl_block( ) -> TokenStream { let variants = constants .iter() - .filter(|constant| constant.notation() != Some(BACKWARDS_COMPATIBLE_ALIAS_COMMENT)) + .filter(|constant| !constant.is_deprecated()) .map(|constant| { let variant_ident = constant.variant_ident(enum_name); let notation = constant.doc_attribute(); @@ -1463,7 +1498,7 @@ pub fn generate_enum<'a>( .children .iter() .filter_map(get_variant!(vk_parse::EnumsChild::Enum)) - .filter(|constant| constant.notation() != Some(BACKWARDS_COMPATIBLE_ALIAS_COMMENT)) + .filter(|constant| !constant.is_deprecated()) .collect_vec(); let mut values = Vec::with_capacity(constants.len()); @@ -1577,18 +1612,13 @@ pub fn generate_result(ident: Ident, enum_: &vk_parse::Enums) -> TokenStream { } fn is_static_array(field: &vkxml::Field) -> bool { - field - .array - .as_ref() - .map(|ty| matches!(ty, vkxml::ArrayType::Static)) - .unwrap_or(false) + matches!(field.array, Some(vkxml::ArrayType::Static)) } -pub fn derive_default(struct_: &vkxml::Struct) -> Option { +pub fn derive_default( + struct_: &vkxml::Struct, + members: &[(&vkxml::Field, Option)], +) -> Option { let name = name_to_tokens(&struct_.name); - let members = struct_ - .elements - .iter() - .filter_map(get_variant!(vkxml::StructElement::Member)); let is_structure_type = |field: &vkxml::Field| field.basetype == "VkStructureType"; // These are also pointers, and therefor also don't implement Default. The spec @@ -1606,13 +1636,18 @@ pub fn derive_default(struct_: &vkxml::Struct) -> Option { "MTLSharedEvent_id", "MTLTexture_id", ]; - let contains_ptr = members.clone().any(|field| field.reference.is_some()); - let contains_structure_type = members.clone().any(is_structure_type); - let contains_static_array = members.clone().any(is_static_array); + let contains_ptr = members + .iter() + .cloned() + .any(|(field, _)| field.reference.is_some()); + let contains_structure_type = members.iter().map(|(f, _)| *f).any(is_structure_type); + let contains_static_array = members.iter().map(|(f, _)| *f).any(is_static_array); + let contains_deprecated = members.iter().any(|(_, d)| d.is_some()); + let allow_deprecated = contains_deprecated.then(|| quote!(#[allow(deprecated)])); if !(contains_ptr || contains_structure_type || contains_static_array) { return None; }; - let default_fields = members.clone().map(|field| { + let default_fields = members.iter().map(|(field, _)| { let param_ident = field.param_ident(); if is_structure_type(field) { if field.type_enums.is_some() { @@ -1645,6 +1680,7 @@ pub fn derive_default(struct_: &vkxml::Struct) -> Option { impl ::std::default::Default for #name { #[inline] fn default() -> Self { + #allow_deprecated Self { #( #default_fields @@ -1655,13 +1691,13 @@ pub fn derive_default(struct_: &vkxml::Struct) -> Option { }; Some(q) } -pub fn derive_debug(struct_: &vkxml::Struct, union_types: &HashSet<&str>) -> Option { +pub fn derive_debug( + struct_: &vkxml::Struct, + members: &[(&vkxml::Field, Option)], + union_types: &HashSet<&str>, +) -> Option { let name = name_to_tokens(&struct_.name); - let members = struct_ - .elements - .iter() - .filter_map(get_variant!(vkxml::StructElement::Member)); - let contains_pfn = members.clone().any(|field| { + let contains_pfn = members.iter().any(|(field, _)| { field .name .as_ref() @@ -1669,15 +1705,15 @@ pub fn derive_debug(struct_: &vkxml::Struct, union_types: &HashSet<&str>) -> Opt .unwrap_or(false) }); let contains_static_array = members - .clone() - .any(|x| is_static_array(x) && x.basetype == "char"); + .iter() + .any(|(x, _)| is_static_array(x) && x.basetype == "char"); let contains_union = members - .clone() - .any(|field| union_types.contains(field.basetype.as_str())); + .iter() + .any(|(field, _)| union_types.contains(field.basetype.as_str())); if !(contains_union || contains_static_array || contains_pfn) { return None; } - let debug_fields = members.clone().map(|field| { + let debug_fields = members.iter().map(|(field, _)| { let param_ident = field.param_ident(); let param_str = param_ident.to_string(); let debug_value = if is_static_array(field) && field.basetype == "char" { @@ -1717,6 +1753,7 @@ pub fn derive_debug(struct_: &vkxml::Struct, union_types: &HashSet<&str>) -> Opt pub fn derive_setters( struct_: &vkxml::Struct, + members: &[(&vkxml::Field, Option)], root_structs: &HashSet, ) -> Option { if &struct_.name == "VkBaseInStructure" @@ -1730,18 +1767,13 @@ pub fn derive_setters( let name = name_to_tokens(&struct_.name); let name_builder = name_to_tokens(&(struct_.name.clone() + "Builder")); - let members = struct_ - .elements - .iter() - .filter_map(get_variant!(vkxml::StructElement::Member)); - let next_field = members - .clone() - .find(|field| field.param_ident() == "p_next"); + .iter() + .find(|(field, _)| field.param_ident() == "p_next"); let structure_type_field = members - .clone() - .find(|field| field.param_ident() == "s_type"); + .iter() + .find(|(field, _)| field.param_ident() == "s_type"); // Must either have both, or none: assert_eq!(next_field.is_some(), structure_type_field.is_some()); @@ -1752,8 +1784,8 @@ pub fn derive_setters( ("VkDescriptorSetLayoutBinding", "pImmutableSamplers"), ]; let filter_members: Vec = members - .clone() - .filter_map(|field| { + .iter() + .filter_map(|(field, _)| { let field_name = field.name.as_ref().unwrap(); // Associated _count members @@ -1774,7 +1806,8 @@ pub fn derive_setters( }) .collect(); - let setters = members.clone().filter_map(|field| { + let setters = members.iter().filter_map(|(field, deprecated)| { + let deprecated = deprecated.as_ref().map(|d| quote!(#d #[allow(deprecated)])); let param_ident = field.param_ident(); let param_ty_tokens = field.safe_type_tokens(quote!('a), None); @@ -1834,6 +1867,7 @@ pub fn derive_setters( assert_eq!(field.size, None); return Some(quote!{ #[inline] + #deprecated pub fn #param_ident_short(mut self, #param_ident_short: &'a ::std::ffi::CStr) -> Self { self.inner.#param_ident = #param_ident_short.as_ptr(); self @@ -1880,7 +1914,7 @@ pub fn derive_setters( let array_size_ident = format_ident!("{}", array_size.to_snake_case()); - let size_field = members.clone().find(|m| m.name.as_deref() == Some(array_size)).unwrap(); + let size_field = members.iter().map(|(m, _)| m).find(|m| m.name.as_deref() == Some(array_size)).unwrap(); let cast = if size_field.basetype == "size_t" { quote!() @@ -1895,6 +1929,7 @@ pub fn derive_setters( return Some(quote! { #[inline] + #deprecated pub fn #param_ident_short(mut self, #param_ident_short: &'a #mutable #slice_param_ty_tokens) -> Self { #set_size_stmt self.inner.#param_ident = #param_ident_short #ptr; @@ -1908,6 +1943,7 @@ pub fn derive_setters( if field.basetype == "VkBool32" { return Some(quote!{ #[inline] + #deprecated pub fn #param_ident_short(mut self, #param_ident_short: bool) -> Self { self.inner.#param_ident = #param_ident_short.into(); self @@ -1924,6 +1960,7 @@ pub fn derive_setters( Some(quote!{ #[inline] + #deprecated pub fn #param_ident_short(mut self, #param_ident_short: #param_ty_tokens) -> Self { self.inner.#param_ident = #param_ident_short; self @@ -1937,7 +1974,7 @@ pub fn derive_setters( let root_struct_next_field = next_field.filter(|_| root_structs.contains(&name)); // We only implement a next methods for root structs with a `pnext` field. - let next_function = if let Some(next_field) = root_struct_next_field { + let next_function = if let Some((next_field, _)) = root_struct_next_field { assert_eq!(next_field.basetype, "void"); let mutability = if next_field.is_const { quote!(const) @@ -1994,7 +2031,7 @@ pub fn derive_setters( } }); - let impl_structure_type_trait = structure_type_field.map(|s_type| { + let impl_structure_type_trait = structure_type_field.map(|(s_type, _)| { let value = s_type .type_enums .as_deref() @@ -2074,10 +2111,16 @@ pub fn manual_derives(struct_: &vkxml::Struct) -> TokenStream { } pub fn generate_struct( struct_: &vkxml::Struct, + vk_parse_types: &HashMap, root_structs: &HashSet, union_types: &HashSet<&str>, ) -> TokenStream { let name = name_to_tokens(&struct_.name); + let vk_parse_struct = vk_parse_types[&struct_.name]; + let vk_parse::TypeSpec::Members(vk_parse_members) = &vk_parse_struct.spec else { + panic!() + }; + if &struct_.name == "VkTransformMatrixKHR" { return quote! { #[repr(C)] @@ -2147,9 +2190,31 @@ pub fn generate_struct( let members = struct_ .elements .iter() - .filter_map(get_variant!(vkxml::StructElement::Member)); + .filter_map(get_variant!(vkxml::StructElement::Member)) + .zip( + vk_parse_members + .iter() + .filter_map(get_variant!(vk_parse::TypeMember::Definition)), + ) + .filter(|(_, vk_parse_field)| { + matches!(vk_parse_field.api.as_deref(), None | Some(DESIRED_API)) + }) + .map(|(field, vk_parse_field)| { + let deprecation = vk_parse_field + .deprecated + .as_ref() + .map(|deprecated| match deprecated.as_str() { + "true" => quote!(#[deprecated]), + "ignored" => { + quote!(#[deprecated = "functionality described by this member no longer operates"]) + } + x => panic!("Unknown deprecation reason {}", x), + }); + (field, deprecation) + }) + .collect::>(); - let params = members.clone().map(|field| { + let params = members.iter().map(|(field, deprecation)| { let param_ident = field.param_ident(); let param_ty_tokens = if field.basetype == struct_.name { let pointer = field @@ -2160,12 +2225,13 @@ pub fn generate_struct( } else { field.type_tokens(false) }; - quote! {pub #param_ident: #param_ty_tokens} + + quote!(#deprecation pub #param_ident: #param_ty_tokens) }); - let debug_tokens = derive_debug(struct_, union_types); - let default_tokens = derive_default(struct_); - let setter_tokens = derive_setters(struct_, root_structs); + let debug_tokens = derive_debug(struct_, &members, union_types); + let default_tokens = derive_default(struct_, &members); + let setter_tokens = derive_setters(struct_, &members, root_structs); let manual_derive_tokens = manual_derives(struct_); let dbg_str = if debug_tokens.is_none() { quote!(#[cfg_attr(feature = "debug", derive(Debug))]) @@ -2266,45 +2332,88 @@ fn generate_union(union: &vkxml::Union) -> TokenStream { } } /// Root structs are all structs that are extended by other structs. -pub fn root_structs(definitions: &[&vkxml::DefinitionsElement]) -> HashSet { - let mut root_structs = HashSet::new(); +pub fn root_structs( + definitions: &[&vk_parse::Type], + allowed_types: &HashSet<&str>, +) -> HashSet { // Loop over all structs and collect their extends - for definition in definitions { - if let vkxml::DefinitionsElement::Struct(ref struct_) = definition { - if let Some(extends) = &struct_.extends { - root_structs.extend(extends.split(',').map(name_to_tokens)); - } - }; - } - root_structs + definitions + .iter() + .filter(|type_| { + type_ + .name + .as_ref() + .map_or(false, |name| allowed_types.contains(name.as_str())) + }) + .filter_map(|type_| type_.structextends.as_ref()) + .flat_map(|e| e.split(',')) + .map(name_to_tokens) + .collect() } pub fn generate_definition_vk_parse( definition: &vk_parse::Type, + allowed_types: &HashSet<&str>, identifier_renames: &mut BTreeMap, ) -> Option { + if let Some(api) = &definition.api { + if api != DESIRED_API { + return None; + } + } + match definition.category.as_deref() { - Some("define") => Some(generate_define(definition, identifier_renames)), + Some("define") => Some(generate_define( + definition, + allowed_types, + identifier_renames, + )), _ => None, } } +#[allow(clippy::too_many_arguments)] pub fn generate_definition( definition: &vkxml::DefinitionsElement, + allowed_types: &HashSet<&str>, union_types: &HashSet<&str>, root_structs: &HashSet, + vk_parse_types: &HashMap, bitflags_cache: &mut HashSet, const_values: &mut BTreeMap, ) -> Option { match *definition { - vkxml::DefinitionsElement::Typedef(ref typedef) => Some(generate_typedef(typedef)), - vkxml::DefinitionsElement::Struct(ref struct_) => { - Some(generate_struct(struct_, root_structs, union_types)) + vkxml::DefinitionsElement::Typedef(ref typedef) + if allowed_types.contains(typedef.name.as_str()) => + { + Some(generate_typedef(typedef)) + } + vkxml::DefinitionsElement::Struct(ref struct_) + if allowed_types.contains(struct_.name.as_str()) => + { + Some(generate_struct( + struct_, + vk_parse_types, + root_structs, + union_types, + )) } - vkxml::DefinitionsElement::Bitmask(ref mask) => { + vkxml::DefinitionsElement::Bitmask(ref mask) + if allowed_types.contains(mask.name.as_str()) => + { generate_bitmask(mask, bitflags_cache, const_values) } - vkxml::DefinitionsElement::Handle(ref handle) => generate_handle(handle), - vkxml::DefinitionsElement::FuncPtr(ref fp) => Some(generate_funcptr(fp)), - vkxml::DefinitionsElement::Union(ref union) => Some(generate_union(union)), + vkxml::DefinitionsElement::Handle(ref handle) + if allowed_types.contains(handle.name.as_str()) => + { + generate_handle(handle) + } + vkxml::DefinitionsElement::FuncPtr(ref fp) if allowed_types.contains(fp.name.as_str()) => { + Some(generate_funcptr(fp)) + } + vkxml::DefinitionsElement::Union(ref union) + if allowed_types.contains(union.name.as_str()) => + { + Some(generate_union(union)) + } _ => None, } } @@ -2313,6 +2422,10 @@ pub fn generate_feature<'a>( commands: &CommandMap<'a>, fn_cache: &mut HashSet<&'a str>, ) -> TokenStream { + if !contains_desired_api(&feature.api) { + return quote!(); + } + let (static_commands, entry_commands, device_commands, instance_commands) = feature .elements .iter() @@ -2404,6 +2517,7 @@ pub fn generate_feature_extension<'a>( .0 .iter() .filter_map(get_variant!(vk_parse::RegistryChild::Feature)) + .filter(|feature| contains_desired_api(&feature.api)) .map(|feature| { generate_extension_constants( &feature.name, @@ -2556,6 +2670,7 @@ pub fn extract_native_types(registry: &vk_parse::Registry) -> (Vec<(String, Stri } pub fn generate_aliases_of_types( types: &vk_parse::Types, + allowed_types: &HashSet<&str>, ty_cache: &mut HashSet, ) -> TokenStream { let aliases = types @@ -2564,6 +2679,9 @@ pub fn generate_aliases_of_types( .filter_map(get_variant!(vk_parse::TypesChild::Type)) .filter_map(|ty| { let name = ty.name.as_ref()?; + if !allowed_types.contains(name.as_str()) { + return None; + } let alias = ty.alias.as_ref()?; let name_ident = name_to_tokens(name); if !ty_cache.insert(name_ident.clone()) { @@ -2584,38 +2702,30 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { use std::fs::File; use std::io::Write; let (spec2, _errors) = vk_parse::parse_file(&vk_xml).expect("Invalid xml file"); - let extensions: &Vec = spec2 + let extensions: Vec<&vk_parse::Extension> = spec2 .0 .iter() .find_map(get_variant!(vk_parse::RegistryChild::Extensions)) - .map(|ext| &ext.children) - .expect("extension"); - let mut ty_cache = HashSet::new(); - let aliases: Vec<_> = spec2 - .0 + .expect("extension") + .children .iter() - .filter_map(get_variant!(vk_parse::RegistryChild::Types)) - .map(|ty| generate_aliases_of_types(ty, &mut ty_cache)) + .filter(|e| { + if let Some(supported) = &e.supported { + contains_desired_api(supported) || + // Backwards-compatibility with ash 0.37: + // Keep extension 196 disabled as it aliases an undefined constant + (supported == "disabled" && e.number != Some(196)) || + // VK_ANDROID_native_buffer is for internal use only, but types defined elsewhere + // reference enum extension constants. Exempt the extension from this check until + // types are properly folded in with their extension (where applicable). + e.name == "VK_ANDROID_native_buffer" + } else { + true + } + }) .collect(); let spec = vk_parse::parse_file_as_vkxml(&vk_xml).expect("Invalid xml file."); - let cmd_aliases: HashMap = spec2 - .0 - .iter() - .filter_map(get_variant!(vk_parse::RegistryChild::Commands)) - .flat_map(|cmds| &cmds.children) - .filter_map(get_variant!(vk_parse::Command::Alias { name, alias })) - .map(|(name, alias)| (name.to_string(), alias.to_string())) - .collect(); - - let commands: CommandMap<'_> = spec2 - .0 - .iter() - .filter_map(get_variant!(vk_parse::RegistryChild::Commands)) - .flat_map(|cmds| &cmds.children) - .filter_map(get_variant!(vk_parse::Command::Definition)) - .map(|cmd| (cmd.proto.name.clone(), cmd)) - .collect(); let features: Vec<&vkxml::Feature> = spec .elements @@ -2638,6 +2748,53 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { .flat_map(|constants| &constants.elements) .collect(); + let features_children = spec2 + .0 + .iter() + .filter_map(get_variant!(vk_parse::RegistryChild::Feature)) + .filter(|feature| contains_desired_api(&feature.api)) + .flat_map(|features| &features.children); + + let extension_children = extensions.iter().flat_map(|extension| &extension.children); + + let (required_types, required_commands) = features_children + .chain(extension_children) + .filter_map(get_variant!(vk_parse::FeatureChild::Require { api, items })) + .filter(|(api, _items)| matches!(api.as_deref(), None | Some(DESIRED_API))) + .flat_map(|(_api, items)| items) + .fold((HashSet::new(), HashSet::new()), |mut acc, elem| { + match elem { + vk_parse::InterfaceItem::Type { name, .. } => { + acc.0.insert(name.as_str()); + } + vk_parse::InterfaceItem::Command { name, .. } => { + acc.1.insert(name.as_str()); + } + _ => {} + }; + acc + }); + + let commands: CommandMap<'_> = spec2 + .0 + .iter() + .filter_map(get_variant!(vk_parse::RegistryChild::Commands)) + .flat_map(|cmds| &cmds.children) + .filter_map(get_variant!(vk_parse::Command::Definition)) + .filter(|cmd| required_commands.contains(&cmd.proto.name.as_str())) + .map(|cmd| (cmd.proto.name.clone(), cmd)) + .collect(); + + let cmd_aliases: HashMap = spec2 + .0 + .iter() + .filter_map(get_variant!(vk_parse::RegistryChild::Commands)) + .flat_map(|cmds| &cmds.children) + .filter_map(get_variant!(vk_parse::Command::Alias { name, alias })) + .filter(|(name, _alias)| required_commands.contains(name.as_str())) + .map(|(name, alias)| (name.to_string(), alias.to_string())) + .collect(); + let mut fn_cache = HashSet::new(); let mut bitflags_cache = HashSet::new(); let mut const_cache = HashSet::new(); @@ -2649,6 +2806,11 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { .iter() .filter_map(get_variant!(vk_parse::RegistryChild::Enums)) .filter(|enums| enums.kind.is_some()) + .filter(|enums| { + enums.name.as_ref().map_or(true, |n| { + required_types.contains(n.replace("FlagBits", "Flags").as_str()) + }) + }) .map(|e| generate_enum(e, &mut const_cache, &mut const_values, &mut bitflags_cache)) .fold((Vec::new(), Vec::new()), |mut acc, elem| { match elem { @@ -2687,7 +2849,7 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { let mut identifier_renames = BTreeMap::new(); - let vk_parse_definitions: Vec<_> = spec2 + let vk_parse_types = spec2 .0 .iter() .filter_map(get_variant!(vk_parse::RegistryChild::Types)) @@ -2696,23 +2858,43 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { .iter() .filter_map(get_variant!(vk_parse::TypesChild::Type)) }) - .filter_map(|def| generate_definition_vk_parse(def, &mut identifier_renames)) + .collect::>(); + let vk_parse_definitions: Vec<_> = vk_parse_types + .iter() + .filter_map(|def| { + generate_definition_vk_parse(def, &required_types, &mut identifier_renames) + }) .collect(); - let root_structs = root_structs(&definitions); + let root_structs = root_structs(&vk_parse_types, &required_types); + + let vk_parse_types = vk_parse_types + .into_iter() + .filter_map(|t| t.name.clone().map(|n| (n, t))) + .collect::>(); let definition_code: Vec<_> = vk_parse_definitions .into_iter() .chain(definitions.into_iter().filter_map(|def| { generate_definition( def, + &required_types, &union_types, &root_structs, + &vk_parse_types, &mut bitflags_cache, &mut const_values, ) })) .collect(); + let mut ty_cache = HashSet::new(); + let aliases: Vec<_> = spec2 + .0 + .iter() + .filter_map(get_variant!(vk_parse::RegistryChild::Types)) + .map(|ty| generate_aliases_of_types(ty, &required_types, &mut ty_cache)) + .collect(); + let feature_code: Vec<_> = features .iter() .map(|feature| generate_feature(feature, &commands, &mut fn_cache))