diff --git a/ash/src/extensions/ext/mod.rs b/ash/src/extensions/ext/mod.rs index a5a1c68..e25806e 100644 --- a/ash/src/extensions/ext/mod.rs +++ b/ash/src/extensions/ext/mod.rs @@ -7,6 +7,7 @@ pub use self::debug_utils::DebugUtils; pub use self::extended_dynamic_state::ExtendedDynamicState; pub use self::full_screen_exclusive::FullScreenExclusive; pub use self::metal_surface::MetalSurface; +pub use self::physical_device_drm::PhysicalDeviceDrm; pub use self::tooling_info::ToolingInfo; mod buffer_device_address; @@ -18,4 +19,5 @@ mod debug_utils; mod extended_dynamic_state; mod full_screen_exclusive; mod metal_surface; +mod physical_device_drm; mod tooling_info; diff --git a/ash/src/extensions/ext/physical_device_drm.rs b/ash/src/extensions/ext/physical_device_drm.rs new file mode 100644 index 0000000..56ca314 --- /dev/null +++ b/ash/src/extensions/ext/physical_device_drm.rs @@ -0,0 +1,24 @@ +use crate::vk; +use crate::Instance; +use std::ffi::CStr; + +#[derive(Clone)] +pub struct PhysicalDeviceDrm; + +impl PhysicalDeviceDrm { + pub unsafe fn get_properties( + instance: &Instance, + pdevice: vk::PhysicalDevice, + ) -> vk::PhysicalDeviceDrmPropertiesEXT { + let mut props_drm = vk::PhysicalDeviceDrmPropertiesEXT::default(); + { + let mut props = vk::PhysicalDeviceProperties2::builder().push_next(&mut props_drm); + instance.get_physical_device_properties2(pdevice, &mut props); + } + props_drm + } + + pub fn name() -> &'static CStr { + vk::ExtPhysicalDeviceDrmFn::name() + } +} diff --git a/ash/src/vk.rs b/ash/src/vk.rs index ebeef53..828b06c 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -26,6 +26,7 @@ mod features; pub use features::*; #[doc = r" Native bindings from Vulkan headers, generated by bindgen"] #[allow(nonstandard_style)] +#[allow(deref_nullptr)] pub mod native; mod platform_types; pub use platform_types::*; diff --git a/ash/src/vk/const_debugs.rs b/ash/src/vk/const_debugs.rs index 5471548..c60ff9f 100644 --- a/ash/src/vk/const_debugs.rs +++ b/ash/src/vk/const_debugs.rs @@ -65,8 +65,8 @@ impl fmt::Debug for AccelerationStructureCreateFlagsKHR { "DEVICE_ADDRESS_CAPTURE_REPLAY", ), ( - AccelerationStructureCreateFlagsKHR::RESERVED_2_NV.0, - "RESERVED_2_NV", + AccelerationStructureCreateFlagsKHR::MOTION_NV.0, + "MOTION_NV", ), ]; debug_flags(f, KNOWN, self.0) @@ -87,6 +87,33 @@ impl fmt::Debug for AccelerationStructureMemoryRequirementsTypeNV { } } } +impl fmt::Debug for AccelerationStructureMotionInfoFlagsNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for AccelerationStructureMotionInstanceFlagsNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for AccelerationStructureMotionInstanceTypeNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::STATIC => Some("STATIC"), + Self::MATRIX_MOTION => Some("MATRIX_MOTION"), + Self::SRT_MOTION => Some("SRT_MOTION"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} impl fmt::Debug for AccelerationStructureTypeKHR { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -587,10 +614,7 @@ impl fmt::Debug for BuildAccelerationStructureFlagsKHR { BuildAccelerationStructureFlagsKHR::LOW_MEMORY.0, "LOW_MEMORY", ), - ( - BuildAccelerationStructureFlagsKHR::RESERVED_5_NV.0, - "RESERVED_5_NV", - ), + (BuildAccelerationStructureFlagsKHR::MOTION_NV.0, "MOTION_NV"), ]; debug_flags(f, KNOWN, self.0) } @@ -1463,8 +1487,8 @@ impl fmt::Debug for ExternalMemoryHandleTypeFlags { "ZIRCON_VMO_FUCHSIA", ), ( - ExternalMemoryHandleTypeFlags::RESERVED_12_NV.0, - "RESERVED_12_NV", + ExternalMemoryHandleTypeFlags::RDMA_ADDRESS_NV.0, + "RDMA_ADDRESS_NV", ), ( ExternalMemoryHandleTypeFlags::RESERVED_13_NV.0, @@ -2457,7 +2481,7 @@ impl fmt::Debug for MemoryPropertyFlags { MemoryPropertyFlags::DEVICE_UNCACHED_AMD.0, "DEVICE_UNCACHED_AMD", ), - (MemoryPropertyFlags::RESERVED_8_NV.0, "RESERVED_8_NV"), + (MemoryPropertyFlags::RDMA_CAPABLE_NV.0, "RDMA_CAPABLE_NV"), (MemoryPropertyFlags::PROTECTED.0, "PROTECTED"), ]; debug_flags(f, KNOWN, self.0) @@ -2691,6 +2715,7 @@ impl fmt::Debug for PipelineBindPoint { Self::GRAPHICS => Some("GRAPHICS"), Self::COMPUTE => Some("COMPUTE"), Self::RAY_TRACING_KHR => Some("RAY_TRACING_KHR"), + Self::SUBPASS_SHADING_HUAWEI => Some("SUBPASS_SHADING_HUAWEI"), _ => None, }; if let Some(x) = name { @@ -2822,7 +2847,10 @@ impl fmt::Debug for PipelineCreateFlags { ), (PipelineCreateFlags::RESERVED_23_AMD.0, "RESERVED_23_AMD"), (PipelineCreateFlags::RESERVED_10_AMD.0, "RESERVED_10_AMD"), - (PipelineCreateFlags::RESERVED_20_NV.0, "RESERVED_20_NV"), + ( + PipelineCreateFlags::RAY_TRACING_ALLOW_MOTION_NV.0, + "RAY_TRACING_ALLOW_MOTION_NV", + ), ( PipelineCreateFlags::VIEW_INDEX_FROM_DEVICE_INDEX.0, "VIEW_INDEX_FROM_DEVICE_INDEX", @@ -3101,6 +3129,10 @@ impl fmt::Debug for PipelineStageFlags2KHR { ), (PipelineStageFlags2KHR::TASK_SHADER_NV.0, "TASK_SHADER_NV"), (PipelineStageFlags2KHR::MESH_SHADER_NV.0, "MESH_SHADER_NV"), + ( + PipelineStageFlags2KHR::SUBPASS_SHADING_HUAWEI.0, + "SUBPASS_SHADING_HUAWEI", + ), ( PipelineStageFlags2KHR::RESERVED_40_HUAWEI.0, "RESERVED_40_HUAWEI", @@ -3735,6 +3767,10 @@ impl fmt::Debug for ShaderStageFlags { (ShaderStageFlags::CALLABLE_KHR.0, "CALLABLE_KHR"), (ShaderStageFlags::TASK_NV.0, "TASK_NV"), (ShaderStageFlags::MESH_NV.0, "MESH_NV"), + ( + ShaderStageFlags::SUBPASS_SHADING_HUAWEI.0, + "SUBPASS_SHADING_HUAWEI", + ), ]; debug_flags(f, KNOWN, self.0) } @@ -4720,6 +4756,15 @@ impl fmt::Debug for StructureType { Self::PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV => { Some("PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV") } + Self::ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV => { + Some("ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV") + } + Self::PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV => { + Some("PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV") + } + Self::ACCELERATION_STRUCTURE_MOTION_INFO_NV => { + Some("ACCELERATION_STRUCTURE_MOTION_INFO_NV") + } Self::PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT => { Some("PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT") } @@ -4766,6 +4811,7 @@ impl fmt::Debug for StructureType { Self::VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT => { Some("VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT") } + Self::PHYSICAL_DEVICE_DRM_PROPERTIES_EXT => Some("PHYSICAL_DEVICE_DRM_PROPERTIES_EXT"), Self::IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA => { Some("IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA") } @@ -4781,6 +4827,19 @@ impl fmt::Debug for StructureType { Self::SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA => { Some("SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA") } + Self::SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI => { + Some("SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI") + } + Self::PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI => { + Some("PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI") + } + Self::PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI => { + Some("PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI") + } + Self::MEMORY_GET_REMOTE_ADDRESS_INFO_NV => Some("MEMORY_GET_REMOTE_ADDRESS_INFO_NV"), + Self::PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV => { + Some("PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV") + } Self::PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT => { Some("PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT") } @@ -4797,6 +4856,12 @@ impl fmt::Debug for StructureType { Self::QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT => { Some("QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT") } + Self::PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT") + } + Self::PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT => { + Some("PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT") + } Self::PHYSICAL_DEVICE_SUBGROUP_PROPERTIES => { Some("PHYSICAL_DEVICE_SUBGROUP_PROPERTIES") } diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index 9c19d7a..9a439eb 100644 --- a/ash/src/vk/definitions.rs +++ b/ash/src/vk/definitions.rs @@ -53,7 +53,7 @@ pub const API_VERSION_1_0: u32 = make_api_version(0, 1, 0, 0); pub const API_VERSION_1_1: u32 = make_api_version(0, 1, 1, 0); #[doc = ""] pub const API_VERSION_1_2: u32 = make_api_version(0, 1, 2, 0); -pub const HEADER_VERSION: u32 = 181u32; +pub const HEADER_VERSION: u32 = 184u32; #[doc = ""] pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 2, HEADER_VERSION); #[doc = ""] @@ -155,6 +155,16 @@ pub struct DescriptorUpdateTemplateCreateFlags(pub(crate) Flags); vk_bitflags_wrapped!(DescriptorUpdateTemplateCreateFlags, 0b0, Flags); #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct AccelerationStructureMotionInfoFlagsNV(pub(crate) Flags); +vk_bitflags_wrapped!(AccelerationStructureMotionInfoFlagsNV, 0b0, Flags); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct AccelerationStructureMotionInstanceFlagsNV(pub(crate) Flags); +vk_bitflags_wrapped!(AccelerationStructureMotionInstanceFlagsNV, 0b0, Flags); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] #[doc = ""] pub struct DisplayModeCreateFlagsKHR(pub(crate) Flags); vk_bitflags_wrapped!(DisplayModeCreateFlagsKHR, 0b0, Flags); @@ -6334,6 +6344,79 @@ impl<'a> PipelineCacheCreateInfoBuilder<'a> { } } #[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PipelineCacheHeaderVersionOne { + pub header_size: u32, + pub header_version: PipelineCacheHeaderVersion, + pub vendor_id: u32, + pub device_id: u32, + pub pipeline_cache_uuid: [u8; UUID_SIZE], +} +impl ::std::default::Default for PipelineCacheHeaderVersionOne { + fn default() -> PipelineCacheHeaderVersionOne { + PipelineCacheHeaderVersionOne { + header_size: u32::default(), + header_version: PipelineCacheHeaderVersion::default(), + vendor_id: u32::default(), + device_id: u32::default(), + pipeline_cache_uuid: unsafe { ::std::mem::zeroed() }, + } + } +} +impl PipelineCacheHeaderVersionOne { + pub fn builder<'a>() -> PipelineCacheHeaderVersionOneBuilder<'a> { + PipelineCacheHeaderVersionOneBuilder { + inner: PipelineCacheHeaderVersionOne::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PipelineCacheHeaderVersionOneBuilder<'a> { + inner: PipelineCacheHeaderVersionOne, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for PipelineCacheHeaderVersionOneBuilder<'a> { + type Target = PipelineCacheHeaderVersionOne; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PipelineCacheHeaderVersionOneBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PipelineCacheHeaderVersionOneBuilder<'a> { + pub fn header_size(mut self, header_size: u32) -> Self { + self.inner.header_size = header_size; + self + } + pub fn header_version(mut self, header_version: PipelineCacheHeaderVersion) -> Self { + self.inner.header_version = header_version; + self + } + pub fn vendor_id(mut self, vendor_id: u32) -> Self { + self.inner.vendor_id = vendor_id; + self + } + pub fn device_id(mut self, device_id: u32) -> Self { + self.inner.device_id = device_id; + self + } + pub fn pipeline_cache_uuid(mut self, pipeline_cache_uuid: [u8; UUID_SIZE]) -> Self { + self.inner.pipeline_cache_uuid = pipeline_cache_uuid; + 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) -> PipelineCacheHeaderVersionOne { + self.inner + } +} +#[repr(C)] #[derive(Copy, Clone, Default, Debug)] #[doc = ""] pub struct PushConstantRange { @@ -9329,6 +9412,105 @@ impl<'a> DispatchIndirectCommandBuilder<'a> { } } #[repr(C)] +#[derive(Copy, Clone, Default, Debug)] +#[doc = ""] +pub struct MultiDrawInfoEXT { + pub first_vertex: u32, + pub vertex_count: u32, +} +impl MultiDrawInfoEXT { + pub fn builder<'a>() -> MultiDrawInfoEXTBuilder<'a> { + MultiDrawInfoEXTBuilder { + inner: MultiDrawInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct MultiDrawInfoEXTBuilder<'a> { + inner: MultiDrawInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for MultiDrawInfoEXTBuilder<'a> { + type Target = MultiDrawInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for MultiDrawInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> MultiDrawInfoEXTBuilder<'a> { + pub fn first_vertex(mut self, first_vertex: u32) -> Self { + self.inner.first_vertex = first_vertex; + self + } + pub fn vertex_count(mut self, vertex_count: u32) -> Self { + self.inner.vertex_count = vertex_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) -> MultiDrawInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Default, Debug)] +#[doc = ""] +pub struct MultiDrawIndexedInfoEXT { + pub first_index: u32, + pub index_count: u32, + pub vertex_offset: i32, +} +impl MultiDrawIndexedInfoEXT { + pub fn builder<'a>() -> MultiDrawIndexedInfoEXTBuilder<'a> { + MultiDrawIndexedInfoEXTBuilder { + inner: MultiDrawIndexedInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct MultiDrawIndexedInfoEXTBuilder<'a> { + inner: MultiDrawIndexedInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for MultiDrawIndexedInfoEXTBuilder<'a> { + type Target = MultiDrawIndexedInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for MultiDrawIndexedInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> MultiDrawIndexedInfoEXTBuilder<'a> { + pub fn first_index(mut self, first_index: u32) -> Self { + self.inner.first_index = first_index; + self + } + pub fn index_count(mut self, index_count: u32) -> Self { + self.inner.index_count = index_count; + self + } + pub fn vertex_offset(mut self, vertex_offset: i32) -> Self { + self.inner.vertex_offset = vertex_offset; + 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) -> MultiDrawIndexedInfoEXT { + self.inner + } +} +#[repr(C)] #[derive(Copy, Clone, Debug)] #[doc = ""] pub struct SubmitInfo { @@ -12355,6 +12537,61 @@ impl<'a> PhysicalDeviceDeviceGeneratedCommandsPropertiesNVBuilder<'a> { } #[repr(C)] #[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceMultiDrawPropertiesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_multi_draw_count: u32, +} +impl ::std::default::Default for PhysicalDeviceMultiDrawPropertiesEXT { + fn default() -> PhysicalDeviceMultiDrawPropertiesEXT { + PhysicalDeviceMultiDrawPropertiesEXT { + s_type: StructureType::PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT, + p_next: ::std::ptr::null_mut(), + max_multi_draw_count: u32::default(), + } + } +} +impl PhysicalDeviceMultiDrawPropertiesEXT { + pub fn builder<'a>() -> PhysicalDeviceMultiDrawPropertiesEXTBuilder<'a> { + PhysicalDeviceMultiDrawPropertiesEXTBuilder { + inner: PhysicalDeviceMultiDrawPropertiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceMultiDrawPropertiesEXTBuilder<'a> { + inner: PhysicalDeviceMultiDrawPropertiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceMultiDrawPropertiesEXTBuilder<'_> {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceMultiDrawPropertiesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceMultiDrawPropertiesEXTBuilder<'a> { + type Target = PhysicalDeviceMultiDrawPropertiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceMultiDrawPropertiesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceMultiDrawPropertiesEXTBuilder<'a> { + pub fn max_multi_draw_count(mut self, max_multi_draw_count: u32) -> Self { + self.inner.max_multi_draw_count = max_multi_draw_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) -> PhysicalDeviceMultiDrawPropertiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] #[doc = ""] pub struct GraphicsShaderGroupCreateInfoNV { pub s_type: StructureType, @@ -17899,7 +18136,7 @@ impl<'a> DeviceGroupBindSparseInfoBuilder<'a> { #[doc = ""] pub struct DeviceGroupPresentCapabilitiesKHR { pub s_type: StructureType, - pub p_next: *const c_void, + pub p_next: *mut c_void, pub present_mask: [u32; MAX_DEVICE_GROUP_SIZE], pub modes: DeviceGroupPresentModeFlagsKHR, } @@ -17907,7 +18144,7 @@ impl ::std::default::Default for DeviceGroupPresentCapabilitiesKHR { fn default() -> DeviceGroupPresentCapabilitiesKHR { DeviceGroupPresentCapabilitiesKHR { s_type: StructureType::DEVICE_GROUP_PRESENT_CAPABILITIES_KHR, - p_next: ::std::ptr::null(), + p_next: ::std::ptr::null_mut(), present_mask: unsafe { ::std::mem::zeroed() }, modes: DeviceGroupPresentModeFlagsKHR::default(), } @@ -22533,6 +22770,63 @@ impl<'a> PhysicalDeviceBlendOperationAdvancedFeaturesEXTBuilder<'a> { } #[repr(C)] #[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceMultiDrawFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub multi_draw: Bool32, +} +impl ::std::default::Default for PhysicalDeviceMultiDrawFeaturesEXT { + fn default() -> PhysicalDeviceMultiDrawFeaturesEXT { + PhysicalDeviceMultiDrawFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + multi_draw: Bool32::default(), + } + } +} +impl PhysicalDeviceMultiDrawFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceMultiDrawFeaturesEXTBuilder<'a> { + PhysicalDeviceMultiDrawFeaturesEXTBuilder { + inner: PhysicalDeviceMultiDrawFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceMultiDrawFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceMultiDrawFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceMultiDrawFeaturesEXTBuilder<'_> {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceMultiDrawFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceMultiDrawFeaturesEXTBuilder<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceMultiDrawFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceMultiDrawFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceMultiDrawFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceMultiDrawFeaturesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceMultiDrawFeaturesEXTBuilder<'a> { + pub fn multi_draw(mut self, multi_draw: bool) -> Self { + self.inner.multi_draw = multi_draw.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) -> PhysicalDeviceMultiDrawFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] #[doc = ""] pub struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT { pub s_type: StructureType, @@ -24238,6 +24532,8 @@ unsafe impl ExtendsPhysicalDeviceFeatures2 { } unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceGlobalPriorityQueryFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceGlobalPriorityQueryFeaturesEXTBuilder<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceGlobalPriorityQueryFeaturesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceGlobalPriorityQueryFeaturesEXTBuilder<'a> { type Target = PhysicalDeviceGlobalPriorityQueryFeaturesEXT; fn deref(&self) -> &Self::Target { @@ -24868,7 +25164,7 @@ impl<'a> DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> { #[doc = ""] pub struct DeviceMemoryReportCallbackDataEXT { pub s_type: StructureType, - pub p_next: *const c_void, + pub p_next: *mut c_void, pub flags: DeviceMemoryReportFlagsEXT, pub ty: DeviceMemoryReportEventTypeEXT, pub memory_object_id: u64, @@ -24881,7 +25177,7 @@ impl ::std::default::Default for DeviceMemoryReportCallbackDataEXT { fn default() -> DeviceMemoryReportCallbackDataEXT { DeviceMemoryReportCallbackDataEXT { s_type: StructureType::DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT, - p_next: ::std::ptr::null(), + p_next: ::std::ptr::null_mut(), flags: DeviceMemoryReportFlagsEXT::default(), ty: DeviceMemoryReportEventTypeEXT::default(), memory_object_id: u64::default(), @@ -35251,7 +35547,7 @@ impl<'a> PhysicalDevicePerformanceQueryPropertiesKHRBuilder<'a> { #[doc = ""] pub struct PerformanceCounterKHR { pub s_type: StructureType, - pub p_next: *const c_void, + pub p_next: *mut c_void, pub unit: PerformanceCounterUnitKHR, pub scope: PerformanceCounterScopeKHR, pub storage: PerformanceCounterStorageKHR, @@ -35261,7 +35557,7 @@ impl ::std::default::Default for PerformanceCounterKHR { fn default() -> PerformanceCounterKHR { PerformanceCounterKHR { s_type: StructureType::PERFORMANCE_COUNTER_KHR, - p_next: ::std::ptr::null(), + p_next: ::std::ptr::null_mut(), unit: PerformanceCounterUnitKHR::default(), scope: PerformanceCounterScopeKHR::default(), storage: PerformanceCounterStorageKHR::default(), @@ -35322,7 +35618,7 @@ impl<'a> PerformanceCounterKHRBuilder<'a> { #[doc = ""] pub struct PerformanceCounterDescriptionKHR { pub s_type: StructureType, - pub p_next: *const c_void, + pub p_next: *mut c_void, pub flags: PerformanceCounterDescriptionFlagsKHR, pub name: [c_char; MAX_DESCRIPTION_SIZE], pub category: [c_char; MAX_DESCRIPTION_SIZE], @@ -35350,7 +35646,7 @@ impl ::std::default::Default for PerformanceCounterDescriptionKHR { fn default() -> PerformanceCounterDescriptionKHR { PerformanceCounterDescriptionKHR { s_type: StructureType::PERFORMANCE_COUNTER_DESCRIPTION_KHR, - p_next: ::std::ptr::null(), + p_next: ::std::ptr::null_mut(), flags: PerformanceCounterDescriptionFlagsKHR::default(), name: unsafe { ::std::mem::zeroed() }, category: unsafe { ::std::mem::zeroed() }, @@ -37722,6 +38018,129 @@ impl<'a> PipelineShaderStageRequiredSubgroupSizeCreateInfoEXTBuilder<'a> { } #[repr(C)] #[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct SubpassShadingPipelineCreateInfoHUAWEI { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub render_pass: RenderPass, + pub subpass: u32, +} +impl ::std::default::Default for SubpassShadingPipelineCreateInfoHUAWEI { + fn default() -> SubpassShadingPipelineCreateInfoHUAWEI { + SubpassShadingPipelineCreateInfoHUAWEI { + s_type: StructureType::SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI, + p_next: ::std::ptr::null_mut(), + render_pass: RenderPass::default(), + subpass: u32::default(), + } + } +} +impl SubpassShadingPipelineCreateInfoHUAWEI { + pub fn builder<'a>() -> SubpassShadingPipelineCreateInfoHUAWEIBuilder<'a> { + SubpassShadingPipelineCreateInfoHUAWEIBuilder { + inner: SubpassShadingPipelineCreateInfoHUAWEI::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct SubpassShadingPipelineCreateInfoHUAWEIBuilder<'a> { + inner: SubpassShadingPipelineCreateInfoHUAWEI, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsComputePipelineCreateInfo for SubpassShadingPipelineCreateInfoHUAWEIBuilder<'_> {} +unsafe impl ExtendsComputePipelineCreateInfo for SubpassShadingPipelineCreateInfoHUAWEI {} +impl<'a> ::std::ops::Deref for SubpassShadingPipelineCreateInfoHUAWEIBuilder<'a> { + type Target = SubpassShadingPipelineCreateInfoHUAWEI; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for SubpassShadingPipelineCreateInfoHUAWEIBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> SubpassShadingPipelineCreateInfoHUAWEIBuilder<'a> { + pub fn render_pass(mut self, render_pass: RenderPass) -> Self { + self.inner.render_pass = render_pass; + self + } + pub fn subpass(mut self, subpass: u32) -> Self { + self.inner.subpass = subpass; + 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) -> SubpassShadingPipelineCreateInfoHUAWEI { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceSubpassShadingPropertiesHUAWEI { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_subpass_shading_workgroup_size_aspect_ratio: u32, +} +impl ::std::default::Default for PhysicalDeviceSubpassShadingPropertiesHUAWEI { + fn default() -> PhysicalDeviceSubpassShadingPropertiesHUAWEI { + PhysicalDeviceSubpassShadingPropertiesHUAWEI { + s_type: StructureType::PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI, + p_next: ::std::ptr::null_mut(), + max_subpass_shading_workgroup_size_aspect_ratio: u32::default(), + } + } +} +impl PhysicalDeviceSubpassShadingPropertiesHUAWEI { + pub fn builder<'a>() -> PhysicalDeviceSubpassShadingPropertiesHUAWEIBuilder<'a> { + PhysicalDeviceSubpassShadingPropertiesHUAWEIBuilder { + inner: PhysicalDeviceSubpassShadingPropertiesHUAWEI::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceSubpassShadingPropertiesHUAWEIBuilder<'a> { + inner: PhysicalDeviceSubpassShadingPropertiesHUAWEI, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceProperties2 + for PhysicalDeviceSubpassShadingPropertiesHUAWEIBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceSubpassShadingPropertiesHUAWEI {} +impl<'a> ::std::ops::Deref for PhysicalDeviceSubpassShadingPropertiesHUAWEIBuilder<'a> { + type Target = PhysicalDeviceSubpassShadingPropertiesHUAWEI; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceSubpassShadingPropertiesHUAWEIBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceSubpassShadingPropertiesHUAWEIBuilder<'a> { + pub fn max_subpass_shading_workgroup_size_aspect_ratio( + mut self, + max_subpass_shading_workgroup_size_aspect_ratio: u32, + ) -> Self { + self.inner.max_subpass_shading_workgroup_size_aspect_ratio = + max_subpass_shading_workgroup_size_aspect_ratio; + 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) -> PhysicalDeviceSubpassShadingPropertiesHUAWEI { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] #[doc = ""] pub struct MemoryOpaqueCaptureAddressAllocateInfo { pub s_type: StructureType, @@ -40080,6 +40499,7 @@ pub struct AccelerationStructureGeometryTrianglesDataKHRBuilder<'a> { inner: AccelerationStructureGeometryTrianglesDataKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsAccelerationStructureGeometryTrianglesDataKHR {} impl<'a> ::std::ops::Deref for AccelerationStructureGeometryTrianglesDataKHRBuilder<'a> { type Target = AccelerationStructureGeometryTrianglesDataKHR; fn deref(&self) -> &Self::Target { @@ -40120,6 +40540,23 @@ impl<'a> AccelerationStructureGeometryTrianglesDataKHRBuilder<'a> { self.inner.transform_data = transform_data; self } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + 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."] @@ -40582,6 +41019,7 @@ pub struct AccelerationStructureCreateInfoKHRBuilder<'a> { inner: AccelerationStructureCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsAccelerationStructureCreateInfoKHR {} impl<'a> ::std::ops::Deref for AccelerationStructureCreateInfoKHRBuilder<'a> { type Target = AccelerationStructureCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -40618,6 +41056,23 @@ impl<'a> AccelerationStructureCreateInfoKHRBuilder<'a> { self.inner.device_address = device_address; self } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + 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."] @@ -40705,6 +41160,7 @@ pub union AccelerationStructureReferenceKHR { } #[repr(C)] #[derive(Copy, Clone)] +#[doc = ""] pub struct AccelerationStructureInstanceKHR { pub transform: TransformMatrixKHR, pub instance_custom_index_and_mask: u32, @@ -42317,6 +42773,66 @@ impl<'a> PhysicalDevice4444FormatsFeaturesEXTBuilder<'a> { } #[repr(C)] #[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceSubpassShadingFeaturesHUAWEI { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub subpass_shading: Bool32, +} +impl ::std::default::Default for PhysicalDeviceSubpassShadingFeaturesHUAWEI { + fn default() -> PhysicalDeviceSubpassShadingFeaturesHUAWEI { + PhysicalDeviceSubpassShadingFeaturesHUAWEI { + s_type: StructureType::PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI, + p_next: ::std::ptr::null_mut(), + subpass_shading: Bool32::default(), + } + } +} +impl PhysicalDeviceSubpassShadingFeaturesHUAWEI { + pub fn builder<'a>() -> PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder<'a> { + PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder { + inner: PhysicalDeviceSubpassShadingFeaturesHUAWEI::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder<'a> { + inner: PhysicalDeviceSubpassShadingFeaturesHUAWEI, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceSubpassShadingFeaturesHUAWEI {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceSubpassShadingFeaturesHUAWEI {} +impl<'a> ::std::ops::Deref for PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder<'a> { + type Target = PhysicalDeviceSubpassShadingFeaturesHUAWEI; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceSubpassShadingFeaturesHUAWEIBuilder<'a> { + pub fn subpass_shading(mut self, subpass_shading: bool) -> Self { + self.inner.subpass_shading = subpass_shading.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) -> PhysicalDeviceSubpassShadingFeaturesHUAWEI { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] #[doc = ""] pub struct BufferCopy2KHR { pub s_type: StructureType, @@ -44324,6 +44840,66 @@ impl<'a> PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder<'a> { } #[repr(C)] #[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceExternalMemoryRDMAFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub external_memory_rdma: Bool32, +} +impl ::std::default::Default for PhysicalDeviceExternalMemoryRDMAFeaturesNV { + fn default() -> PhysicalDeviceExternalMemoryRDMAFeaturesNV { + PhysicalDeviceExternalMemoryRDMAFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + external_memory_rdma: Bool32::default(), + } + } +} +impl PhysicalDeviceExternalMemoryRDMAFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceExternalMemoryRDMAFeaturesNVBuilder<'a> { + PhysicalDeviceExternalMemoryRDMAFeaturesNVBuilder { + inner: PhysicalDeviceExternalMemoryRDMAFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceExternalMemoryRDMAFeaturesNVBuilder<'a> { + inner: PhysicalDeviceExternalMemoryRDMAFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceExternalMemoryRDMAFeaturesNVBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceExternalMemoryRDMAFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceExternalMemoryRDMAFeaturesNVBuilder<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceExternalMemoryRDMAFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceExternalMemoryRDMAFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceExternalMemoryRDMAFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceExternalMemoryRDMAFeaturesNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceExternalMemoryRDMAFeaturesNVBuilder<'a> { + pub fn external_memory_rdma(mut self, external_memory_rdma: bool) -> Self { + self.inner.external_memory_rdma = external_memory_rdma.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) -> PhysicalDeviceExternalMemoryRDMAFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] #[doc = ""] pub struct VertexInputBindingDescription2EXT { pub s_type: StructureType, @@ -45508,7 +46084,7 @@ impl<'a> VideoProfilesKHRBuilder<'a> { #[doc = ""] pub struct PhysicalDeviceVideoFormatInfoKHR { pub s_type: StructureType, - pub p_next: *const c_void, + pub p_next: *mut c_void, pub image_usage: ImageUsageFlags, pub p_video_profiles: *const VideoProfilesKHR, } @@ -45516,7 +46092,7 @@ impl ::std::default::Default for PhysicalDeviceVideoFormatInfoKHR { fn default() -> PhysicalDeviceVideoFormatInfoKHR { PhysicalDeviceVideoFormatInfoKHR { s_type: StructureType::PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR, - p_next: ::std::ptr::null(), + p_next: ::std::ptr::null_mut(), image_usage: ImageUsageFlags::default(), p_video_profiles: ::std::ptr::null(), } @@ -49229,20 +49805,14 @@ impl<'a> CuLaunchInfoNVXBuilder<'a> { self.inner.shared_mem_bytes = shared_mem_bytes; self } - pub fn param_count(mut self, param_count: usize) -> Self { - self.inner.param_count = param_count; + pub fn params(mut self, params: &'a [*const c_void]) -> Self { + self.inner.param_count = params.len() as _; + self.inner.p_params = params.as_ptr(); self } - pub fn params(mut self, params: *const *const c_void) -> Self { - self.inner.p_params = params; - self - } - pub fn extra_count(mut self, extra_count: usize) -> Self { - self.inner.extra_count = extra_count; - self - } - pub fn extras(mut self, extras: *const *const c_void) -> Self { - self.inner.p_extras = extras; + pub fn extras(mut self, extras: &'a [*const c_void]) -> Self { + self.inner.extra_count = extras.len() as _; + self.inner.p_extras = extras.as_ptr(); self } #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] @@ -49252,3 +49822,565 @@ impl<'a> CuLaunchInfoNVXBuilder<'a> { self.inner } } +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceDrmPropertiesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub has_primary: Bool32, + pub has_render: Bool32, + pub primary_major: i64, + pub primary_minor: i64, + pub render_major: i64, + pub render_minor: i64, +} +impl ::std::default::Default for PhysicalDeviceDrmPropertiesEXT { + fn default() -> PhysicalDeviceDrmPropertiesEXT { + PhysicalDeviceDrmPropertiesEXT { + s_type: StructureType::PHYSICAL_DEVICE_DRM_PROPERTIES_EXT, + p_next: ::std::ptr::null_mut(), + has_primary: Bool32::default(), + has_render: Bool32::default(), + primary_major: i64::default(), + primary_minor: i64::default(), + render_major: i64::default(), + render_minor: i64::default(), + } + } +} +impl PhysicalDeviceDrmPropertiesEXT { + pub fn builder<'a>() -> PhysicalDeviceDrmPropertiesEXTBuilder<'a> { + PhysicalDeviceDrmPropertiesEXTBuilder { + inner: PhysicalDeviceDrmPropertiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceDrmPropertiesEXTBuilder<'a> { + inner: PhysicalDeviceDrmPropertiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceDrmPropertiesEXTBuilder<'_> {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceDrmPropertiesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceDrmPropertiesEXTBuilder<'a> { + type Target = PhysicalDeviceDrmPropertiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceDrmPropertiesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceDrmPropertiesEXTBuilder<'a> { + pub fn has_primary(mut self, has_primary: bool) -> Self { + self.inner.has_primary = has_primary.into(); + self + } + pub fn has_render(mut self, has_render: bool) -> Self { + self.inner.has_render = has_render.into(); + self + } + pub fn primary_major(mut self, primary_major: i64) -> Self { + self.inner.primary_major = primary_major; + self + } + pub fn primary_minor(mut self, primary_minor: i64) -> Self { + self.inner.primary_minor = primary_minor; + self + } + pub fn render_major(mut self, render_major: i64) -> Self { + self.inner.render_major = render_major; + self + } + pub fn render_minor(mut self, render_minor: i64) -> Self { + self.inner.render_minor = render_minor; + 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) -> PhysicalDeviceDrmPropertiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceRayTracingMotionBlurFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub ray_tracing_motion_blur: Bool32, + pub ray_tracing_motion_blur_pipeline_trace_rays_indirect: Bool32, +} +impl ::std::default::Default for PhysicalDeviceRayTracingMotionBlurFeaturesNV { + fn default() -> PhysicalDeviceRayTracingMotionBlurFeaturesNV { + PhysicalDeviceRayTracingMotionBlurFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + ray_tracing_motion_blur: Bool32::default(), + ray_tracing_motion_blur_pipeline_trace_rays_indirect: Bool32::default(), + } + } +} +impl PhysicalDeviceRayTracingMotionBlurFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceRayTracingMotionBlurFeaturesNVBuilder<'a> { + PhysicalDeviceRayTracingMotionBlurFeaturesNVBuilder { + inner: PhysicalDeviceRayTracingMotionBlurFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceRayTracingMotionBlurFeaturesNVBuilder<'a> { + inner: PhysicalDeviceRayTracingMotionBlurFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceRayTracingMotionBlurFeaturesNVBuilder<'_> +{ +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceRayTracingMotionBlurFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceRayTracingMotionBlurFeaturesNVBuilder<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceRayTracingMotionBlurFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceRayTracingMotionBlurFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceRayTracingMotionBlurFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceRayTracingMotionBlurFeaturesNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceRayTracingMotionBlurFeaturesNVBuilder<'a> { + pub fn ray_tracing_motion_blur(mut self, ray_tracing_motion_blur: bool) -> Self { + self.inner.ray_tracing_motion_blur = ray_tracing_motion_blur.into(); + self + } + pub fn ray_tracing_motion_blur_pipeline_trace_rays_indirect( + mut self, + ray_tracing_motion_blur_pipeline_trace_rays_indirect: bool, + ) -> Self { + self.inner + .ray_tracing_motion_blur_pipeline_trace_rays_indirect = + ray_tracing_motion_blur_pipeline_trace_rays_indirect.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) -> PhysicalDeviceRayTracingMotionBlurFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct AccelerationStructureGeometryMotionTrianglesDataNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub vertex_data: DeviceOrHostAddressConstKHR, +} +impl fmt::Debug for AccelerationStructureGeometryMotionTrianglesDataNV { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt.debug_struct("AccelerationStructureGeometryMotionTrianglesDataNV") + .field("s_type", &self.s_type) + .field("p_next", &self.p_next) + .field("vertex_data", &"union") + .finish() + } +} +impl ::std::default::Default for AccelerationStructureGeometryMotionTrianglesDataNV { + fn default() -> AccelerationStructureGeometryMotionTrianglesDataNV { + AccelerationStructureGeometryMotionTrianglesDataNV { + s_type: StructureType::ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV, + p_next: ::std::ptr::null(), + vertex_data: DeviceOrHostAddressConstKHR::default(), + } + } +} +impl AccelerationStructureGeometryMotionTrianglesDataNV { + pub fn builder<'a>() -> AccelerationStructureGeometryMotionTrianglesDataNVBuilder<'a> { + AccelerationStructureGeometryMotionTrianglesDataNVBuilder { + inner: AccelerationStructureGeometryMotionTrianglesDataNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct AccelerationStructureGeometryMotionTrianglesDataNVBuilder<'a> { + inner: AccelerationStructureGeometryMotionTrianglesDataNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsAccelerationStructureGeometryTrianglesDataKHR + for AccelerationStructureGeometryMotionTrianglesDataNVBuilder<'_> +{ +} +unsafe impl ExtendsAccelerationStructureGeometryTrianglesDataKHR + for AccelerationStructureGeometryMotionTrianglesDataNV +{ +} +impl<'a> ::std::ops::Deref for AccelerationStructureGeometryMotionTrianglesDataNVBuilder<'a> { + type Target = AccelerationStructureGeometryMotionTrianglesDataNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for AccelerationStructureGeometryMotionTrianglesDataNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> AccelerationStructureGeometryMotionTrianglesDataNVBuilder<'a> { + pub fn vertex_data(mut self, vertex_data: DeviceOrHostAddressConstKHR) -> Self { + self.inner.vertex_data = vertex_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) -> AccelerationStructureGeometryMotionTrianglesDataNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct AccelerationStructureMotionInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub max_instances: u32, + pub flags: AccelerationStructureMotionInfoFlagsNV, +} +impl ::std::default::Default for AccelerationStructureMotionInfoNV { + fn default() -> AccelerationStructureMotionInfoNV { + AccelerationStructureMotionInfoNV { + s_type: StructureType::ACCELERATION_STRUCTURE_MOTION_INFO_NV, + p_next: ::std::ptr::null(), + max_instances: u32::default(), + flags: AccelerationStructureMotionInfoFlagsNV::default(), + } + } +} +impl AccelerationStructureMotionInfoNV { + pub fn builder<'a>() -> AccelerationStructureMotionInfoNVBuilder<'a> { + AccelerationStructureMotionInfoNVBuilder { + inner: AccelerationStructureMotionInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct AccelerationStructureMotionInfoNVBuilder<'a> { + inner: AccelerationStructureMotionInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsAccelerationStructureCreateInfoKHR + for AccelerationStructureMotionInfoNVBuilder<'_> +{ +} +unsafe impl ExtendsAccelerationStructureCreateInfoKHR for AccelerationStructureMotionInfoNV {} +impl<'a> ::std::ops::Deref for AccelerationStructureMotionInfoNVBuilder<'a> { + type Target = AccelerationStructureMotionInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for AccelerationStructureMotionInfoNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> AccelerationStructureMotionInfoNVBuilder<'a> { + pub fn max_instances(mut self, max_instances: u32) -> Self { + self.inner.max_instances = max_instances; + self + } + pub fn flags(mut self, flags: AccelerationStructureMotionInfoFlagsNV) -> Self { + self.inner.flags = 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) -> AccelerationStructureMotionInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Default, Debug)] +#[doc = ""] +pub struct SRTDataNV { + pub sx: f32, + pub a: f32, + pub b: f32, + pub pvx: f32, + pub sy: f32, + pub c: f32, + pub pvy: f32, + pub sz: f32, + pub pvz: f32, + pub qx: f32, + pub qy: f32, + pub qz: f32, + pub qw: f32, + pub tx: f32, + pub ty: f32, + pub tz: f32, +} +impl SRTDataNV { + pub fn builder<'a>() -> SRTDataNVBuilder<'a> { + SRTDataNVBuilder { + inner: SRTDataNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct SRTDataNVBuilder<'a> { + inner: SRTDataNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for SRTDataNVBuilder<'a> { + type Target = SRTDataNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for SRTDataNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> SRTDataNVBuilder<'a> { + pub fn sx(mut self, sx: f32) -> Self { + self.inner.sx = sx; + self + } + pub fn a(mut self, a: f32) -> Self { + self.inner.a = a; + self + } + pub fn b(mut self, b: f32) -> Self { + self.inner.b = b; + self + } + pub fn pvx(mut self, pvx: f32) -> Self { + self.inner.pvx = pvx; + self + } + pub fn sy(mut self, sy: f32) -> Self { + self.inner.sy = sy; + self + } + pub fn c(mut self, c: f32) -> Self { + self.inner.c = c; + self + } + pub fn pvy(mut self, pvy: f32) -> Self { + self.inner.pvy = pvy; + self + } + pub fn sz(mut self, sz: f32) -> Self { + self.inner.sz = sz; + self + } + pub fn pvz(mut self, pvz: f32) -> Self { + self.inner.pvz = pvz; + self + } + pub fn qx(mut self, qx: f32) -> Self { + self.inner.qx = qx; + self + } + pub fn qy(mut self, qy: f32) -> Self { + self.inner.qy = qy; + self + } + pub fn qz(mut self, qz: f32) -> Self { + self.inner.qz = qz; + self + } + pub fn qw(mut self, qw: f32) -> Self { + self.inner.qw = qw; + self + } + pub fn tx(mut self, tx: f32) -> Self { + self.inner.tx = tx; + self + } + pub fn ty(mut self, ty: f32) -> Self { + self.inner.ty = ty; + self + } + pub fn tz(mut self, tz: f32) -> Self { + self.inner.tz = tz; + 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) -> SRTDataNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct AccelerationStructureSRTMotionInstanceNV { + pub transform_t0: SRTDataNV, + pub transform_t1: SRTDataNV, + pub instance_custom_index_and_mask: u32, + pub instance_shader_binding_table_record_offset_and_flags: u32, + pub acceleration_structure_reference: AccelerationStructureReferenceKHR, +} +#[repr(C)] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct AccelerationStructureMatrixMotionInstanceNV { + pub transform_t0: TransformMatrixKHR, + pub transform_t1: TransformMatrixKHR, + pub instance_custom_index_and_mask: u32, + pub instance_shader_binding_table_record_offset_and_flags: u32, + pub acceleration_structure_reference: AccelerationStructureReferenceKHR, +} +#[repr(C)] +#[derive(Copy, Clone)] +#[doc = ""] +pub union AccelerationStructureMotionInstanceDataNV { + pub static_instance: AccelerationStructureInstanceKHR, + pub matrix_motion_instance: AccelerationStructureMatrixMotionInstanceNV, + pub srt_motion_instance: AccelerationStructureSRTMotionInstanceNV, +} +impl ::std::default::Default for AccelerationStructureMotionInstanceDataNV { + fn default() -> AccelerationStructureMotionInstanceDataNV { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone, Default)] +#[doc = ""] +pub struct AccelerationStructureMotionInstanceNV { + pub ty: AccelerationStructureMotionInstanceTypeNV, + pub flags: AccelerationStructureMotionInstanceFlagsNV, + pub data: AccelerationStructureMotionInstanceDataNV, +} +impl fmt::Debug for AccelerationStructureMotionInstanceNV { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt.debug_struct("AccelerationStructureMotionInstanceNV") + .field("ty", &self.ty) + .field("flags", &self.flags) + .field("data", &"union") + .finish() + } +} +impl AccelerationStructureMotionInstanceNV { + pub fn builder<'a>() -> AccelerationStructureMotionInstanceNVBuilder<'a> { + AccelerationStructureMotionInstanceNVBuilder { + inner: AccelerationStructureMotionInstanceNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct AccelerationStructureMotionInstanceNVBuilder<'a> { + inner: AccelerationStructureMotionInstanceNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for AccelerationStructureMotionInstanceNVBuilder<'a> { + type Target = AccelerationStructureMotionInstanceNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for AccelerationStructureMotionInstanceNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> AccelerationStructureMotionInstanceNVBuilder<'a> { + pub fn ty(mut self, ty: AccelerationStructureMotionInstanceTypeNV) -> Self { + self.inner.ty = ty; + self + } + pub fn flags(mut self, flags: AccelerationStructureMotionInstanceFlagsNV) -> Self { + self.inner.flags = flags; + self + } + pub fn data(mut self, data: AccelerationStructureMotionInstanceDataNV) -> Self { + self.inner.data = 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) -> AccelerationStructureMotionInstanceNV { + self.inner + } +} +#[doc = ""] +pub type RemoteAddressNV = c_void; +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct MemoryGetRemoteAddressInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub memory: DeviceMemory, + pub handle_type: ExternalMemoryHandleTypeFlags, +} +impl ::std::default::Default for MemoryGetRemoteAddressInfoNV { + fn default() -> MemoryGetRemoteAddressInfoNV { + MemoryGetRemoteAddressInfoNV { + s_type: StructureType::MEMORY_GET_REMOTE_ADDRESS_INFO_NV, + p_next: ::std::ptr::null(), + memory: DeviceMemory::default(), + handle_type: ExternalMemoryHandleTypeFlags::default(), + } + } +} +impl MemoryGetRemoteAddressInfoNV { + pub fn builder<'a>() -> MemoryGetRemoteAddressInfoNVBuilder<'a> { + MemoryGetRemoteAddressInfoNVBuilder { + inner: MemoryGetRemoteAddressInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct MemoryGetRemoteAddressInfoNVBuilder<'a> { + inner: MemoryGetRemoteAddressInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for MemoryGetRemoteAddressInfoNVBuilder<'a> { + type Target = MemoryGetRemoteAddressInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for MemoryGetRemoteAddressInfoNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> MemoryGetRemoteAddressInfoNVBuilder<'a> { + pub fn memory(mut self, memory: DeviceMemory) -> Self { + self.inner.memory = memory; + self + } + pub fn handle_type(mut self, handle_type: ExternalMemoryHandleTypeFlags) -> Self { + self.inner.handle_type = handle_type; + 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) -> MemoryGetRemoteAddressInfoNV { + self.inner + } +} diff --git a/ash/src/vk/enums.rs b/ash/src/vk/enums.rs index a6f308b..75cf0ae 100644 --- a/ash/src/vk/enums.rs +++ b/ash/src/vk/enums.rs @@ -2209,6 +2209,23 @@ impl ProvokingVertexModeEXT { } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] +#[doc = ""] +pub struct AccelerationStructureMotionInstanceTypeNV(pub(crate) i32); +impl AccelerationStructureMotionInstanceTypeNV { + pub const fn from_raw(x: i32) -> Self { + AccelerationStructureMotionInstanceTypeNV(x) + } + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl AccelerationStructureMotionInstanceTypeNV { + pub const STATIC: Self = Self(0); + pub const MATRIX_MOTION: Self = Self(1); + pub const SRT_MOTION: Self = Self(2); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] #[doc = ""] pub struct QueryResultStatusKHR(pub(crate) i32); impl QueryResultStatusKHR { diff --git a/ash/src/vk/extensions.rs b/ash/src/vk/extensions.rs index 3320ea9..0350f44 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -20497,23 +20497,97 @@ impl StructureType { impl StructureType { pub const DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT: Self = Self(1_000_284_002); } -impl ExtExtension286Fn { +impl ExtAcquireDrmDisplayFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_286\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_acquire_drm_display\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkAcquireDrmDisplayEXT = unsafe extern "system" fn( + physical_device: PhysicalDevice, + drm_fd: i32, + display: DisplayKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetDrmDisplayEXT = unsafe extern "system" fn( + physical_device: PhysicalDevice, + drm_fd: i32, + connector_id: u32, + display: *mut DisplayKHR, +) -> Result; #[derive(Clone)] -pub struct ExtExtension286Fn {} -unsafe impl Send for ExtExtension286Fn {} -unsafe impl Sync for ExtExtension286Fn {} -impl ExtExtension286Fn { +pub struct ExtAcquireDrmDisplayFn { + pub acquire_drm_display_ext: PFN_vkAcquireDrmDisplayEXT, + pub get_drm_display_ext: PFN_vkGetDrmDisplayEXT, +} +unsafe impl Send for ExtAcquireDrmDisplayFn {} +unsafe impl Sync for ExtAcquireDrmDisplayFn {} +impl ExtAcquireDrmDisplayFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ExtExtension286Fn {} + ExtAcquireDrmDisplayFn { + acquire_drm_display_ext: unsafe { + unsafe extern "system" fn acquire_drm_display_ext( + _physical_device: PhysicalDevice, + _drm_fd: i32, + _display: DisplayKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(acquire_drm_display_ext) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkAcquireDrmDisplayEXT\0"); + let val = _f(cname); + if val.is_null() { + acquire_drm_display_ext + } else { + ::std::mem::transmute(val) + } + }, + get_drm_display_ext: unsafe { + unsafe extern "system" fn get_drm_display_ext( + _physical_device: PhysicalDevice, + _drm_fd: i32, + _connector_id: u32, + _display: *mut DisplayKHR, + ) -> Result { + panic!(concat!("Unable to load ", stringify!(get_drm_display_ext))) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkGetDrmDisplayEXT\0"); + let val = _f(cname); + if val.is_null() { + get_drm_display_ext + } else { + ::std::mem::transmute(val) + } + }, + } + } + #[doc = ""] + pub unsafe fn acquire_drm_display_ext( + &self, + physical_device: PhysicalDevice, + drm_fd: i32, + display: DisplayKHR, + ) -> Result { + (self.acquire_drm_display_ext)(physical_device, drm_fd, display) + } + #[doc = ""] + pub unsafe fn get_drm_display_ext( + &self, + physical_device: PhysicalDevice, + drm_fd: i32, + connector_id: u32, + display: *mut DisplayKHR, + ) -> Result { + (self.get_drm_display_ext)(physical_device, drm_fd, connector_id, display) } } impl ExtRobustness2Fn { @@ -22319,36 +22393,48 @@ impl StructureType { impl StructureType { pub const PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV: Self = Self(1_000_326_002); } -impl NvExtension328Fn { +impl NvRayTracingMotionBlurFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_extension_328\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_ray_tracing_motion_blur\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct NvExtension328Fn {} -unsafe impl Send for NvExtension328Fn {} -unsafe impl Sync for NvExtension328Fn {} -impl NvExtension328Fn { +pub struct NvRayTracingMotionBlurFn {} +unsafe impl Send for NvRayTracingMotionBlurFn {} +unsafe impl Sync for NvRayTracingMotionBlurFn {} +impl NvRayTracingMotionBlurFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension328Fn {} + NvRayTracingMotionBlurFn {} } } -#[doc = "Generated from 'VK_NV_extension_328'"] +#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"] +impl StructureType { + pub const ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV: Self = Self(1_000_327_000); +} +#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"] +impl StructureType { + pub const PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV: Self = Self(1_000_327_001); +} +#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"] +impl StructureType { + pub const ACCELERATION_STRUCTURE_MOTION_INFO_NV: Self = Self(1_000_327_002); +} +#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"] impl BuildAccelerationStructureFlagsKHR { - pub const RESERVED_5_NV: Self = Self(0b10_0000); + pub const MOTION_NV: Self = Self(0b10_0000); } -#[doc = "Generated from 'VK_NV_extension_328'"] +#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"] impl AccelerationStructureCreateFlagsKHR { - pub const RESERVED_2_NV: Self = Self(0b100); + pub const MOTION_NV: Self = Self(0b100); } -#[doc = "Generated from 'VK_NV_extension_328'"] +#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"] impl PipelineCreateFlags { - pub const RESERVED_20_NV: Self = Self(0b1_0000_0000_0000_0000_0000); + pub const RAY_TRACING_ALLOW_MOTION_NV: Self = Self(0b1_0000_0000_0000_0000_0000); } impl NvExtension329Fn { pub fn name() -> &'static ::std::ffi::CStr { @@ -23322,25 +23408,29 @@ impl StructureType { impl DynamicState { pub const VERTEX_INPUT_EXT: Self = Self(1_000_352_000); } -impl ExtExtension354Fn { +impl ExtPhysicalDeviceDrmFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_354\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_physical_device_drm\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct ExtExtension354Fn {} -unsafe impl Send for ExtExtension354Fn {} -unsafe impl Sync for ExtExtension354Fn {} -impl ExtExtension354Fn { +pub struct ExtPhysicalDeviceDrmFn {} +unsafe impl Send for ExtPhysicalDeviceDrmFn {} +unsafe impl Sync for ExtPhysicalDeviceDrmFn {} +impl ExtPhysicalDeviceDrmFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ExtExtension354Fn {} + ExtPhysicalDeviceDrmFn {} } } +#[doc = "Generated from 'VK_EXT_physical_device_drm'"] +impl StructureType { + pub const PHYSICAL_DEVICE_DRM_PROPERTIES_EXT: Self = Self(1_000_353_000); +} impl ExtExtension355Fn { pub fn name() -> &'static ::std::ffi::CStr { ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_355\0") @@ -23815,24 +23905,118 @@ impl QcomExtension369Fn { impl DescriptorBindingFlags { pub const RESERVED_4_QCOM: Self = Self(0b1_0000); } -impl HuaweiExtension370Fn { +impl HuaweiSubpassShadingFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_HUAWEI_extension_370\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_HUAWEI_subpass_shading\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 2u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = unsafe extern "system" fn( + device: Device, + renderpass: RenderPass, + p_max_workgroup_size: *mut Extent2D, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSubpassShadingHUAWEI = unsafe extern "system" fn(command_buffer: CommandBuffer); #[derive(Clone)] -pub struct HuaweiExtension370Fn {} -unsafe impl Send for HuaweiExtension370Fn {} -unsafe impl Sync for HuaweiExtension370Fn {} -impl HuaweiExtension370Fn { +pub struct HuaweiSubpassShadingFn { + pub get_device_subpass_shading_max_workgroup_size_huawei: + PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, + pub cmd_subpass_shading_huawei: PFN_vkCmdSubpassShadingHUAWEI, +} +unsafe impl Send for HuaweiSubpassShadingFn {} +unsafe impl Sync for HuaweiSubpassShadingFn {} +impl HuaweiSubpassShadingFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - HuaweiExtension370Fn {} + HuaweiSubpassShadingFn { + get_device_subpass_shading_max_workgroup_size_huawei: unsafe { + unsafe extern "system" fn get_device_subpass_shading_max_workgroup_size_huawei( + _device: Device, + _renderpass: RenderPass, + _p_max_workgroup_size: *mut Extent2D, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_device_subpass_shading_max_workgroup_size_huawei) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI\0", + ); + let val = _f(cname); + if val.is_null() { + get_device_subpass_shading_max_workgroup_size_huawei + } else { + ::std::mem::transmute(val) + } + }, + cmd_subpass_shading_huawei: unsafe { + unsafe extern "system" fn cmd_subpass_shading_huawei( + _command_buffer: CommandBuffer, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_subpass_shading_huawei) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdSubpassShadingHUAWEI\0"); + let val = _f(cname); + if val.is_null() { + cmd_subpass_shading_huawei + } else { + ::std::mem::transmute(val) + } + }, + } } + #[doc = ""] + pub unsafe fn get_device_subpass_shading_max_workgroup_size_huawei( + &self, + device: Device, + renderpass: RenderPass, + p_max_workgroup_size: *mut Extent2D, + ) -> Result { + (self.get_device_subpass_shading_max_workgroup_size_huawei)( + device, + renderpass, + p_max_workgroup_size, + ) + } + #[doc = ""] + pub unsafe fn cmd_subpass_shading_huawei(&self, command_buffer: CommandBuffer) { + (self.cmd_subpass_shading_huawei)(command_buffer) + } +} +#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"] +impl StructureType { + pub const SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI: Self = Self(1_000_369_000); +} +#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"] +impl StructureType { + pub const PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI: Self = Self(1_000_369_001); +} +#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"] +impl StructureType { + pub const PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI: Self = Self(1_000_369_002); +} +#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"] +impl PipelineBindPoint { + pub const SUBPASS_SHADING_HUAWEI: Self = Self(1_000_369_003); +} +#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"] +impl PipelineStageFlags2KHR { + pub const SUBPASS_SHADING_HUAWEI: Self = + Self(0b1000_0000_0000_0000_0000_0000_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"] +impl ShaderStageFlags { + pub const SUBPASS_SHADING_HUAWEI: Self = Self(0b100_0000_0000_0000); } impl HuaweiExtension371Fn { pub fn name() -> &'static ::std::ffi::CStr { @@ -23866,32 +24050,79 @@ impl PipelineStageFlags2KHR { pub const RESERVED_40_HUAWEI: Self = Self(0b1_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000); } -impl NvExtension372Fn { +impl NvExternalMemoryRdmaFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_extension_372\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_external_memory_rdma\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkGetMemoryRemoteAddressNV = unsafe extern "system" fn( + device: Device, + get_memory_remote_address_info: *const MemoryGetRemoteAddressInfoNV, + p_address: *mut RemoteAddressNV, +) -> Result; #[derive(Clone)] -pub struct NvExtension372Fn {} -unsafe impl Send for NvExtension372Fn {} -unsafe impl Sync for NvExtension372Fn {} -impl NvExtension372Fn { +pub struct NvExternalMemoryRdmaFn { + pub get_memory_remote_address_nv: PFN_vkGetMemoryRemoteAddressNV, +} +unsafe impl Send for NvExternalMemoryRdmaFn {} +unsafe impl Sync for NvExternalMemoryRdmaFn {} +impl NvExternalMemoryRdmaFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension372Fn {} + NvExternalMemoryRdmaFn { + get_memory_remote_address_nv: unsafe { + unsafe extern "system" fn get_memory_remote_address_nv( + _device: Device, + _get_memory_remote_address_info: *const MemoryGetRemoteAddressInfoNV, + _p_address: *mut RemoteAddressNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_memory_remote_address_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetMemoryRemoteAddressNV\0", + ); + let val = _f(cname); + if val.is_null() { + get_memory_remote_address_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } + #[doc = ""] + pub unsafe fn get_memory_remote_address_nv( + &self, + device: Device, + get_memory_remote_address_info: *const MemoryGetRemoteAddressInfoNV, + p_address: *mut RemoteAddressNV, + ) -> Result { + (self.get_memory_remote_address_nv)(device, get_memory_remote_address_info, p_address) } } -#[doc = "Generated from 'VK_NV_extension_372'"] -impl MemoryPropertyFlags { - pub const RESERVED_8_NV: Self = Self(0b1_0000_0000); +#[doc = "Generated from 'VK_NV_external_memory_rdma'"] +impl StructureType { + pub const MEMORY_GET_REMOTE_ADDRESS_INFO_NV: Self = Self(1_000_371_000); } -#[doc = "Generated from 'VK_NV_extension_372'"] +#[doc = "Generated from 'VK_NV_external_memory_rdma'"] +impl StructureType { + pub const PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV: Self = Self(1_000_371_001); +} +#[doc = "Generated from 'VK_NV_external_memory_rdma'"] +impl MemoryPropertyFlags { + pub const RDMA_CAPABLE_NV: Self = Self(0b1_0000_0000); +} +#[doc = "Generated from 'VK_NV_external_memory_rdma'"] impl ExternalMemoryHandleTypeFlags { - pub const RESERVED_12_NV: Self = Self(0b1_0000_0000_0000); + pub const RDMA_ADDRESS_NV: Self = Self(0b1_0000_0000_0000); } impl NvExtension373Fn { pub fn name() -> &'static ::std::ffi::CStr { @@ -24621,24 +24852,138 @@ impl ExtExtension392Fn { ExtExtension392Fn {} } } -impl MesaMultiDrawFn { +impl ExtMultiDrawFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_MESA_multi_draw\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_multi_draw\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawMultiEXT = unsafe extern "system" fn( + command_buffer: CommandBuffer, + draw_count: u32, + p_vertex_info: *const MultiDrawInfoEXT, + instance_count: u32, + first_instance: u32, + stride: u32, +); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawMultiIndexedEXT = unsafe extern "system" fn( + command_buffer: CommandBuffer, + draw_count: u32, + p_index_info: *const MultiDrawIndexedInfoEXT, + instance_count: u32, + first_instance: u32, + stride: u32, + p_vertex_offset: *const i32, +); #[derive(Clone)] -pub struct MesaMultiDrawFn {} -unsafe impl Send for MesaMultiDrawFn {} -unsafe impl Sync for MesaMultiDrawFn {} -impl MesaMultiDrawFn { +pub struct ExtMultiDrawFn { + pub cmd_draw_multi_ext: PFN_vkCmdDrawMultiEXT, + pub cmd_draw_multi_indexed_ext: PFN_vkCmdDrawMultiIndexedEXT, +} +unsafe impl Send for ExtMultiDrawFn {} +unsafe impl Sync for ExtMultiDrawFn {} +impl ExtMultiDrawFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - MesaMultiDrawFn {} + ExtMultiDrawFn { + cmd_draw_multi_ext: unsafe { + unsafe extern "system" fn cmd_draw_multi_ext( + _command_buffer: CommandBuffer, + _draw_count: u32, + _p_vertex_info: *const MultiDrawInfoEXT, + _instance_count: u32, + _first_instance: u32, + _stride: u32, + ) { + panic!(concat!("Unable to load ", stringify!(cmd_draw_multi_ext))) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawMultiEXT\0"); + let val = _f(cname); + if val.is_null() { + cmd_draw_multi_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_draw_multi_indexed_ext: unsafe { + unsafe extern "system" fn cmd_draw_multi_indexed_ext( + _command_buffer: CommandBuffer, + _draw_count: u32, + _p_index_info: *const MultiDrawIndexedInfoEXT, + _instance_count: u32, + _first_instance: u32, + _stride: u32, + _p_vertex_offset: *const i32, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_draw_multi_indexed_ext) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawMultiIndexedEXT\0"); + let val = _f(cname); + if val.is_null() { + cmd_draw_multi_indexed_ext + } else { + ::std::mem::transmute(val) + } + }, + } } + #[doc = ""] + pub unsafe fn cmd_draw_multi_ext( + &self, + command_buffer: CommandBuffer, + draw_count: u32, + p_vertex_info: *const MultiDrawInfoEXT, + instance_count: u32, + first_instance: u32, + stride: u32, + ) { + (self.cmd_draw_multi_ext)( + command_buffer, + draw_count, + p_vertex_info, + instance_count, + first_instance, + stride, + ) + } + #[doc = ""] + pub unsafe fn cmd_draw_multi_indexed_ext( + &self, + command_buffer: CommandBuffer, + draw_count: u32, + p_index_info: *const MultiDrawIndexedInfoEXT, + instance_count: u32, + first_instance: u32, + stride: u32, + p_vertex_offset: *const i32, + ) { + (self.cmd_draw_multi_indexed_ext)( + command_buffer, + draw_count, + p_index_info, + instance_count, + first_instance, + stride, + p_vertex_offset, + ) + } +} +#[doc = "Generated from 'VK_EXT_multi_draw'"] +impl StructureType { + pub const PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: Self = Self(1_000_392_000); +} +#[doc = "Generated from 'VK_EXT_multi_draw'"] +impl StructureType { + pub const PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT: Self = Self(1_000_392_001); } impl ExtExtension394Fn { pub fn name() -> &'static ::std::ffi::CStr { @@ -25077,3 +25422,79 @@ impl ArmExtension416Fn { ArmExtension416Fn {} } } +impl KhrExtension417Fn { + pub fn name() -> &'static ::std::ffi::CStr { + ::std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_extension_417\0") + .expect("Wrong extension string") + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct KhrExtension417Fn {} +unsafe impl Send for KhrExtension417Fn {} +unsafe impl Sync for KhrExtension417Fn {} +impl KhrExtension417Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + KhrExtension417Fn {} + } +} +impl ArmExtension418Fn { + pub fn name() -> &'static ::std::ffi::CStr { + ::std::ffi::CStr::from_bytes_with_nul(b"VK_ARM_extension_418\0") + .expect("Wrong extension string") + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct ArmExtension418Fn {} +unsafe impl Send for ArmExtension418Fn {} +unsafe impl Sync for ArmExtension418Fn {} +impl ArmExtension418Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ArmExtension418Fn {} + } +} +impl ExtExtension419Fn { + pub fn name() -> &'static ::std::ffi::CStr { + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_419\0") + .expect("Wrong extension string") + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct ExtExtension419Fn {} +unsafe impl Send for ExtExtension419Fn {} +unsafe impl Sync for ExtExtension419Fn {} +impl ExtExtension419Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension419Fn {} + } +} +impl ExtExtension420Fn { + pub fn name() -> &'static ::std::ffi::CStr { + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_420\0") + .expect("Wrong extension string") + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct ExtExtension420Fn {} +unsafe impl Send for ExtExtension420Fn {} +unsafe impl Sync for ExtExtension420Fn {} +impl ExtExtension420Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension420Fn {} + } +} diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index 9d10a96..0193e15 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit 9d10a96f2d57c3c37e167f2e73c9a31ac2e51fa5 +Subproject commit 0193e158bc9f4d17e3c3a61c9311a0439ed5572d diff --git a/generator/src/lib.rs b/generator/src/lib.rs index cc0d1ad..f639040 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -29,7 +29,7 @@ pub enum CType { } impl CType { - fn to_string(&self) -> &'static str { + fn to_string(self) -> &'static str { match self { Self::USize => "usize", Self::U32 => "u32", @@ -1101,7 +1101,7 @@ pub fn generate_extension_constants<'a>( vk_parse::ExtensionChild::Require { items, .. } => Some(items.iter()), _ => None, }) - .flat_map(|iter| iter); + .flatten(); let enum_tokens = items.filter_map(|item| match item { vk_parse::InterfaceItem::Enum(enum_) => { if !const_cache.insert(enum_.name.as_str()) { @@ -1916,7 +1916,7 @@ pub fn derive_setters( }; // Interpret void array as byte array - if field.basetype == "void" { + if field.basetype == "void" && matches!(field.reference, Some(vkxml::ReferenceType::Pointer)) { let mutable = if field.is_const { quote!(const) } else { quote!(mut) }; slice_param_ty_tokens = quote!([u8]); @@ -2121,6 +2121,7 @@ pub fn generate_struct( } #[repr(C)] #[derive(Copy, Clone)] + #[doc = ""] pub struct AccelerationStructureInstanceKHR { pub transform: TransformMatrixKHR, pub instance_custom_index_and_mask: u32, @@ -2130,6 +2131,36 @@ pub fn generate_struct( }; } + if &_struct.name == "VkAccelerationStructureSRTMotionInstanceNV" { + return quote! { + #[repr(C)] + #[derive(Copy, Clone)] + #[doc = ""] + pub struct AccelerationStructureSRTMotionInstanceNV { + pub transform_t0: SRTDataNV, + pub transform_t1: SRTDataNV, + pub instance_custom_index_and_mask: u32, + pub instance_shader_binding_table_record_offset_and_flags: u32, + pub acceleration_structure_reference: AccelerationStructureReferenceKHR, + } + }; + } + + if &_struct.name == "VkAccelerationStructureMatrixMotionInstanceNV" { + return quote! { + #[repr(C)] + #[derive(Copy, Clone)] + #[doc = ""] + pub struct AccelerationStructureMatrixMotionInstanceNV { + pub transform_t0: TransformMatrixKHR, + pub transform_t1: TransformMatrixKHR, + pub instance_custom_index_and_mask: u32, + pub instance_shader_binding_table_record_offset_and_flags: u32, + pub acceleration_structure_reference: AccelerationStructureReferenceKHR, + } + }; + } + let members = _struct.elements.iter().filter_map(|elem| match *elem { vkxml::StructElement::Member(ref field) => Some(field), _ => None, @@ -2893,6 +2924,10 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { pub use features::*; /// Native bindings from Vulkan headers, generated by bindgen #[allow(nonstandard_style)] + // Temporarily allow UB nullptr dereference in bindgen layout tests until fixed upstream: + // https://github.com/rust-lang/rust-bindgen/pull/2055 + // https://github.com/rust-lang/rust-bindgen/pull/2064 + #[allow(deref_nullptr)] pub mod native; mod platform_types; pub use platform_types::*; @@ -2945,13 +2980,7 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { let (header_includes, header_types) = extract_native_types(&spec2); for (_name, path) in header_includes { - let path = if path == "vk_platform.h" { - // Fix broken path, https://github.com/KhronosGroup/Vulkan-Docs/pull/1538 - vk_include.join("vulkan").join(path) - } else { - vk_include.join(path) - }; - bindings = bindings.header(path.to_str().expect("Valid UTF8 string")); + bindings = bindings.header(vk_include.join(path).to_str().expect("Valid UTF8 string")); } for typ in header_types {