diff --git a/Changelog.md b/Changelog.md index 067b2e63f..44eba5c49 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Update Vulkan-Headers to 1.3.240 (#697) +- Update Vulkan-Headers to 1.3.241 (#697) ### Changed diff --git a/ash/Cargo.toml b/ash/Cargo.toml index 394be0be9..33b2d4e33 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.37.0+1.3.240" +version = "0.37.0+1.3.241" authors = [ "Maik Klein ", "Benjamin Saunders ", diff --git a/ash/src/vk/aliases.rs b/ash/src/vk/aliases.rs index fda56e0d8..2b52b78ff 100644 --- a/ash/src/vk/aliases.rs +++ b/ash/src/vk/aliases.rs @@ -45,6 +45,8 @@ pub type ChromaLocationKHR = ChromaLocation; pub type SamplerReductionModeEXT = SamplerReductionMode; pub type ShaderFloatControlsIndependenceKHR = ShaderFloatControlsIndependence; pub type DriverIdKHR = DriverId; +pub type PhysicalDeviceExternalSciBufFeaturesNV<'a> = + PhysicalDeviceExternalMemorySciBufFeaturesNV<'a>; pub type DevicePrivateDataCreateInfoEXT<'a> = DevicePrivateDataCreateInfo<'a>; pub type PrivateDataSlotCreateInfoEXT<'a> = PrivateDataSlotCreateInfo<'a>; pub type PhysicalDevicePrivateDataFeaturesEXT<'a> = PhysicalDevicePrivateDataFeatures<'a>; diff --git a/ash/src/vk/bitflags.rs b/ash/src/vk/bitflags.rs index 66699d721..f8eeabe90 100644 --- a/ash/src/vk/bitflags.rs +++ b/ash/src/vk/bitflags.rs @@ -952,6 +952,12 @@ vk_bitflags_wrapped!(ShaderCorePropertiesFlagsAMD, Flags); impl ShaderCorePropertiesFlagsAMD {} #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct RefreshObjectFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(RefreshObjectFlagsKHR, Flags); +impl RefreshObjectFlagsKHR {} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] #[doc = ""] pub struct ShaderModuleCreateFlags(pub(crate) Flags); vk_bitflags_wrapped!(ShaderModuleCreateFlags, Flags); diff --git a/ash/src/vk/const_debugs.rs b/ash/src/vk/const_debugs.rs index 225ab71a3..77f04dcec 100644 --- a/ash/src/vk/const_debugs.rs +++ b/ash/src/vk/const_debugs.rs @@ -1524,12 +1524,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"), @@ -1656,6 +1659,14 @@ impl fmt::Debug for ExternalFenceHandleTypeFlags { "OPAQUE_WIN32_KMT", ), (ExternalFenceHandleTypeFlags::SYNC_FD.0, "SYNC_FD"), + ( + ExternalFenceHandleTypeFlags::SCI_SYNC_OBJ_NV.0, + "SCI_SYNC_OBJ_NV", + ), + ( + ExternalFenceHandleTypeFlags::SCI_SYNC_FENCE_NV.0, + "SCI_SYNC_FENCE_NV", + ), ]; debug_flags(f, KNOWN, self.0) } @@ -1732,6 +1743,7 @@ impl fmt::Debug for ExternalMemoryHandleTypeFlags { ExternalMemoryHandleTypeFlags::RDMA_ADDRESS_NV.0, "RDMA_ADDRESS_NV", ), + (ExternalMemoryHandleTypeFlags::SCI_BUF_NV.0, "SCI_BUF_NV"), ]; debug_flags(f, KNOWN, self.0) } @@ -1789,10 +1801,62 @@ impl fmt::Debug for ExternalSemaphoreHandleTypeFlags { ExternalSemaphoreHandleTypeFlags::ZIRCON_EVENT_FUCHSIA.0, "ZIRCON_EVENT_FUCHSIA", ), + ( + ExternalSemaphoreHandleTypeFlags::SCI_SYNC_OBJ_NV.0, + "SCI_SYNC_OBJ_NV", + ), ]; debug_flags(f, KNOWN, self.0) } } +impl fmt::Debug for FaultLevel { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::UNASSIGNED => Some("UNASSIGNED"), + Self::CRITICAL => Some("CRITICAL"), + Self::RECOVERABLE => Some("RECOVERABLE"), + Self::WARNING => Some("WARNING"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} +impl fmt::Debug for FaultQueryBehavior { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::GET_AND_CLEAR_ALL_FAULTS => Some("GET_AND_CLEAR_ALL_FAULTS"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} +impl fmt::Debug for FaultType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::INVALID => Some("INVALID"), + Self::UNASSIGNED => Some("UNASSIGNED"), + Self::IMPLEMENTATION => Some("IMPLEMENTATION"), + Self::SYSTEM => Some("SYSTEM"), + Self::PHYSICAL_DEVICE => Some("PHYSICAL_DEVICE"), + Self::COMMAND_BUFFER_FULL => Some("COMMAND_BUFFER_FULL"), + Self::INVALID_API_USAGE => Some("INVALID_API_USAGE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} impl fmt::Debug for FenceCreateFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[(FenceCreateFlags::SIGNALED.0, "SIGNALED")]; @@ -2851,6 +2915,7 @@ impl fmt::Debug for MemoryHeapFlags { const KNOWN: &[(Flags, &str)] = &[ (MemoryHeapFlags::DEVICE_LOCAL.0, "DEVICE_LOCAL"), (MemoryHeapFlags::MULTI_INSTANCE.0, "MULTI_INSTANCE"), + (MemoryHeapFlags::SEU_SAFE.0, "SEU_SAFE"), ]; debug_flags(f, KNOWN, self.0) } @@ -3231,10 +3296,16 @@ impl fmt::Debug for PipelineBindPoint { } impl fmt::Debug for PipelineCacheCreateFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[( - PipelineCacheCreateFlags::EXTERNALLY_SYNCHRONIZED.0, - "EXTERNALLY_SYNCHRONIZED", - )]; + const KNOWN: &[(Flags, &str)] = &[ + ( + PipelineCacheCreateFlags::EXTERNALLY_SYNCHRONIZED.0, + "EXTERNALLY_SYNCHRONIZED", + ), + ( + PipelineCacheCreateFlags::USE_APPLICATION_STORAGE.0, + "USE_APPLICATION_STORAGE", + ), + ]; debug_flags(f, KNOWN, self.0) } } @@ -3242,6 +3313,20 @@ impl fmt::Debug for PipelineCacheHeaderVersion { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { Self::ONE => Some("ONE"), + Self::SAFETY_CRITICAL_ONE => Some("SAFETY_CRITICAL_ONE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} +impl fmt::Debug for PipelineCacheValidationVersion { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::SAFETY_CRITICAL_ONE => Some("SAFETY_CRITICAL_ONE"), _ => None, }; if let Some(x) = name { @@ -3464,6 +3549,19 @@ impl fmt::Debug for PipelineLayoutCreateFlags { debug_flags(f, KNOWN, self.0) } } +impl fmt::Debug for PipelineMatchControl { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::APPLICATION_UUID_EXACT_MATCH => Some("APPLICATION_UUID_EXACT_MATCH"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} impl fmt::Debug for PipelineMultisampleStateCreateFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[]; @@ -4083,6 +4181,12 @@ impl fmt::Debug for RayTracingShaderGroupTypeKHR { } } } +impl fmt::Debug for RefreshObjectFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[]; + debug_flags(f, KNOWN, self.0) + } +} impl fmt::Debug for RenderPassCreateFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = @@ -4234,6 +4338,35 @@ impl fmt::Debug for SamplerYcbcrRange { } } } +impl fmt::Debug for SciSyncClientTypeNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::SIGNALER => Some("SIGNALER"), + Self::WAITER => Some("WAITER"), + Self::SIGNALER_WAITER => Some("SIGNALER_WAITER"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} +impl fmt::Debug for SciSyncPrimitiveTypeNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::FENCE => Some("FENCE"), + Self::SEMAPHORE => Some("SEMAPHORE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} impl fmt::Debug for ScopeNV { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -4727,6 +4860,9 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV => { Some("PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV") } + Self::PRIVATE_VENDOR_INFO_RESERVED_OFFSET_0_NV => { + Some("PRIVATE_VENDOR_INFO_RESERVED_OFFSET_0_NV") + } Self::EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV => { Some("EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV") } @@ -4847,6 +4983,9 @@ impl fmt::Debug for StructureType { Self::PERFORMANCE_COUNTER_DESCRIPTION_KHR => { Some("PERFORMANCE_COUNTER_DESCRIPTION_KHR") } + Self::PERFORMANCE_QUERY_RESERVATION_INFO_KHR => { + Some("PERFORMANCE_QUERY_RESERVATION_INFO_KHR") + } Self::PHYSICAL_DEVICE_SURFACE_INFO_2_KHR => Some("PHYSICAL_DEVICE_SURFACE_INFO_2_KHR"), Self::SURFACE_CAPABILITIES_2_KHR => Some("SURFACE_CAPABILITIES_2_KHR"), Self::SURFACE_FORMAT_2_KHR => Some("SURFACE_FORMAT_2_KHR"), @@ -5391,6 +5530,7 @@ impl fmt::Debug for StructureType { Self::DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV => { Some("DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV") } + Self::REFRESH_OBJECT_LIST_KHR => Some("REFRESH_OBJECT_LIST_KHR"), Self::EXPORT_METAL_OBJECT_CREATE_INFO_EXT => { Some("EXPORT_METAL_OBJECT_CREATE_INFO_EXT") } @@ -5606,6 +5746,23 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT => { Some("PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT") } + Self::IMPORT_FENCE_SCI_SYNC_INFO_NV => Some("IMPORT_FENCE_SCI_SYNC_INFO_NV"), + Self::EXPORT_FENCE_SCI_SYNC_INFO_NV => Some("EXPORT_FENCE_SCI_SYNC_INFO_NV"), + Self::FENCE_GET_SCI_SYNC_INFO_NV => Some("FENCE_GET_SCI_SYNC_INFO_NV"), + Self::SCI_SYNC_ATTRIBUTES_INFO_NV => Some("SCI_SYNC_ATTRIBUTES_INFO_NV"), + Self::IMPORT_SEMAPHORE_SCI_SYNC_INFO_NV => Some("IMPORT_SEMAPHORE_SCI_SYNC_INFO_NV"), + Self::EXPORT_SEMAPHORE_SCI_SYNC_INFO_NV => Some("EXPORT_SEMAPHORE_SCI_SYNC_INFO_NV"), + Self::SEMAPHORE_GET_SCI_SYNC_INFO_NV => Some("SEMAPHORE_GET_SCI_SYNC_INFO_NV"), + Self::PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_FEATURES_NV => { + Some("PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_FEATURES_NV") + } + Self::IMPORT_MEMORY_SCI_BUF_INFO_NV => Some("IMPORT_MEMORY_SCI_BUF_INFO_NV"), + Self::EXPORT_MEMORY_SCI_BUF_INFO_NV => Some("EXPORT_MEMORY_SCI_BUF_INFO_NV"), + Self::MEMORY_GET_SCI_BUF_INFO_NV => Some("MEMORY_GET_SCI_BUF_INFO_NV"), + Self::MEMORY_SCI_BUF_PROPERTIES_NV => Some("MEMORY_SCI_BUF_PROPERTIES_NV"), + Self::PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCI_BUF_FEATURES_NV => { + Some("PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCI_BUF_FEATURES_NV") + } Self::PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT => { Some("PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT") } @@ -5675,6 +5832,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") } @@ -5714,6 +5878,7 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV => { Some("PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV") } + Self::APPLICATION_PARAMETERS_EXT => Some("APPLICATION_PARAMETERS_EXT"), Self::PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT => { Some("PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT") } @@ -5791,6 +5956,16 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM => { Some("PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM") } + Self::SEMAPHORE_SCI_SYNC_POOL_CREATE_INFO_NV => { + Some("SEMAPHORE_SCI_SYNC_POOL_CREATE_INFO_NV") + } + Self::SEMAPHORE_SCI_SYNC_CREATE_INFO_NV => Some("SEMAPHORE_SCI_SYNC_CREATE_INFO_NV"), + Self::PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_2_FEATURES_NV => { + Some("PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_2_FEATURES_NV") + } + Self::DEVICE_SEMAPHORE_SCI_SYNC_POOL_RESERVATION_CREATE_INFO_NV => { + Some("DEVICE_SEMAPHORE_SCI_SYNC_POOL_RESERVATION_CREATE_INFO_NV") + } Self::PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV => { Some("PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV") } @@ -5812,6 +5987,12 @@ impl fmt::Debug for StructureType { 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") } @@ -6149,6 +6330,23 @@ impl fmt::Debug for StructureType { } Self::DEVICE_BUFFER_MEMORY_REQUIREMENTS => Some("DEVICE_BUFFER_MEMORY_REQUIREMENTS"), Self::DEVICE_IMAGE_MEMORY_REQUIREMENTS => Some("DEVICE_IMAGE_MEMORY_REQUIREMENTS"), + Self::PHYSICAL_DEVICE_VULKAN_SC_1_0_FEATURES => { + Some("PHYSICAL_DEVICE_VULKAN_SC_1_0_FEATURES") + } + Self::PHYSICAL_DEVICE_VULKAN_SC_1_0_PROPERTIES => { + Some("PHYSICAL_DEVICE_VULKAN_SC_1_0_PROPERTIES") + } + Self::DEVICE_OBJECT_RESERVATION_CREATE_INFO => { + Some("DEVICE_OBJECT_RESERVATION_CREATE_INFO") + } + Self::COMMAND_POOL_MEMORY_RESERVATION_CREATE_INFO => { + Some("COMMAND_POOL_MEMORY_RESERVATION_CREATE_INFO") + } + Self::COMMAND_POOL_MEMORY_CONSUMPTION => Some("COMMAND_POOL_MEMORY_CONSUMPTION"), + Self::PIPELINE_POOL_SIZE => Some("PIPELINE_POOL_SIZE"), + Self::FAULT_DATA => Some("FAULT_DATA"), + Self::FAULT_CALLBACK_INFO => Some("FAULT_CALLBACK_INFO"), + Self::PIPELINE_OFFLINE_CREATE_INFO => Some("PIPELINE_OFFLINE_CREATE_INFO"), _ => None, }; if let Some(x) = name { 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 97b774548..717c5201c 100644 --- a/ash/src/vk/definitions.rs +++ b/ash/src/vk/definitions.rs @@ -58,7 +58,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 = 240; +pub const HEADER_VERSION: u32 = 241; #[doc = ""] pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 3, HEADER_VERSION); #[doc = ""] @@ -446,6 +446,7 @@ handle_nondispatchable ! (DebugReportCallbackEXT , DEBUG_REPORT_CALLBACK_EXT , d handle_nondispatchable ! (DebugUtilsMessengerEXT , DEBUG_UTILS_MESSENGER_EXT , doc = "") ; handle_nondispatchable ! (VideoSessionKHR , VIDEO_SESSION_KHR , doc = "") ; handle_nondispatchable ! (VideoSessionParametersKHR , VIDEO_SESSION_PARAMETERS_KHR , doc = "") ; +handle_nondispatchable ! (SemaphoreSciSyncPoolNV , SEMAPHORE_SCI_SYNC_POOL_NV , doc = "") ; #[allow(non_camel_case_types)] #[doc = ""] pub type PFN_vkInternalAllocationNotification = Option< @@ -519,6 +520,15 @@ pub type PFN_vkDebugUtilsMessengerCallbackEXT = Option< ) -> Bool32, >; #[allow(non_camel_case_types)] +#[doc = ""] +pub type PFN_vkFaultCallbackFunction = Option< + unsafe extern "system" fn( + unrecorded_faults: Bool32, + fault_count: u32, + p_faults: *const FaultData, + ), +>; +#[allow(non_camel_case_types)] #[doc = ""] pub type PFN_vkDeviceMemoryReportCallbackEXT = Option< unsafe extern "system" fn( @@ -1006,6 +1016,7 @@ impl ::std::default::Default for ApplicationInfo<'_> { unsafe impl<'a> TaggedStructure for ApplicationInfo<'a> { const STRUCTURE_TYPE: StructureType = StructureType::APPLICATION_INFO; } +pub unsafe trait ExtendsApplicationInfo {} impl<'a> ApplicationInfo<'a> { #[inline] pub fn application_name(mut self, application_name: &'a ::std::ffi::CStr) -> Self { @@ -1032,6 +1043,20 @@ impl<'a> ApplicationInfo<'a> { self.api_version = api_version; 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 `x.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 = <*const T>::cast(next); + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.p_next as _; + self.p_next = next_ptr; + } + self + } } #[repr(C)] #[derive(Copy, Clone)] @@ -4797,6 +4822,132 @@ impl PipelineCacheHeaderVersionOne { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone, Default)] +#[doc = ""] +pub struct PipelineCacheStageValidationIndexEntry { + pub code_size: u64, + pub code_offset: u64, +} +impl PipelineCacheStageValidationIndexEntry { + #[inline] + pub fn code_offset(mut self, code_offset: u64) -> Self { + self.code_offset = code_offset; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PipelineCacheSafetyCriticalIndexEntry { + pub pipeline_identifier: [u8; UUID_SIZE], + pub pipeline_memory_size: u64, + pub json_size: u64, + pub json_offset: u64, + pub stage_index_count: u32, + pub stage_index_stride: u32, + pub stage_index_offset: u64, +} +impl ::std::default::Default for PipelineCacheSafetyCriticalIndexEntry { + #[inline] + fn default() -> Self { + Self { + pipeline_identifier: unsafe { ::std::mem::zeroed() }, + pipeline_memory_size: u64::default(), + json_size: u64::default(), + json_offset: u64::default(), + stage_index_count: u32::default(), + stage_index_stride: u32::default(), + stage_index_offset: u64::default(), + } + } +} +impl PipelineCacheSafetyCriticalIndexEntry { + #[inline] + pub fn pipeline_identifier(mut self, pipeline_identifier: [u8; UUID_SIZE]) -> Self { + self.pipeline_identifier = pipeline_identifier; + self + } + #[inline] + pub fn pipeline_memory_size(mut self, pipeline_memory_size: u64) -> Self { + self.pipeline_memory_size = pipeline_memory_size; + self + } + #[inline] + pub fn json_size(mut self, json_size: u64) -> Self { + self.json_size = json_size; + self + } + #[inline] + pub fn json_offset(mut self, json_offset: u64) -> Self { + self.json_offset = json_offset; + self + } + #[inline] + pub fn stage_index_count(mut self, stage_index_count: u32) -> Self { + self.stage_index_count = stage_index_count; + self + } + #[inline] + pub fn stage_index_stride(mut self, stage_index_stride: u32) -> Self { + self.stage_index_stride = stage_index_stride; + self + } + #[inline] + pub fn stage_index_offset(mut self, stage_index_offset: u64) -> Self { + self.stage_index_offset = stage_index_offset; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone, Default)] +#[doc = ""] +pub struct PipelineCacheHeaderVersionSafetyCriticalOne { + pub header_version_one: PipelineCacheHeaderVersionOne, + pub validation_version: PipelineCacheValidationVersion, + pub implementation_data: u32, + pub pipeline_index_count: u32, + pub pipeline_index_stride: u32, + pub pipeline_index_offset: u64, +} +impl PipelineCacheHeaderVersionSafetyCriticalOne { + #[inline] + pub fn header_version_one(mut self, header_version_one: PipelineCacheHeaderVersionOne) -> Self { + self.header_version_one = header_version_one; + self + } + #[inline] + pub fn validation_version( + mut self, + validation_version: PipelineCacheValidationVersion, + ) -> Self { + self.validation_version = validation_version; + self + } + #[inline] + pub fn implementation_data(mut self, implementation_data: u32) -> Self { + self.implementation_data = implementation_data; + self + } + #[inline] + pub fn pipeline_index_count(mut self, pipeline_index_count: u32) -> Self { + self.pipeline_index_count = pipeline_index_count; + self + } + #[inline] + pub fn pipeline_index_stride(mut self, pipeline_index_stride: u32) -> Self { + self.pipeline_index_stride = pipeline_index_stride; + self + } + #[inline] + pub fn pipeline_index_offset(mut self, pipeline_index_offset: u64) -> Self { + self.pipeline_index_offset = pipeline_index_offset; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone, Default)] #[doc = ""] pub struct PushConstantRange { pub stage_flags: ShaderStageFlags, @@ -5048,6 +5199,7 @@ impl ::std::default::Default for CommandPoolCreateInfo<'_> { unsafe impl<'a> TaggedStructure for CommandPoolCreateInfo<'a> { const STRUCTURE_TYPE: StructureType = StructureType::COMMAND_POOL_CREATE_INFO; } +pub unsafe trait ExtendsCommandPoolCreateInfo {} impl<'a> CommandPoolCreateInfo<'a> { #[inline] pub fn flags(mut self, flags: CommandPoolCreateFlags) -> Self { @@ -5059,6 +5211,20 @@ impl<'a> CommandPoolCreateInfo<'a> { self.queue_family_index = queue_family_index; 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 `x.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 = <*const T>::cast(next); + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.p_next as _; + self.p_next = next_ptr; + } + self + } } #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] @@ -8750,6 +8916,60 @@ impl<'a> ValidationFeaturesEXT<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct ApplicationParametersEXT<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub vendor_id: u32, + pub device_id: u32, + pub key: u32, + pub value: u64, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for ApplicationParametersEXT<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + vendor_id: u32::default(), + device_id: u32::default(), + key: u32::default(), + value: u64::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for ApplicationParametersEXT<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::APPLICATION_PARAMETERS_EXT; +} +unsafe impl ExtendsApplicationInfo for ApplicationParametersEXT<'_> {} +unsafe impl ExtendsDeviceCreateInfo for ApplicationParametersEXT<'_> {} +impl<'a> ApplicationParametersEXT<'a> { + #[inline] + pub fn vendor_id(mut self, vendor_id: u32) -> Self { + self.vendor_id = vendor_id; + self + } + #[inline] + pub fn device_id(mut self, device_id: u32) -> Self { + self.device_id = device_id; + self + } + #[inline] + pub fn key(mut self, key: u32) -> Self { + self.key = key; + self + } + #[inline] + pub fn value(mut self, value: u64) -> Self { + self.value = value; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PipelineRasterizationStateRasterizationOrderAMD<'a> { pub s_type: StructureType, @@ -9214,6 +9434,187 @@ impl<'a> ExportMemoryWin32HandleInfoNV<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct ExportMemorySciBufInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_attributes: NvSciBufAttrList, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for ExportMemorySciBufInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + p_attributes: unsafe { ::std::mem::zeroed() }, + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for ExportMemorySciBufInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::EXPORT_MEMORY_SCI_BUF_INFO_NV; +} +unsafe impl ExtendsMemoryAllocateInfo for ExportMemorySciBufInfoNV<'_> {} +impl<'a> ExportMemorySciBufInfoNV<'a> { + #[inline] + pub fn attributes(mut self, attributes: NvSciBufAttrList) -> Self { + self.p_attributes = attributes; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct ImportMemorySciBufInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub handle_type: ExternalMemoryHandleTypeFlags, + pub handle: NvSciBufObj, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for ImportMemorySciBufInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + handle_type: ExternalMemoryHandleTypeFlags::default(), + handle: unsafe { ::std::mem::zeroed() }, + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for ImportMemorySciBufInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::IMPORT_MEMORY_SCI_BUF_INFO_NV; +} +unsafe impl ExtendsMemoryAllocateInfo for ImportMemorySciBufInfoNV<'_> {} +impl<'a> ImportMemorySciBufInfoNV<'a> { + #[inline] + pub fn handle_type(mut self, handle_type: ExternalMemoryHandleTypeFlags) -> Self { + self.handle_type = handle_type; + self + } + #[inline] + pub fn handle(mut self, handle: NvSciBufObj) -> Self { + self.handle = handle; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct MemoryGetSciBufInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub memory: DeviceMemory, + pub handle_type: ExternalMemoryHandleTypeFlags, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for MemoryGetSciBufInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + memory: DeviceMemory::default(), + handle_type: ExternalMemoryHandleTypeFlags::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for MemoryGetSciBufInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::MEMORY_GET_SCI_BUF_INFO_NV; +} +impl<'a> MemoryGetSciBufInfoNV<'a> { + #[inline] + pub fn memory(mut self, memory: DeviceMemory) -> Self { + self.memory = memory; + self + } + #[inline] + pub fn handle_type(mut self, handle_type: ExternalMemoryHandleTypeFlags) -> Self { + self.handle_type = handle_type; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct MemorySciBufPropertiesNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub memory_type_bits: u32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for MemorySciBufPropertiesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + memory_type_bits: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for MemorySciBufPropertiesNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::MEMORY_SCI_BUF_PROPERTIES_NV; +} +impl<'a> MemorySciBufPropertiesNV<'a> { + #[inline] + pub fn memory_type_bits(mut self, memory_type_bits: u32) -> Self { + self.memory_type_bits = memory_type_bits; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceExternalMemorySciBufFeaturesNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub sci_buf_import: Bool32, + pub sci_buf_export: Bool32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceExternalMemorySciBufFeaturesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + sci_buf_import: Bool32::default(), + sci_buf_export: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceExternalMemorySciBufFeaturesNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCI_BUF_FEATURES_NV; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceExternalMemorySciBufFeaturesNV<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceExternalMemorySciBufFeaturesNV<'_> {} +impl<'a> PhysicalDeviceExternalMemorySciBufFeaturesNV<'a> { + #[inline] + pub fn sci_buf_import(mut self, sci_buf_import: bool) -> Self { + self.sci_buf_import = sci_buf_import.into(); + self + } + #[inline] + pub fn sci_buf_export(mut self, sci_buf_export: bool) -> Self { + self.sci_buf_export = sci_buf_export.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct Win32KeyedMutexAcquireReleaseInfoNV<'a> { pub s_type: StructureType, @@ -12458,6 +12859,493 @@ impl<'a> FenceGetFdInfoKHR<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct ExportFenceSciSyncInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_attributes: NvSciSyncAttrList, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for ExportFenceSciSyncInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + p_attributes: unsafe { ::std::mem::zeroed() }, + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for ExportFenceSciSyncInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::EXPORT_FENCE_SCI_SYNC_INFO_NV; +} +unsafe impl ExtendsFenceCreateInfo for ExportFenceSciSyncInfoNV<'_> {} +impl<'a> ExportFenceSciSyncInfoNV<'a> { + #[inline] + pub fn attributes(mut self, attributes: NvSciSyncAttrList) -> Self { + self.p_attributes = attributes; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct ImportFenceSciSyncInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub fence: Fence, + pub handle_type: ExternalFenceHandleTypeFlags, + pub handle: *mut c_void, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for ImportFenceSciSyncInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + fence: Fence::default(), + handle_type: ExternalFenceHandleTypeFlags::default(), + handle: ::std::ptr::null_mut(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for ImportFenceSciSyncInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::IMPORT_FENCE_SCI_SYNC_INFO_NV; +} +impl<'a> ImportFenceSciSyncInfoNV<'a> { + #[inline] + pub fn fence(mut self, fence: Fence) -> Self { + self.fence = fence; + self + } + #[inline] + pub fn handle_type(mut self, handle_type: ExternalFenceHandleTypeFlags) -> Self { + self.handle_type = handle_type; + self + } + #[inline] + pub fn handle(mut self, handle: *mut c_void) -> Self { + self.handle = handle; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct FenceGetSciSyncInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub fence: Fence, + pub handle_type: ExternalFenceHandleTypeFlags, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for FenceGetSciSyncInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + fence: Fence::default(), + handle_type: ExternalFenceHandleTypeFlags::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for FenceGetSciSyncInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::FENCE_GET_SCI_SYNC_INFO_NV; +} +impl<'a> FenceGetSciSyncInfoNV<'a> { + #[inline] + pub fn fence(mut self, fence: Fence) -> Self { + self.fence = fence; + self + } + #[inline] + pub fn handle_type(mut self, handle_type: ExternalFenceHandleTypeFlags) -> Self { + self.handle_type = handle_type; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct ExportSemaphoreSciSyncInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_attributes: NvSciSyncAttrList, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for ExportSemaphoreSciSyncInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + p_attributes: unsafe { ::std::mem::zeroed() }, + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for ExportSemaphoreSciSyncInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::EXPORT_SEMAPHORE_SCI_SYNC_INFO_NV; +} +unsafe impl ExtendsSemaphoreCreateInfo for ExportSemaphoreSciSyncInfoNV<'_> {} +impl<'a> ExportSemaphoreSciSyncInfoNV<'a> { + #[inline] + pub fn attributes(mut self, attributes: NvSciSyncAttrList) -> Self { + self.p_attributes = attributes; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct ImportSemaphoreSciSyncInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub semaphore: Semaphore, + pub handle_type: ExternalSemaphoreHandleTypeFlags, + pub handle: *mut c_void, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for ImportSemaphoreSciSyncInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + semaphore: Semaphore::default(), + handle_type: ExternalSemaphoreHandleTypeFlags::default(), + handle: ::std::ptr::null_mut(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for ImportSemaphoreSciSyncInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::IMPORT_SEMAPHORE_SCI_SYNC_INFO_NV; +} +impl<'a> ImportSemaphoreSciSyncInfoNV<'a> { + #[inline] + pub fn semaphore(mut self, semaphore: Semaphore) -> Self { + self.semaphore = semaphore; + self + } + #[inline] + pub fn handle_type(mut self, handle_type: ExternalSemaphoreHandleTypeFlags) -> Self { + self.handle_type = handle_type; + self + } + #[inline] + pub fn handle(mut self, handle: *mut c_void) -> Self { + self.handle = handle; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct SemaphoreGetSciSyncInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub semaphore: Semaphore, + pub handle_type: ExternalSemaphoreHandleTypeFlags, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for SemaphoreGetSciSyncInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + semaphore: Semaphore::default(), + handle_type: ExternalSemaphoreHandleTypeFlags::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for SemaphoreGetSciSyncInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::SEMAPHORE_GET_SCI_SYNC_INFO_NV; +} +impl<'a> SemaphoreGetSciSyncInfoNV<'a> { + #[inline] + pub fn semaphore(mut self, semaphore: Semaphore) -> Self { + self.semaphore = semaphore; + self + } + #[inline] + pub fn handle_type(mut self, handle_type: ExternalSemaphoreHandleTypeFlags) -> Self { + self.handle_type = handle_type; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct SciSyncAttributesInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub client_type: SciSyncClientTypeNV, + pub primitive_type: SciSyncPrimitiveTypeNV, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for SciSyncAttributesInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + client_type: SciSyncClientTypeNV::default(), + primitive_type: SciSyncPrimitiveTypeNV::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for SciSyncAttributesInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::SCI_SYNC_ATTRIBUTES_INFO_NV; +} +impl<'a> SciSyncAttributesInfoNV<'a> { + #[inline] + pub fn client_type(mut self, client_type: SciSyncClientTypeNV) -> Self { + self.client_type = client_type; + self + } + #[inline] + pub fn primitive_type(mut self, primitive_type: SciSyncPrimitiveTypeNV) -> Self { + self.primitive_type = primitive_type; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceExternalSciSyncFeaturesNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub sci_sync_fence: Bool32, + pub sci_sync_semaphore: Bool32, + pub sci_sync_import: Bool32, + pub sci_sync_export: Bool32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceExternalSciSyncFeaturesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + sci_sync_fence: Bool32::default(), + sci_sync_semaphore: Bool32::default(), + sci_sync_import: Bool32::default(), + sci_sync_export: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceExternalSciSyncFeaturesNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_FEATURES_NV; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceExternalSciSyncFeaturesNV<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceExternalSciSyncFeaturesNV<'_> {} +impl<'a> PhysicalDeviceExternalSciSyncFeaturesNV<'a> { + #[inline] + pub fn sci_sync_fence(mut self, sci_sync_fence: bool) -> Self { + self.sci_sync_fence = sci_sync_fence.into(); + self + } + #[inline] + pub fn sci_sync_semaphore(mut self, sci_sync_semaphore: bool) -> Self { + self.sci_sync_semaphore = sci_sync_semaphore.into(); + self + } + #[inline] + pub fn sci_sync_import(mut self, sci_sync_import: bool) -> Self { + self.sci_sync_import = sci_sync_import.into(); + self + } + #[inline] + pub fn sci_sync_export(mut self, sci_sync_export: bool) -> Self { + self.sci_sync_export = sci_sync_export.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceExternalSciSync2FeaturesNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub sci_sync_fence: Bool32, + pub sci_sync_semaphore2: Bool32, + pub sci_sync_import: Bool32, + pub sci_sync_export: Bool32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceExternalSciSync2FeaturesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + sci_sync_fence: Bool32::default(), + sci_sync_semaphore2: Bool32::default(), + sci_sync_import: Bool32::default(), + sci_sync_export: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceExternalSciSync2FeaturesNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_2_FEATURES_NV; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceExternalSciSync2FeaturesNV<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceExternalSciSync2FeaturesNV<'_> {} +impl<'a> PhysicalDeviceExternalSciSync2FeaturesNV<'a> { + #[inline] + pub fn sci_sync_fence(mut self, sci_sync_fence: bool) -> Self { + self.sci_sync_fence = sci_sync_fence.into(); + self + } + #[inline] + pub fn sci_sync_semaphore2(mut self, sci_sync_semaphore2: bool) -> Self { + self.sci_sync_semaphore2 = sci_sync_semaphore2.into(); + self + } + #[inline] + pub fn sci_sync_import(mut self, sci_sync_import: bool) -> Self { + self.sci_sync_import = sci_sync_import.into(); + self + } + #[inline] + pub fn sci_sync_export(mut self, sci_sync_export: bool) -> Self { + self.sci_sync_export = sci_sync_export.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct SemaphoreSciSyncPoolCreateInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub handle: NvSciSyncObj, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for SemaphoreSciSyncPoolCreateInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + handle: unsafe { ::std::mem::zeroed() }, + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for SemaphoreSciSyncPoolCreateInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::SEMAPHORE_SCI_SYNC_POOL_CREATE_INFO_NV; +} +impl<'a> SemaphoreSciSyncPoolCreateInfoNV<'a> { + #[inline] + pub fn handle(mut self, handle: NvSciSyncObj) -> Self { + self.handle = handle; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct SemaphoreSciSyncCreateInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub semaphore_pool: SemaphoreSciSyncPoolNV, + pub p_fence: *const NvSciSyncFence, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for SemaphoreSciSyncCreateInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + semaphore_pool: SemaphoreSciSyncPoolNV::default(), + p_fence: ::std::ptr::null(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for SemaphoreSciSyncCreateInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::SEMAPHORE_SCI_SYNC_CREATE_INFO_NV; +} +unsafe impl ExtendsSemaphoreCreateInfo for SemaphoreSciSyncCreateInfoNV<'_> {} +impl<'a> SemaphoreSciSyncCreateInfoNV<'a> { + #[inline] + pub fn semaphore_pool(mut self, semaphore_pool: SemaphoreSciSyncPoolNV) -> Self { + self.semaphore_pool = semaphore_pool; + self + } + #[inline] + pub fn fence(mut self, fence: &'a NvSciSyncFence) -> Self { + self.p_fence = fence; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct DeviceSemaphoreSciSyncPoolReservationCreateInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub semaphore_sci_sync_pool_request_count: u32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for DeviceSemaphoreSciSyncPoolReservationCreateInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + semaphore_sci_sync_pool_request_count: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for DeviceSemaphoreSciSyncPoolReservationCreateInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::DEVICE_SEMAPHORE_SCI_SYNC_POOL_RESERVATION_CREATE_INFO_NV; +} +unsafe impl ExtendsDeviceObjectReservationCreateInfo + for DeviceSemaphoreSciSyncPoolReservationCreateInfoNV<'_> +{ +} +impl<'a> DeviceSemaphoreSciSyncPoolReservationCreateInfoNV<'a> { + #[inline] + pub fn semaphore_sci_sync_pool_request_count( + mut self, + semaphore_sci_sync_pool_request_count: u32, + ) -> Self { + self.semaphore_sci_sync_pool_request_count = semaphore_sci_sync_pool_request_count; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PhysicalDeviceMultiviewFeatures<'a> { pub s_type: StructureType, @@ -15409,6 +16297,45 @@ impl<'a> ImageViewUsageCreateInfo<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct ImageViewSlicedCreateInfoEXT<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub slice_offset: u32, + pub slice_count: u32, + pub _marker: PhantomData<&'a ()>, +} +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(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for ImageViewSlicedCreateInfoEXT<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::IMAGE_VIEW_SLICED_CREATE_INFO_EXT; +} +unsafe impl ExtendsImageViewCreateInfo for ImageViewSlicedCreateInfoEXT<'_> {} +impl<'a> ImageViewSlicedCreateInfoEXT<'a> { + #[inline] + pub fn slice_offset(mut self, slice_offset: u32) -> Self { + self.slice_offset = slice_offset; + self + } + #[inline] + pub fn slice_count(mut self, slice_count: u32) -> Self { + self.slice_count = slice_count; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PipelineTessellationDomainOriginStateCreateInfo<'a> { pub s_type: StructureType, @@ -26749,6 +27676,41 @@ impl<'a> PerformanceQuerySubmitInfoKHR<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct PerformanceQueryReservationInfoKHR<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub max_performance_queries_per_pool: u32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PerformanceQueryReservationInfoKHR<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + max_performance_queries_per_pool: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PerformanceQueryReservationInfoKHR<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::PERFORMANCE_QUERY_RESERVATION_INFO_KHR; +} +unsafe impl ExtendsDeviceObjectReservationCreateInfo for PerformanceQueryReservationInfoKHR<'_> {} +impl<'a> PerformanceQueryReservationInfoKHR<'a> { + #[inline] + pub fn max_performance_queries_per_pool( + mut self, + max_performance_queries_per_pool: u32, + ) -> Self { + self.max_performance_queries_per_pool = max_performance_queries_per_pool; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct HeadlessSurfaceCreateInfoEXT<'a> { pub s_type: StructureType, @@ -30672,6 +31634,100 @@ impl<'a> PhysicalDeviceCoherentMemoryFeaturesAMD<'a> { } } #[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct FaultData<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub fault_level: FaultLevel, + pub fault_type: FaultType, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for FaultData<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + fault_level: FaultLevel::default(), + fault_type: FaultType::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for FaultData<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::FAULT_DATA; +} +impl<'a> FaultData<'a> { + #[inline] + pub fn fault_level(mut self, fault_level: FaultLevel) -> Self { + self.fault_level = fault_level; + self + } + #[inline] + pub fn fault_type(mut self, fault_type: FaultType) -> Self { + self.fault_type = fault_type; + self + } +} +#[repr(C)] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct FaultCallbackInfo<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub fault_count: u32, + pub p_faults: *mut FaultData<'a>, + pub pfn_fault_callback: PFN_vkFaultCallbackFunction, + pub _marker: PhantomData<&'a ()>, +} +#[cfg(feature = "debug")] +impl fmt::Debug for FaultCallbackInfo<'_> { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt.debug_struct("FaultCallbackInfo") + .field("s_type", &self.s_type) + .field("p_next", &self.p_next) + .field("fault_count", &self.fault_count) + .field("p_faults", &self.p_faults) + .field( + "pfn_fault_callback", + &(self.pfn_fault_callback.map(|x| x as *const ())), + ) + .finish() + } +} +impl ::std::default::Default for FaultCallbackInfo<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + fault_count: u32::default(), + p_faults: ::std::ptr::null_mut(), + pfn_fault_callback: PFN_vkFaultCallbackFunction::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for FaultCallbackInfo<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::FAULT_CALLBACK_INFO; +} +unsafe impl ExtendsDeviceCreateInfo for FaultCallbackInfo<'_> {} +impl<'a> FaultCallbackInfo<'a> { + #[inline] + pub fn faults(mut self, faults: &'a mut [FaultData]) -> Self { + self.fault_count = faults.len() as _; + self.p_faults = faults.as_mut_ptr(); + self + } + #[inline] + pub fn pfn_fault_callback(mut self, pfn_fault_callback: PFN_vkFaultCallbackFunction) -> Self { + self.pfn_fault_callback = pfn_fault_callback; + self + } +} +#[repr(C)] #[derive(Copy, Clone)] #[doc = ""] pub struct PhysicalDeviceToolProperties<'a> { @@ -31869,6 +32925,66 @@ impl<'a> PipelineLibraryCreateInfoKHR<'a> { } #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone, Default)] +#[doc = ""] +pub struct RefreshObjectKHR { + pub object_type: ObjectType, + pub object_handle: u64, + pub flags: RefreshObjectFlagsKHR, +} +impl RefreshObjectKHR { + #[inline] + pub fn object_type(mut self, object_type: ObjectType) -> Self { + self.object_type = object_type; + self + } + #[inline] + pub fn object_handle(mut self, object_handle: u64) -> Self { + self.object_handle = object_handle; + self + } + #[inline] + pub fn flags(mut self, flags: RefreshObjectFlagsKHR) -> Self { + self.flags = flags; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct RefreshObjectListKHR<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub object_count: u32, + pub p_objects: *const RefreshObjectKHR, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for RefreshObjectListKHR<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + object_count: u32::default(), + p_objects: ::std::ptr::null(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for RefreshObjectListKHR<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::REFRESH_OBJECT_LIST_KHR; +} +impl<'a> RefreshObjectListKHR<'a> { + #[inline] + pub fn objects(mut self, objects: &'a [RefreshObjectKHR]) -> Self { + self.object_count = objects.len() as _; + self.p_objects = objects.as_ptr(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] #[doc = ""] pub struct PhysicalDeviceExtendedDynamicStateFeaturesEXT<'a> { @@ -32621,6 +33737,55 @@ impl<'a> DeviceDiagnosticsConfigCreateInfoNV<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct PipelineOfflineCreateInfo<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub pipeline_identifier: [u8; UUID_SIZE], + pub match_control: PipelineMatchControl, + pub pool_entry_size: DeviceSize, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PipelineOfflineCreateInfo<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + pipeline_identifier: unsafe { ::std::mem::zeroed() }, + match_control: PipelineMatchControl::default(), + pool_entry_size: DeviceSize::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PipelineOfflineCreateInfo<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::PIPELINE_OFFLINE_CREATE_INFO; +} +unsafe impl ExtendsGraphicsPipelineCreateInfo for PipelineOfflineCreateInfo<'_> {} +unsafe impl ExtendsComputePipelineCreateInfo for PipelineOfflineCreateInfo<'_> {} +unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineOfflineCreateInfo<'_> {} +unsafe impl ExtendsRayTracingPipelineCreateInfoNV for PipelineOfflineCreateInfo<'_> {} +impl<'a> PipelineOfflineCreateInfo<'a> { + #[inline] + pub fn pipeline_identifier(mut self, pipeline_identifier: [u8; UUID_SIZE]) -> Self { + self.pipeline_identifier = pipeline_identifier; + self + } + #[inline] + pub fn match_control(mut self, match_control: PipelineMatchControl) -> Self { + self.match_control = match_control; + self + } + #[inline] + pub fn pool_entry_size(mut self, pool_entry_size: DeviceSize) -> Self { + self.pool_entry_size = pool_entry_size; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures<'a> { pub s_type: StructureType, @@ -34565,6 +35730,40 @@ impl<'a> PhysicalDeviceImage2DViewOf3DFeaturesEXT<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceImageSlicedViewOf3DFeaturesEXT<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub image_sliced_view_of3_d: Bool32, + pub _marker: PhantomData<&'a ()>, +} +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(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceImageSlicedViewOf3DFeaturesEXT<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceImageSlicedViewOf3DFeaturesEXT<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceImageSlicedViewOf3DFeaturesEXT<'_> {} +impl<'a> PhysicalDeviceImageSlicedViewOf3DFeaturesEXT<'a> { + #[inline] + pub fn image_sliced_view_of3_d(mut self, image_sliced_view_of3_d: bool) -> Self { + self.image_sliced_view_of3_d = image_sliced_view_of3_d.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PhysicalDeviceMutableDescriptorTypeFeaturesEXT<'a> { pub s_type: StructureType, @@ -35573,6 +36772,699 @@ impl<'a> PhysicalDeviceSynchronization2Features<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceVulkanSC10Properties<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub device_no_dynamic_host_allocations: Bool32, + pub device_destroy_frees_memory: Bool32, + pub command_pool_multiple_command_buffers_recording: Bool32, + pub command_pool_reset_command_buffer: Bool32, + pub command_buffer_simultaneous_use: Bool32, + pub secondary_command_buffer_null_or_imageless_framebuffer: Bool32, + pub recycle_descriptor_set_memory: Bool32, + pub recycle_pipeline_memory: Bool32, + pub max_render_pass_subpasses: u32, + pub max_render_pass_dependencies: u32, + pub max_subpass_input_attachments: u32, + pub max_subpass_preserve_attachments: u32, + pub max_framebuffer_attachments: u32, + pub max_descriptor_set_layout_bindings: u32, + pub max_query_fault_count: u32, + pub max_callback_fault_count: u32, + pub max_command_pool_command_buffers: u32, + pub max_command_buffer_size: DeviceSize, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceVulkanSC10Properties<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + device_no_dynamic_host_allocations: Bool32::default(), + device_destroy_frees_memory: Bool32::default(), + command_pool_multiple_command_buffers_recording: Bool32::default(), + command_pool_reset_command_buffer: Bool32::default(), + command_buffer_simultaneous_use: Bool32::default(), + secondary_command_buffer_null_or_imageless_framebuffer: Bool32::default(), + recycle_descriptor_set_memory: Bool32::default(), + recycle_pipeline_memory: Bool32::default(), + max_render_pass_subpasses: u32::default(), + max_render_pass_dependencies: u32::default(), + max_subpass_input_attachments: u32::default(), + max_subpass_preserve_attachments: u32::default(), + max_framebuffer_attachments: u32::default(), + max_descriptor_set_layout_bindings: u32::default(), + max_query_fault_count: u32::default(), + max_callback_fault_count: u32::default(), + max_command_pool_command_buffers: u32::default(), + max_command_buffer_size: DeviceSize::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceVulkanSC10Properties<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::PHYSICAL_DEVICE_VULKAN_SC_1_0_PROPERTIES; +} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceVulkanSC10Properties<'_> {} +impl<'a> PhysicalDeviceVulkanSC10Properties<'a> { + #[inline] + pub fn device_no_dynamic_host_allocations( + mut self, + device_no_dynamic_host_allocations: bool, + ) -> Self { + self.device_no_dynamic_host_allocations = device_no_dynamic_host_allocations.into(); + self + } + #[inline] + pub fn device_destroy_frees_memory(mut self, device_destroy_frees_memory: bool) -> Self { + self.device_destroy_frees_memory = device_destroy_frees_memory.into(); + self + } + #[inline] + pub fn command_pool_multiple_command_buffers_recording( + mut self, + command_pool_multiple_command_buffers_recording: bool, + ) -> Self { + self.command_pool_multiple_command_buffers_recording = + command_pool_multiple_command_buffers_recording.into(); + self + } + #[inline] + pub fn command_pool_reset_command_buffer( + mut self, + command_pool_reset_command_buffer: bool, + ) -> Self { + self.command_pool_reset_command_buffer = command_pool_reset_command_buffer.into(); + self + } + #[inline] + pub fn command_buffer_simultaneous_use( + mut self, + command_buffer_simultaneous_use: bool, + ) -> Self { + self.command_buffer_simultaneous_use = command_buffer_simultaneous_use.into(); + self + } + #[inline] + pub fn secondary_command_buffer_null_or_imageless_framebuffer( + mut self, + secondary_command_buffer_null_or_imageless_framebuffer: bool, + ) -> Self { + self.secondary_command_buffer_null_or_imageless_framebuffer = + secondary_command_buffer_null_or_imageless_framebuffer.into(); + self + } + #[inline] + pub fn recycle_descriptor_set_memory(mut self, recycle_descriptor_set_memory: bool) -> Self { + self.recycle_descriptor_set_memory = recycle_descriptor_set_memory.into(); + self + } + #[inline] + pub fn recycle_pipeline_memory(mut self, recycle_pipeline_memory: bool) -> Self { + self.recycle_pipeline_memory = recycle_pipeline_memory.into(); + self + } + #[inline] + pub fn max_render_pass_subpasses(mut self, max_render_pass_subpasses: u32) -> Self { + self.max_render_pass_subpasses = max_render_pass_subpasses; + self + } + #[inline] + pub fn max_render_pass_dependencies(mut self, max_render_pass_dependencies: u32) -> Self { + self.max_render_pass_dependencies = max_render_pass_dependencies; + self + } + #[inline] + pub fn max_subpass_input_attachments(mut self, max_subpass_input_attachments: u32) -> Self { + self.max_subpass_input_attachments = max_subpass_input_attachments; + self + } + #[inline] + pub fn max_subpass_preserve_attachments( + mut self, + max_subpass_preserve_attachments: u32, + ) -> Self { + self.max_subpass_preserve_attachments = max_subpass_preserve_attachments; + self + } + #[inline] + pub fn max_framebuffer_attachments(mut self, max_framebuffer_attachments: u32) -> Self { + self.max_framebuffer_attachments = max_framebuffer_attachments; + self + } + #[inline] + pub fn max_descriptor_set_layout_bindings( + mut self, + max_descriptor_set_layout_bindings: u32, + ) -> Self { + self.max_descriptor_set_layout_bindings = max_descriptor_set_layout_bindings; + self + } + #[inline] + pub fn max_query_fault_count(mut self, max_query_fault_count: u32) -> Self { + self.max_query_fault_count = max_query_fault_count; + self + } + #[inline] + pub fn max_callback_fault_count(mut self, max_callback_fault_count: u32) -> Self { + self.max_callback_fault_count = max_callback_fault_count; + self + } + #[inline] + pub fn max_command_pool_command_buffers( + mut self, + max_command_pool_command_buffers: u32, + ) -> Self { + self.max_command_pool_command_buffers = max_command_pool_command_buffers; + self + } + #[inline] + pub fn max_command_buffer_size(mut self, max_command_buffer_size: DeviceSize) -> Self { + self.max_command_buffer_size = max_command_buffer_size; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PipelinePoolSize<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub pool_entry_size: DeviceSize, + pub pool_entry_count: u32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PipelinePoolSize<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + pool_entry_size: DeviceSize::default(), + pool_entry_count: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PipelinePoolSize<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::PIPELINE_POOL_SIZE; +} +impl<'a> PipelinePoolSize<'a> { + #[inline] + pub fn pool_entry_size(mut self, pool_entry_size: DeviceSize) -> Self { + self.pool_entry_size = pool_entry_size; + self + } + #[inline] + pub fn pool_entry_count(mut self, pool_entry_count: u32) -> Self { + self.pool_entry_count = pool_entry_count; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct DeviceObjectReservationCreateInfo<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub pipeline_cache_create_info_count: u32, + pub p_pipeline_cache_create_infos: *const PipelineCacheCreateInfo<'a>, + pub pipeline_pool_size_count: u32, + pub p_pipeline_pool_sizes: *const PipelinePoolSize<'a>, + pub semaphore_request_count: u32, + pub command_buffer_request_count: u32, + pub fence_request_count: u32, + pub device_memory_request_count: u32, + pub buffer_request_count: u32, + pub image_request_count: u32, + pub event_request_count: u32, + pub query_pool_request_count: u32, + pub buffer_view_request_count: u32, + pub image_view_request_count: u32, + pub layered_image_view_request_count: u32, + pub pipeline_cache_request_count: u32, + pub pipeline_layout_request_count: u32, + pub render_pass_request_count: u32, + pub graphics_pipeline_request_count: u32, + pub compute_pipeline_request_count: u32, + pub descriptor_set_layout_request_count: u32, + pub sampler_request_count: u32, + pub descriptor_pool_request_count: u32, + pub descriptor_set_request_count: u32, + pub framebuffer_request_count: u32, + pub command_pool_request_count: u32, + pub sampler_ycbcr_conversion_request_count: u32, + pub surface_request_count: u32, + pub swapchain_request_count: u32, + pub display_mode_request_count: u32, + pub subpass_description_request_count: u32, + pub attachment_description_request_count: u32, + pub descriptor_set_layout_binding_request_count: u32, + pub descriptor_set_layout_binding_limit: u32, + pub max_image_view_mip_levels: u32, + pub max_image_view_array_layers: u32, + pub max_layered_image_view_mip_levels: u32, + pub max_occlusion_queries_per_pool: u32, + pub max_pipeline_statistics_queries_per_pool: u32, + pub max_timestamp_queries_per_pool: u32, + pub max_immutable_samplers_per_descriptor_set_layout: u32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for DeviceObjectReservationCreateInfo<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + pipeline_cache_create_info_count: u32::default(), + p_pipeline_cache_create_infos: ::std::ptr::null(), + pipeline_pool_size_count: u32::default(), + p_pipeline_pool_sizes: ::std::ptr::null(), + semaphore_request_count: u32::default(), + command_buffer_request_count: u32::default(), + fence_request_count: u32::default(), + device_memory_request_count: u32::default(), + buffer_request_count: u32::default(), + image_request_count: u32::default(), + event_request_count: u32::default(), + query_pool_request_count: u32::default(), + buffer_view_request_count: u32::default(), + image_view_request_count: u32::default(), + layered_image_view_request_count: u32::default(), + pipeline_cache_request_count: u32::default(), + pipeline_layout_request_count: u32::default(), + render_pass_request_count: u32::default(), + graphics_pipeline_request_count: u32::default(), + compute_pipeline_request_count: u32::default(), + descriptor_set_layout_request_count: u32::default(), + sampler_request_count: u32::default(), + descriptor_pool_request_count: u32::default(), + descriptor_set_request_count: u32::default(), + framebuffer_request_count: u32::default(), + command_pool_request_count: u32::default(), + sampler_ycbcr_conversion_request_count: u32::default(), + surface_request_count: u32::default(), + swapchain_request_count: u32::default(), + display_mode_request_count: u32::default(), + subpass_description_request_count: u32::default(), + attachment_description_request_count: u32::default(), + descriptor_set_layout_binding_request_count: u32::default(), + descriptor_set_layout_binding_limit: u32::default(), + max_image_view_mip_levels: u32::default(), + max_image_view_array_layers: u32::default(), + max_layered_image_view_mip_levels: u32::default(), + max_occlusion_queries_per_pool: u32::default(), + max_pipeline_statistics_queries_per_pool: u32::default(), + max_timestamp_queries_per_pool: u32::default(), + max_immutable_samplers_per_descriptor_set_layout: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for DeviceObjectReservationCreateInfo<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::DEVICE_OBJECT_RESERVATION_CREATE_INFO; +} +unsafe impl ExtendsDeviceCreateInfo for DeviceObjectReservationCreateInfo<'_> {} +pub unsafe trait ExtendsDeviceObjectReservationCreateInfo {} +impl<'a> DeviceObjectReservationCreateInfo<'a> { + #[inline] + pub fn pipeline_cache_create_infos( + mut self, + pipeline_cache_create_infos: &'a [PipelineCacheCreateInfo], + ) -> Self { + self.pipeline_cache_create_info_count = pipeline_cache_create_infos.len() as _; + self.p_pipeline_cache_create_infos = pipeline_cache_create_infos.as_ptr(); + self + } + #[inline] + pub fn pipeline_pool_sizes(mut self, pipeline_pool_sizes: &'a [PipelinePoolSize]) -> Self { + self.pipeline_pool_size_count = pipeline_pool_sizes.len() as _; + self.p_pipeline_pool_sizes = pipeline_pool_sizes.as_ptr(); + self + } + #[inline] + pub fn semaphore_request_count(mut self, semaphore_request_count: u32) -> Self { + self.semaphore_request_count = semaphore_request_count; + self + } + #[inline] + pub fn command_buffer_request_count(mut self, command_buffer_request_count: u32) -> Self { + self.command_buffer_request_count = command_buffer_request_count; + self + } + #[inline] + pub fn fence_request_count(mut self, fence_request_count: u32) -> Self { + self.fence_request_count = fence_request_count; + self + } + #[inline] + pub fn device_memory_request_count(mut self, device_memory_request_count: u32) -> Self { + self.device_memory_request_count = device_memory_request_count; + self + } + #[inline] + pub fn buffer_request_count(mut self, buffer_request_count: u32) -> Self { + self.buffer_request_count = buffer_request_count; + self + } + #[inline] + pub fn image_request_count(mut self, image_request_count: u32) -> Self { + self.image_request_count = image_request_count; + self + } + #[inline] + pub fn event_request_count(mut self, event_request_count: u32) -> Self { + self.event_request_count = event_request_count; + self + } + #[inline] + pub fn query_pool_request_count(mut self, query_pool_request_count: u32) -> Self { + self.query_pool_request_count = query_pool_request_count; + self + } + #[inline] + pub fn buffer_view_request_count(mut self, buffer_view_request_count: u32) -> Self { + self.buffer_view_request_count = buffer_view_request_count; + self + } + #[inline] + pub fn image_view_request_count(mut self, image_view_request_count: u32) -> Self { + self.image_view_request_count = image_view_request_count; + self + } + #[inline] + pub fn layered_image_view_request_count( + mut self, + layered_image_view_request_count: u32, + ) -> Self { + self.layered_image_view_request_count = layered_image_view_request_count; + self + } + #[inline] + pub fn pipeline_cache_request_count(mut self, pipeline_cache_request_count: u32) -> Self { + self.pipeline_cache_request_count = pipeline_cache_request_count; + self + } + #[inline] + pub fn pipeline_layout_request_count(mut self, pipeline_layout_request_count: u32) -> Self { + self.pipeline_layout_request_count = pipeline_layout_request_count; + self + } + #[inline] + pub fn render_pass_request_count(mut self, render_pass_request_count: u32) -> Self { + self.render_pass_request_count = render_pass_request_count; + self + } + #[inline] + pub fn graphics_pipeline_request_count(mut self, graphics_pipeline_request_count: u32) -> Self { + self.graphics_pipeline_request_count = graphics_pipeline_request_count; + self + } + #[inline] + pub fn compute_pipeline_request_count(mut self, compute_pipeline_request_count: u32) -> Self { + self.compute_pipeline_request_count = compute_pipeline_request_count; + self + } + #[inline] + pub fn descriptor_set_layout_request_count( + mut self, + descriptor_set_layout_request_count: u32, + ) -> Self { + self.descriptor_set_layout_request_count = descriptor_set_layout_request_count; + self + } + #[inline] + pub fn sampler_request_count(mut self, sampler_request_count: u32) -> Self { + self.sampler_request_count = sampler_request_count; + self + } + #[inline] + pub fn descriptor_pool_request_count(mut self, descriptor_pool_request_count: u32) -> Self { + self.descriptor_pool_request_count = descriptor_pool_request_count; + self + } + #[inline] + pub fn descriptor_set_request_count(mut self, descriptor_set_request_count: u32) -> Self { + self.descriptor_set_request_count = descriptor_set_request_count; + self + } + #[inline] + pub fn framebuffer_request_count(mut self, framebuffer_request_count: u32) -> Self { + self.framebuffer_request_count = framebuffer_request_count; + self + } + #[inline] + pub fn command_pool_request_count(mut self, command_pool_request_count: u32) -> Self { + self.command_pool_request_count = command_pool_request_count; + self + } + #[inline] + pub fn sampler_ycbcr_conversion_request_count( + mut self, + sampler_ycbcr_conversion_request_count: u32, + ) -> Self { + self.sampler_ycbcr_conversion_request_count = sampler_ycbcr_conversion_request_count; + self + } + #[inline] + pub fn surface_request_count(mut self, surface_request_count: u32) -> Self { + self.surface_request_count = surface_request_count; + self + } + #[inline] + pub fn swapchain_request_count(mut self, swapchain_request_count: u32) -> Self { + self.swapchain_request_count = swapchain_request_count; + self + } + #[inline] + pub fn display_mode_request_count(mut self, display_mode_request_count: u32) -> Self { + self.display_mode_request_count = display_mode_request_count; + self + } + #[inline] + pub fn subpass_description_request_count( + mut self, + subpass_description_request_count: u32, + ) -> Self { + self.subpass_description_request_count = subpass_description_request_count; + self + } + #[inline] + pub fn attachment_description_request_count( + mut self, + attachment_description_request_count: u32, + ) -> Self { + self.attachment_description_request_count = attachment_description_request_count; + self + } + #[inline] + pub fn descriptor_set_layout_binding_request_count( + mut self, + descriptor_set_layout_binding_request_count: u32, + ) -> Self { + self.descriptor_set_layout_binding_request_count = + descriptor_set_layout_binding_request_count; + self + } + #[inline] + pub fn descriptor_set_layout_binding_limit( + mut self, + descriptor_set_layout_binding_limit: u32, + ) -> Self { + self.descriptor_set_layout_binding_limit = descriptor_set_layout_binding_limit; + self + } + #[inline] + pub fn max_image_view_mip_levels(mut self, max_image_view_mip_levels: u32) -> Self { + self.max_image_view_mip_levels = max_image_view_mip_levels; + self + } + #[inline] + pub fn max_image_view_array_layers(mut self, max_image_view_array_layers: u32) -> Self { + self.max_image_view_array_layers = max_image_view_array_layers; + self + } + #[inline] + pub fn max_layered_image_view_mip_levels( + mut self, + max_layered_image_view_mip_levels: u32, + ) -> Self { + self.max_layered_image_view_mip_levels = max_layered_image_view_mip_levels; + self + } + #[inline] + pub fn max_occlusion_queries_per_pool(mut self, max_occlusion_queries_per_pool: u32) -> Self { + self.max_occlusion_queries_per_pool = max_occlusion_queries_per_pool; + self + } + #[inline] + pub fn max_pipeline_statistics_queries_per_pool( + mut self, + max_pipeline_statistics_queries_per_pool: u32, + ) -> Self { + self.max_pipeline_statistics_queries_per_pool = max_pipeline_statistics_queries_per_pool; + self + } + #[inline] + pub fn max_timestamp_queries_per_pool(mut self, max_timestamp_queries_per_pool: u32) -> Self { + self.max_timestamp_queries_per_pool = max_timestamp_queries_per_pool; + self + } + #[inline] + pub fn max_immutable_samplers_per_descriptor_set_layout( + mut self, + max_immutable_samplers_per_descriptor_set_layout: u32, + ) -> Self { + self.max_immutable_samplers_per_descriptor_set_layout = + max_immutable_samplers_per_descriptor_set_layout; + 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 `x.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 = <*const T>::cast(next); + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.p_next as _; + self.p_next = next_ptr; + } + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct CommandPoolMemoryReservationCreateInfo<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub command_pool_reserved_size: DeviceSize, + pub command_pool_max_command_buffers: u32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for CommandPoolMemoryReservationCreateInfo<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + command_pool_reserved_size: DeviceSize::default(), + command_pool_max_command_buffers: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for CommandPoolMemoryReservationCreateInfo<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::COMMAND_POOL_MEMORY_RESERVATION_CREATE_INFO; +} +unsafe impl ExtendsCommandPoolCreateInfo for CommandPoolMemoryReservationCreateInfo<'_> {} +impl<'a> CommandPoolMemoryReservationCreateInfo<'a> { + #[inline] + pub fn command_pool_reserved_size(mut self, command_pool_reserved_size: DeviceSize) -> Self { + self.command_pool_reserved_size = command_pool_reserved_size; + self + } + #[inline] + pub fn command_pool_max_command_buffers( + mut self, + command_pool_max_command_buffers: u32, + ) -> Self { + self.command_pool_max_command_buffers = command_pool_max_command_buffers; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct CommandPoolMemoryConsumption<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub command_pool_allocated: DeviceSize, + pub command_pool_reserved_size: DeviceSize, + pub command_buffer_allocated: DeviceSize, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for CommandPoolMemoryConsumption<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + command_pool_allocated: DeviceSize::default(), + command_pool_reserved_size: DeviceSize::default(), + command_buffer_allocated: DeviceSize::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for CommandPoolMemoryConsumption<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::COMMAND_POOL_MEMORY_CONSUMPTION; +} +impl<'a> CommandPoolMemoryConsumption<'a> { + #[inline] + pub fn command_pool_allocated(mut self, command_pool_allocated: DeviceSize) -> Self { + self.command_pool_allocated = command_pool_allocated; + self + } + #[inline] + pub fn command_pool_reserved_size(mut self, command_pool_reserved_size: DeviceSize) -> Self { + self.command_pool_reserved_size = command_pool_reserved_size; + self + } + #[inline] + pub fn command_buffer_allocated(mut self, command_buffer_allocated: DeviceSize) -> Self { + self.command_buffer_allocated = command_buffer_allocated; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceVulkanSC10Features<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub shader_atomic_instructions: Bool32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceVulkanSC10Features<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + shader_atomic_instructions: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceVulkanSC10Features<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::PHYSICAL_DEVICE_VULKAN_SC_1_0_FEATURES; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceVulkanSC10Features<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceVulkanSC10Features<'_> {} +impl<'a> PhysicalDeviceVulkanSC10Features<'a> { + #[inline] + pub fn shader_atomic_instructions(mut self, shader_atomic_instructions: bool) -> Self { + self.shader_atomic_instructions = shader_atomic_instructions.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT<'a> { pub s_type: StructureType, @@ -47130,3 +49022,126 @@ impl<'a> PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM<'a> { self } } +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceShaderCorePropertiesARM<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub pixel_rate: u32, + pub texel_rate: u32, + pub fma_rate: u32, + pub _marker: PhantomData<&'a ()>, +} +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(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceShaderCorePropertiesARM<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM; +} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceShaderCorePropertiesARM<'_> {} +impl<'a> PhysicalDeviceShaderCorePropertiesARM<'a> { + #[inline] + pub fn pixel_rate(mut self, pixel_rate: u32) -> Self { + self.pixel_rate = pixel_rate; + self + } + #[inline] + pub fn texel_rate(mut self, texel_rate: u32) -> Self { + self.texel_rate = texel_rate; + self + } + #[inline] + pub fn fma_rate(mut self, fma_rate: u32) -> Self { + self.fma_rate = fma_rate; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub multiview_per_view_render_areas: Bool32, + pub _marker: PhantomData<&'a ()>, +} +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(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM<'_> +{ +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM<'_> {} +impl<'a> PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM<'a> { + #[inline] + pub fn multiview_per_view_render_areas( + mut self, + multiview_per_view_render_areas: bool, + ) -> Self { + self.multiview_per_view_render_areas = multiview_per_view_render_areas.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM<'a> { + 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, + pub _marker: PhantomData<&'a ()>, +} +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(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM; +} +unsafe impl ExtendsRenderPassBeginInfo for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM<'_> {} +unsafe impl ExtendsRenderingInfo for MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM<'_> {} +impl<'a> MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM<'a> { + #[inline] + pub fn per_view_render_areas(mut self, per_view_render_areas: &'a [Rect2D]) -> Self { + self.per_view_render_area_count = per_view_render_areas.len() as _; + self.p_per_view_render_areas = per_view_render_areas.as_ptr(); + self + } +} diff --git a/ash/src/vk/enums.rs b/ash/src/vk/enums.rs index de2d35ea1..8ef2fd125 100644 --- a/ash/src/vk/enums.rs +++ b/ash/src/vk/enums.rs @@ -2336,6 +2336,83 @@ impl LineRasterizationModeEXT { } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] +#[doc = ""] +pub struct FaultLevel(pub(crate) i32); +impl FaultLevel { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl FaultLevel { + pub const UNASSIGNED: Self = Self(0); + pub const CRITICAL: Self = Self(1); + pub const RECOVERABLE: Self = Self(2); + pub const WARNING: Self = Self(3); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +#[doc = ""] +pub struct FaultType(pub(crate) i32); +impl FaultType { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl FaultType { + pub const INVALID: Self = Self(0); + pub const UNASSIGNED: Self = Self(1); + pub const IMPLEMENTATION: Self = Self(2); + pub const SYSTEM: Self = Self(3); + pub const PHYSICAL_DEVICE: Self = Self(4); + pub const COMMAND_BUFFER_FULL: Self = Self(5); + pub const INVALID_API_USAGE: Self = Self(6); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +#[doc = ""] +pub struct FaultQueryBehavior(pub(crate) i32); +impl FaultQueryBehavior { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl FaultQueryBehavior { + pub const GET_AND_CLEAR_ALL_FAULTS: Self = Self(0); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +#[doc = ""] +pub struct PipelineMatchControl(pub(crate) i32); +impl PipelineMatchControl { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl PipelineMatchControl { + pub const APPLICATION_UUID_EXACT_MATCH: Self = Self(0); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] #[doc = ""] pub struct FragmentShadingRateCombinerOpKHR(pub(crate) i32); impl FragmentShadingRateCombinerOpKHR { @@ -2433,6 +2510,43 @@ impl SubpassMergeStatusEXT { } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] +#[doc = ""] +pub struct SciSyncClientTypeNV(pub(crate) i32); +impl SciSyncClientTypeNV { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl SciSyncClientTypeNV { + pub const SIGNALER: Self = Self(0); + pub const WAITER: Self = Self(1); + pub const SIGNALER_WAITER: Self = Self(2); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +#[doc = ""] +pub struct SciSyncPrimitiveTypeNV(pub(crate) i32); +impl SciSyncPrimitiveTypeNV { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl SciSyncPrimitiveTypeNV { + pub const FENCE: Self = Self(0); + pub const SEMAPHORE: Self = Self(1); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] #[doc = ""] pub struct ProvokingVertexModeEXT(pub(crate) i32); impl ProvokingVertexModeEXT { @@ -2451,6 +2565,23 @@ impl ProvokingVertexModeEXT { } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] +#[doc = ""] +pub struct PipelineCacheValidationVersion(pub(crate) i32); +impl PipelineCacheValidationVersion { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl PipelineCacheValidationVersion { + pub const SAFETY_CRITICAL_ONE: Self = Self(1); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] #[doc = ""] pub struct AccelerationStructureMotionInstanceTypeNV(pub(crate) i32); impl AccelerationStructureMotionInstanceTypeNV { @@ -2830,6 +2961,7 @@ impl fmt::Debug for ObjectType { Self::BUFFER_COLLECTION_FUCHSIA => Some("BUFFER_COLLECTION_FUCHSIA"), Self::MICROMAP_EXT => Some("MICROMAP_EXT"), Self::OPTICAL_FLOW_SESSION_NV => Some("OPTICAL_FLOW_SESSION_NV"), + Self::SEMAPHORE_SCI_SYNC_POOL_NV => Some("SEMAPHORE_SCI_SYNC_POOL_NV"), Self::SAMPLER_YCBCR_CONVERSION => Some("SAMPLER_YCBCR_CONVERSION"), Self::DESCRIPTOR_UPDATE_TEMPLATE => Some("DESCRIPTOR_UPDATE_TEMPLATE"), Self::PRIVATE_DATA_SLOT => Some("PRIVATE_DATA_SLOT"), @@ -2908,6 +3040,9 @@ impl fmt::Debug for Result { Some("ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS") } Self::PIPELINE_COMPILE_REQUIRED => Some("PIPELINE_COMPILE_REQUIRED"), + Self::ERROR_VALIDATION_FAILED => Some("ERROR_VALIDATION_FAILED"), + Self::ERROR_INVALID_PIPELINE_CACHE_DATA => Some("ERROR_INVALID_PIPELINE_CACHE_DATA"), + Self::ERROR_NO_PIPELINE_MATCH => Some("ERROR_NO_PIPELINE_MATCH"), _ => None, }; if let Some(x) = name { diff --git a/ash/src/vk/extensions.rs b/ash/src/vk/extensions.rs index b378fe9f5..71e1eaa63 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -188,6 +188,7 @@ impl KhrSwapchainFn { pub type PFN_vkCreateSwapchainKHR = unsafe extern "system" fn( device: Device, p_create_info: *const SwapchainCreateInfoKHR, + p_create_info: *const SwapchainCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_swapchain: *mut SwapchainKHR, ) -> Result; @@ -264,6 +265,7 @@ impl KhrSwapchainFn { unsafe extern "system" fn create_swapchain_khr( _device: Device, _p_create_info: *const SwapchainCreateInfoKHR, + _p_create_info: *const SwapchainCreateInfoKHR, _p_allocator: *const AllocationCallbacks, _p_swapchain: *mut SwapchainKHR, ) -> Result { @@ -725,6 +727,7 @@ pub type PFN_vkCreateSharedSwapchainsKHR = unsafe extern "system" fn( device: Device, swapchain_count: u32, p_create_infos: *const SwapchainCreateInfoKHR, + p_create_infos: *const SwapchainCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_swapchains: *mut SwapchainKHR, ) -> Result; @@ -745,6 +748,7 @@ impl KhrDisplaySwapchainFn { _device: Device, _swapchain_count: u32, _p_create_infos: *const SwapchainCreateInfoKHR, + _p_create_infos: *const SwapchainCreateInfoKHR, _p_allocator: *const AllocationCallbacks, _p_swapchains: *mut SwapchainKHR, ) -> Result { @@ -1519,8 +1523,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] @@ -3317,6 +3319,29 @@ impl ImageCreateFlags { impl StructureType { pub const PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV: Self = Self(1_000_050_000); } +impl NvPrivateVendorInfoFn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_private_vendor_info\0") } + } + pub const SPEC_VERSION: u32 = 2u32; +} +#[derive(Clone)] +pub struct NvPrivateVendorInfoFn {} +unsafe impl Send for NvPrivateVendorInfoFn {} +unsafe impl Sync for NvPrivateVendorInfoFn {} +impl NvPrivateVendorInfoFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +#[doc = "Generated from 'VK_NV_private_vendor_info'"] +impl StructureType { + pub const PRIVATE_VENDOR_INFO_RESERVED_OFFSET_0_NV: Self = Self(1_000_051_000); +} impl KhrMultiviewFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -5931,7 +5956,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( @@ -5940,9 +5965,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 {} @@ -5974,12 +6009,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 { @@ -6745,6 +6822,7 @@ impl StructureType { pub const ACQUIRE_PROFILING_LOCK_INFO_KHR: Self = Self(1_000_116_004); pub const PERFORMANCE_COUNTER_KHR: Self = Self(1_000_116_005); pub const PERFORMANCE_COUNTER_DESCRIPTION_KHR: Self = Self(1_000_116_006); + pub const PERFORMANCE_QUERY_RESERVATION_INFO_KHR: Self = Self(1_000_116_007); } impl KhrMaintenance2Fn { #[inline] @@ -11512,9 +11590,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, @@ -11523,6 +11608,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 {} @@ -11533,6 +11619,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, @@ -11560,6 +11668,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'"] @@ -15470,6 +15579,85 @@ impl QcomRenderPassStoreOpsFn { impl AttachmentStoreOp { pub const NONE_QCOM: Self = Self::NONE; } +impl KhrObjectRefreshFn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_object_refresh\0") } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[allow(non_camel_case_types)] +pub type PFN_vkCmdRefreshObjectsKHR = unsafe extern "system" fn( + command_buffer: CommandBuffer, + p_refresh_objects: *const RefreshObjectListKHR, +); +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceRefreshableObjectTypesKHR = unsafe extern "system" fn( + physical_device: PhysicalDevice, + p_refreshable_object_type_count: *mut u32, + p_refreshable_object_types: *mut ObjectType, +) -> Result; +#[derive(Clone)] +pub struct KhrObjectRefreshFn { + pub cmd_refresh_objects_khr: PFN_vkCmdRefreshObjectsKHR, + pub get_physical_device_refreshable_object_types_khr: + PFN_vkGetPhysicalDeviceRefreshableObjectTypesKHR, +} +unsafe impl Send for KhrObjectRefreshFn {} +unsafe impl Sync for KhrObjectRefreshFn {} +impl KhrObjectRefreshFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self { + cmd_refresh_objects_khr: unsafe { + unsafe extern "system" fn cmd_refresh_objects_khr( + _command_buffer: CommandBuffer, + _p_refresh_objects: *const RefreshObjectListKHR, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_refresh_objects_khr) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdRefreshObjectsKHR\0"); + let val = _f(cname); + if val.is_null() { + cmd_refresh_objects_khr + } else { + ::std::mem::transmute(val) + } + }, + get_physical_device_refreshable_object_types_khr: unsafe { + unsafe extern "system" fn get_physical_device_refreshable_object_types_khr( + _physical_device: PhysicalDevice, + _p_refreshable_object_type_count: *mut u32, + _p_refreshable_object_types: *mut ObjectType, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_physical_device_refreshable_object_types_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetPhysicalDeviceRefreshableObjectTypesKHR\0", + ); + let val = _f(cname); + if val.is_null() { + get_physical_device_refreshable_object_types_khr + } else { + ::std::mem::transmute(val) + } + }, + } + } +} +#[doc = "Generated from 'VK_KHR_object_refresh'"] +impl StructureType { + pub const REFRESH_OBJECT_LIST_KHR: Self = Self(1_000_308_000); +} impl ExtMetalObjectsFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -18236,162 +18424,512 @@ 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 ExtMultisampledRenderToSingleSampledFn { - #[inline] - pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { - ::std::ffi::CStr::from_bytes_with_nul_unchecked( - b"VK_EXT_multisampled_render_to_single_sampled\0", - ) - } - } - pub const SPEC_VERSION: u32 = 1u32; -} -#[derive(Clone)] -pub struct ExtMultisampledRenderToSingleSampledFn {} -unsafe impl Send for ExtMultisampledRenderToSingleSampledFn {} -unsafe impl Sync for ExtMultisampledRenderToSingleSampledFn {} -impl ExtMultisampledRenderToSingleSampledFn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - Self {} - } -} -#[doc = "Generated from 'VK_EXT_multisampled_render_to_single_sampled'"] -impl ImageCreateFlags { - pub const MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXT: Self = Self(0b100_0000_0000_0000_0000); -} -#[doc = "Generated from 'VK_EXT_multisampled_render_to_single_sampled'"] -impl StructureType { - pub const PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: Self = - Self(1_000_376_000); - pub const SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT: Self = Self(1_000_376_001); - pub const MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: Self = Self(1_000_376_002); -} -impl ExtExtendedDynamicState2Fn { +impl NvExternalSciSyncFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { - unsafe { - ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extended_dynamic_state2\0") - } + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_external_sci_sync\0") } } - pub const SPEC_VERSION: u32 = 1u32; + pub const SPEC_VERSION: u32 = 2u32; } #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetPatchControlPointsEXT = - unsafe extern "system" fn(command_buffer: CommandBuffer, patch_control_points: u32); +pub type PFN_vkGetFenceSciSyncFenceNV = unsafe extern "system" fn( + device: Device, + p_get_sci_sync_handle_info: *const FenceGetSciSyncInfoNV, + p_handle: *mut c_void, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetRasterizerDiscardEnable = - unsafe extern "system" fn(command_buffer: CommandBuffer, rasterizer_discard_enable: Bool32); +pub type PFN_vkGetFenceSciSyncObjNV = unsafe extern "system" fn( + device: Device, + p_get_sci_sync_handle_info: *const FenceGetSciSyncInfoNV, + p_handle: *mut c_void, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetDepthBiasEnable = - unsafe extern "system" fn(command_buffer: CommandBuffer, depth_bias_enable: Bool32); +pub type PFN_vkImportFenceSciSyncFenceNV = unsafe extern "system" fn( + device: Device, + p_import_fence_sci_sync_info: *const ImportFenceSciSyncInfoNV, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetLogicOpEXT = - unsafe extern "system" fn(command_buffer: CommandBuffer, logic_op: LogicOp); +pub type PFN_vkImportFenceSciSyncObjNV = unsafe extern "system" fn( + device: Device, + p_import_fence_sci_sync_info: *const ImportFenceSciSyncInfoNV, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetPrimitiveRestartEnable = - unsafe extern "system" fn(command_buffer: CommandBuffer, primitive_restart_enable: Bool32); +pub type PFN_vkGetPhysicalDeviceSciSyncAttributesNV = unsafe extern "system" fn( + physical_device: PhysicalDevice, + p_sci_sync_attributes_info: *const SciSyncAttributesInfoNV, + p_attributes: NvSciSyncAttrList, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetSemaphoreSciSyncObjNV = unsafe extern "system" fn( + device: Device, + p_get_sci_sync_info: *const SemaphoreGetSciSyncInfoNV, + p_handle: *mut c_void, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkImportSemaphoreSciSyncObjNV = unsafe extern "system" fn( + device: Device, + p_import_semaphore_sci_sync_info: *const ImportSemaphoreSciSyncInfoNV, +) -> Result; #[derive(Clone)] -pub struct ExtExtendedDynamicState2Fn { - pub cmd_set_patch_control_points_ext: PFN_vkCmdSetPatchControlPointsEXT, - pub cmd_set_rasterizer_discard_enable_ext: PFN_vkCmdSetRasterizerDiscardEnable, - pub cmd_set_depth_bias_enable_ext: PFN_vkCmdSetDepthBiasEnable, - pub cmd_set_logic_op_ext: PFN_vkCmdSetLogicOpEXT, - pub cmd_set_primitive_restart_enable_ext: PFN_vkCmdSetPrimitiveRestartEnable, +pub struct NvExternalSciSyncFn { + pub get_fence_sci_sync_fence_nv: PFN_vkGetFenceSciSyncFenceNV, + pub get_fence_sci_sync_obj_nv: PFN_vkGetFenceSciSyncObjNV, + pub import_fence_sci_sync_fence_nv: PFN_vkImportFenceSciSyncFenceNV, + pub import_fence_sci_sync_obj_nv: PFN_vkImportFenceSciSyncObjNV, + pub get_physical_device_sci_sync_attributes_nv: PFN_vkGetPhysicalDeviceSciSyncAttributesNV, + pub get_semaphore_sci_sync_obj_nv: PFN_vkGetSemaphoreSciSyncObjNV, + pub import_semaphore_sci_sync_obj_nv: PFN_vkImportSemaphoreSciSyncObjNV, } -unsafe impl Send for ExtExtendedDynamicState2Fn {} -unsafe impl Sync for ExtExtendedDynamicState2Fn {} -impl ExtExtendedDynamicState2Fn { +unsafe impl Send for NvExternalSciSyncFn {} +unsafe impl Sync for NvExternalSciSyncFn {} +impl NvExternalSciSyncFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { Self { - cmd_set_patch_control_points_ext: unsafe { - unsafe extern "system" fn cmd_set_patch_control_points_ext( - _command_buffer: CommandBuffer, - _patch_control_points: u32, - ) { + get_fence_sci_sync_fence_nv: unsafe { + unsafe extern "system" fn get_fence_sci_sync_fence_nv( + _device: Device, + _p_get_sci_sync_handle_info: *const FenceGetSciSyncInfoNV, + _p_handle: *mut c_void, + ) -> Result { panic!(concat!( "Unable to load ", - stringify!(cmd_set_patch_control_points_ext) + stringify!(get_fence_sci_sync_fence_nv) )) } - let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( - b"vkCmdSetPatchControlPointsEXT\0", - ); + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkGetFenceSciSyncFenceNV\0"); let val = _f(cname); if val.is_null() { - cmd_set_patch_control_points_ext + get_fence_sci_sync_fence_nv } else { ::std::mem::transmute(val) } }, - cmd_set_rasterizer_discard_enable_ext: unsafe { - unsafe extern "system" fn cmd_set_rasterizer_discard_enable_ext( - _command_buffer: CommandBuffer, - _rasterizer_discard_enable: Bool32, - ) { + get_fence_sci_sync_obj_nv: unsafe { + unsafe extern "system" fn get_fence_sci_sync_obj_nv( + _device: Device, + _p_get_sci_sync_handle_info: *const FenceGetSciSyncInfoNV, + _p_handle: *mut c_void, + ) -> Result { panic!(concat!( "Unable to load ", - stringify!(cmd_set_rasterizer_discard_enable_ext) + stringify!(get_fence_sci_sync_obj_nv) )) } - let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( - b"vkCmdSetRasterizerDiscardEnableEXT\0", - ); + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkGetFenceSciSyncObjNV\0"); let val = _f(cname); if val.is_null() { - cmd_set_rasterizer_discard_enable_ext + get_fence_sci_sync_obj_nv } else { ::std::mem::transmute(val) } }, - cmd_set_depth_bias_enable_ext: unsafe { - unsafe extern "system" fn cmd_set_depth_bias_enable_ext( - _command_buffer: CommandBuffer, - _depth_bias_enable: Bool32, - ) { + import_fence_sci_sync_fence_nv: unsafe { + unsafe extern "system" fn import_fence_sci_sync_fence_nv( + _device: Device, + _p_import_fence_sci_sync_info: *const ImportFenceSciSyncInfoNV, + ) -> Result { panic!(concat!( "Unable to load ", - stringify!(cmd_set_depth_bias_enable_ext) + stringify!(import_fence_sci_sync_fence_nv) )) } let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( - b"vkCmdSetDepthBiasEnableEXT\0", + b"vkImportFenceSciSyncFenceNV\0", ); let val = _f(cname); if val.is_null() { - cmd_set_depth_bias_enable_ext + import_fence_sci_sync_fence_nv } else { ::std::mem::transmute(val) } }, - cmd_set_logic_op_ext: unsafe { - unsafe extern "system" fn cmd_set_logic_op_ext( - _command_buffer: CommandBuffer, - _logic_op: LogicOp, - ) { - panic!(concat!("Unable to load ", stringify!(cmd_set_logic_op_ext))) + import_fence_sci_sync_obj_nv: unsafe { + unsafe extern "system" fn import_fence_sci_sync_obj_nv( + _device: Device, + _p_import_fence_sci_sync_info: *const ImportFenceSciSyncInfoNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(import_fence_sci_sync_obj_nv) + )) } let cname = - ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdSetLogicOpEXT\0"); + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkImportFenceSciSyncObjNV\0"); let val = _f(cname); if val.is_null() { - cmd_set_logic_op_ext + import_fence_sci_sync_obj_nv } else { ::std::mem::transmute(val) } }, - cmd_set_primitive_restart_enable_ext: unsafe { - unsafe extern "system" fn cmd_set_primitive_restart_enable_ext( - _command_buffer: CommandBuffer, - _primitive_restart_enable: Bool32, - ) { - panic!(concat!( + get_physical_device_sci_sync_attributes_nv: unsafe { + unsafe extern "system" fn get_physical_device_sci_sync_attributes_nv( + _physical_device: PhysicalDevice, + _p_sci_sync_attributes_info: *const SciSyncAttributesInfoNV, + _p_attributes: NvSciSyncAttrList, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_physical_device_sci_sync_attributes_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetPhysicalDeviceSciSyncAttributesNV\0", + ); + let val = _f(cname); + if val.is_null() { + get_physical_device_sci_sync_attributes_nv + } else { + ::std::mem::transmute(val) + } + }, + get_semaphore_sci_sync_obj_nv: unsafe { + unsafe extern "system" fn get_semaphore_sci_sync_obj_nv( + _device: Device, + _p_get_sci_sync_info: *const SemaphoreGetSciSyncInfoNV, + _p_handle: *mut c_void, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_semaphore_sci_sync_obj_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetSemaphoreSciSyncObjNV\0", + ); + let val = _f(cname); + if val.is_null() { + get_semaphore_sci_sync_obj_nv + } else { + ::std::mem::transmute(val) + } + }, + import_semaphore_sci_sync_obj_nv: unsafe { + unsafe extern "system" fn import_semaphore_sci_sync_obj_nv( + _device: Device, + _p_import_semaphore_sci_sync_info: *const ImportSemaphoreSciSyncInfoNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(import_semaphore_sci_sync_obj_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkImportSemaphoreSciSyncObjNV\0", + ); + let val = _f(cname); + if val.is_null() { + import_semaphore_sci_sync_obj_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } +} +#[doc = "Generated from 'VK_NV_external_sci_sync'"] +impl ExternalFenceHandleTypeFlags { + pub const SCI_SYNC_OBJ_NV: Self = Self(0b1_0000); + pub const SCI_SYNC_FENCE_NV: Self = Self(0b10_0000); +} +#[doc = "Generated from 'VK_NV_external_sci_sync'"] +impl ExternalSemaphoreHandleTypeFlags { + pub const SCI_SYNC_OBJ_NV: Self = Self(0b10_0000); +} +#[doc = "Generated from 'VK_NV_external_sci_sync'"] +impl StructureType { + pub const IMPORT_FENCE_SCI_SYNC_INFO_NV: Self = Self(1_000_373_000); + pub const EXPORT_FENCE_SCI_SYNC_INFO_NV: Self = Self(1_000_373_001); + pub const FENCE_GET_SCI_SYNC_INFO_NV: Self = Self(1_000_373_002); + pub const SCI_SYNC_ATTRIBUTES_INFO_NV: Self = Self(1_000_373_003); + pub const IMPORT_SEMAPHORE_SCI_SYNC_INFO_NV: Self = Self(1_000_373_004); + pub const EXPORT_SEMAPHORE_SCI_SYNC_INFO_NV: Self = Self(1_000_373_005); + pub const SEMAPHORE_GET_SCI_SYNC_INFO_NV: Self = Self(1_000_373_006); + pub const PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_FEATURES_NV: Self = Self(1_000_373_007); +} +impl NvExternalMemorySciBufFn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_external_memory_sci_buf\0") + } + } + pub const SPEC_VERSION: u32 = 2u32; +} +#[allow(non_camel_case_types)] +pub type PFN_vkGetMemorySciBufNV = unsafe extern "system" fn( + device: Device, + p_get_sci_buf_info: *const MemoryGetSciBufInfoNV, + p_handle: *mut NvSciBufObj, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV = + unsafe extern "system" fn( + physical_device: PhysicalDevice, + handle_type: ExternalMemoryHandleTypeFlags, + handle: NvSciBufObj, + p_memory_sci_buf_properties: *mut MemorySciBufPropertiesNV, + ) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceSciBufAttributesNV = unsafe extern "system" fn( + physical_device: PhysicalDevice, + p_attributes: NvSciBufAttrList, +) -> Result; +#[derive(Clone)] +pub struct NvExternalMemorySciBufFn { + pub get_memory_sci_buf_nv: PFN_vkGetMemorySciBufNV, + pub get_physical_device_external_memory_sci_buf_properties_nv: + PFN_vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV, + pub get_physical_device_sci_buf_attributes_nv: PFN_vkGetPhysicalDeviceSciBufAttributesNV, +} +unsafe impl Send for NvExternalMemorySciBufFn {} +unsafe impl Sync for NvExternalMemorySciBufFn {} +impl NvExternalMemorySciBufFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self { + get_memory_sci_buf_nv: unsafe { + unsafe extern "system" fn get_memory_sci_buf_nv( + _device: Device, + _p_get_sci_buf_info: *const MemoryGetSciBufInfoNV, + _p_handle: *mut NvSciBufObj, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_memory_sci_buf_nv) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkGetMemorySciBufNV\0"); + let val = _f(cname); + if val.is_null() { + get_memory_sci_buf_nv + } else { + ::std::mem::transmute(val) + } + }, + get_physical_device_external_memory_sci_buf_properties_nv: unsafe { + unsafe extern "system" fn get_physical_device_external_memory_sci_buf_properties_nv( + _physical_device: PhysicalDevice, + _handle_type: ExternalMemoryHandleTypeFlags, + _handle: NvSciBufObj, + _p_memory_sci_buf_properties: *mut MemorySciBufPropertiesNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_physical_device_external_memory_sci_buf_properties_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV\0", + ); + let val = _f(cname); + if val.is_null() { + get_physical_device_external_memory_sci_buf_properties_nv + } else { + ::std::mem::transmute(val) + } + }, + get_physical_device_sci_buf_attributes_nv: unsafe { + unsafe extern "system" fn get_physical_device_sci_buf_attributes_nv( + _physical_device: PhysicalDevice, + _p_attributes: NvSciBufAttrList, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_physical_device_sci_buf_attributes_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetPhysicalDeviceSciBufAttributesNV\0", + ); + let val = _f(cname); + if val.is_null() { + get_physical_device_sci_buf_attributes_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } +} +#[doc = "Generated from 'VK_NV_external_memory_sci_buf'"] +impl ExternalMemoryHandleTypeFlags { + pub const SCI_BUF_NV: Self = Self(0b10_0000_0000_0000); +} +#[doc = "Generated from 'VK_NV_external_memory_sci_buf'"] +impl StructureType { + pub const IMPORT_MEMORY_SCI_BUF_INFO_NV: Self = Self(1_000_374_000); + pub const EXPORT_MEMORY_SCI_BUF_INFO_NV: Self = Self(1_000_374_001); + pub const MEMORY_GET_SCI_BUF_INFO_NV: Self = Self(1_000_374_002); + pub const MEMORY_SCI_BUF_PROPERTIES_NV: Self = Self(1_000_374_003); + pub const PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCI_BUF_FEATURES_NV: Self = Self(1_000_374_004); + pub const PHYSICAL_DEVICE_EXTERNAL_SCI_BUF_FEATURES_NV: Self = + Self::PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCI_BUF_FEATURES_NV; +} +impl ExtMultisampledRenderToSingleSampledFn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"VK_EXT_multisampled_render_to_single_sampled\0", + ) + } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +pub struct ExtMultisampledRenderToSingleSampledFn {} +unsafe impl Send for ExtMultisampledRenderToSingleSampledFn {} +unsafe impl Sync for ExtMultisampledRenderToSingleSampledFn {} +impl ExtMultisampledRenderToSingleSampledFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +#[doc = "Generated from 'VK_EXT_multisampled_render_to_single_sampled'"] +impl ImageCreateFlags { + pub const MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXT: Self = Self(0b100_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_EXT_multisampled_render_to_single_sampled'"] +impl StructureType { + pub const PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: Self = + Self(1_000_376_000); + pub const SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT: Self = Self(1_000_376_001); + pub const MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: Self = Self(1_000_376_002); +} +impl ExtExtendedDynamicState2Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extended_dynamic_state2\0") + } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetPatchControlPointsEXT = + unsafe extern "system" fn(command_buffer: CommandBuffer, patch_control_points: u32); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetRasterizerDiscardEnable = + unsafe extern "system" fn(command_buffer: CommandBuffer, rasterizer_discard_enable: Bool32); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetDepthBiasEnable = + unsafe extern "system" fn(command_buffer: CommandBuffer, depth_bias_enable: Bool32); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetLogicOpEXT = + unsafe extern "system" fn(command_buffer: CommandBuffer, logic_op: LogicOp); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetPrimitiveRestartEnable = + unsafe extern "system" fn(command_buffer: CommandBuffer, primitive_restart_enable: Bool32); +#[derive(Clone)] +pub struct ExtExtendedDynamicState2Fn { + pub cmd_set_patch_control_points_ext: PFN_vkCmdSetPatchControlPointsEXT, + pub cmd_set_rasterizer_discard_enable_ext: PFN_vkCmdSetRasterizerDiscardEnable, + pub cmd_set_depth_bias_enable_ext: PFN_vkCmdSetDepthBiasEnable, + pub cmd_set_logic_op_ext: PFN_vkCmdSetLogicOpEXT, + pub cmd_set_primitive_restart_enable_ext: PFN_vkCmdSetPrimitiveRestartEnable, +} +unsafe impl Send for ExtExtendedDynamicState2Fn {} +unsafe impl Sync for ExtExtendedDynamicState2Fn {} +impl ExtExtendedDynamicState2Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self { + cmd_set_patch_control_points_ext: unsafe { + unsafe extern "system" fn cmd_set_patch_control_points_ext( + _command_buffer: CommandBuffer, + _patch_control_points: u32, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_patch_control_points_ext) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdSetPatchControlPointsEXT\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_set_patch_control_points_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_set_rasterizer_discard_enable_ext: unsafe { + unsafe extern "system" fn cmd_set_rasterizer_discard_enable_ext( + _command_buffer: CommandBuffer, + _rasterizer_discard_enable: Bool32, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_rasterizer_discard_enable_ext) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdSetRasterizerDiscardEnableEXT\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_set_rasterizer_discard_enable_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_set_depth_bias_enable_ext: unsafe { + unsafe extern "system" fn cmd_set_depth_bias_enable_ext( + _command_buffer: CommandBuffer, + _depth_bias_enable: Bool32, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_depth_bias_enable_ext) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdSetDepthBiasEnableEXT\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_set_depth_bias_enable_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_set_logic_op_ext: unsafe { + unsafe extern "system" fn cmd_set_logic_op_ext( + _command_buffer: CommandBuffer, + _logic_op: LogicOp, + ) { + panic!(concat!("Unable to load ", stringify!(cmd_set_logic_op_ext))) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdSetLogicOpEXT\0"); + let val = _f(cname); + if val.is_null() { + cmd_set_logic_op_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_set_primitive_restart_enable_ext: unsafe { + unsafe extern "system" fn cmd_set_primitive_restart_enable_ext( + _command_buffer: CommandBuffer, + _primitive_restart_enable: Bool32, + ) { + panic!(concat!( "Unable to load ", stringify!(cmd_set_primitive_restart_enable_ext) )) @@ -19635,6 +20173,57 @@ impl StructureType { pub const DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR: Self = Self::DEVICE_BUFFER_MEMORY_REQUIREMENTS; pub const DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR: Self = Self::DEVICE_IMAGE_MEMORY_REQUIREMENTS; } +impl ArmShaderCorePropertiesFn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_ARM_shader_core_properties\0") + } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +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, + { + 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 ExtImageSlicedViewOf3dFn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_image_sliced_view_of_3d\0") + } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +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, + { + Self {} + } +} +#[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 ValveDescriptorSetHostMappingFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -20034,6 +20623,31 @@ impl GoogleSurfacelessQueryFn { Self {} } } +impl ExtApplicationParametersFn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_application_parameters\0") + } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +pub struct ExtApplicationParametersFn {} +unsafe impl Send for ExtApplicationParametersFn {} +unsafe impl Sync for ExtApplicationParametersFn {} +impl ExtApplicationParametersFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +#[doc = "Generated from 'VK_EXT_application_parameters'"] +impl StructureType { + pub const APPLICATION_PARAMETERS_EXT: Self = Self(1_000_435_000); +} impl ExtImageCompressionControlSwapchainFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -21562,6 +22176,203 @@ impl StructureType { pub const PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM: Self = Self(1_000_488_000); } +impl NvExternalSciSync2Fn { + #[inline] + pub const fn name() -> &'static ::std::ffi::CStr { + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_external_sci_sync2\0") } + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[allow(non_camel_case_types)] +pub type PFN_vkCreateSemaphoreSciSyncPoolNV = unsafe extern "system" fn( + device: Device, + p_create_info: *const SemaphoreSciSyncPoolCreateInfoNV, + p_allocator: *const AllocationCallbacks, + p_semaphore_pool: *mut SemaphoreSciSyncPoolNV, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroySemaphoreSciSyncPoolNV = unsafe extern "system" fn( + device: Device, + semaphore_pool: SemaphoreSciSyncPoolNV, + p_allocator: *const AllocationCallbacks, +); +#[derive(Clone)] +pub struct NvExternalSciSync2Fn { + pub create_semaphore_sci_sync_pool_nv: PFN_vkCreateSemaphoreSciSyncPoolNV, + pub destroy_semaphore_sci_sync_pool_nv: PFN_vkDestroySemaphoreSciSyncPoolNV, + pub get_fence_sci_sync_fence_nv: crate::vk::PFN_vkGetFenceSciSyncFenceNV, + pub get_fence_sci_sync_obj_nv: crate::vk::PFN_vkGetFenceSciSyncObjNV, + pub import_fence_sci_sync_fence_nv: crate::vk::PFN_vkImportFenceSciSyncFenceNV, + pub import_fence_sci_sync_obj_nv: crate::vk::PFN_vkImportFenceSciSyncObjNV, + pub get_physical_device_sci_sync_attributes_nv: + crate::vk::PFN_vkGetPhysicalDeviceSciSyncAttributesNV, +} +unsafe impl Send for NvExternalSciSync2Fn {} +unsafe impl Sync for NvExternalSciSync2Fn {} +impl NvExternalSciSync2Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self { + create_semaphore_sci_sync_pool_nv: unsafe { + unsafe extern "system" fn create_semaphore_sci_sync_pool_nv( + _device: Device, + _p_create_info: *const SemaphoreSciSyncPoolCreateInfoNV, + _p_allocator: *const AllocationCallbacks, + _p_semaphore_pool: *mut SemaphoreSciSyncPoolNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(create_semaphore_sci_sync_pool_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCreateSemaphoreSciSyncPoolNV\0", + ); + let val = _f(cname); + if val.is_null() { + create_semaphore_sci_sync_pool_nv + } else { + ::std::mem::transmute(val) + } + }, + destroy_semaphore_sci_sync_pool_nv: unsafe { + unsafe extern "system" fn destroy_semaphore_sci_sync_pool_nv( + _device: Device, + _semaphore_pool: SemaphoreSciSyncPoolNV, + _p_allocator: *const AllocationCallbacks, + ) { + panic!(concat!( + "Unable to load ", + stringify!(destroy_semaphore_sci_sync_pool_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkDestroySemaphoreSciSyncPoolNV\0", + ); + let val = _f(cname); + if val.is_null() { + destroy_semaphore_sci_sync_pool_nv + } else { + ::std::mem::transmute(val) + } + }, + get_fence_sci_sync_fence_nv: unsafe { + unsafe extern "system" fn get_fence_sci_sync_fence_nv( + _device: Device, + _p_get_sci_sync_handle_info: *const FenceGetSciSyncInfoNV, + _p_handle: *mut c_void, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_fence_sci_sync_fence_nv) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkGetFenceSciSyncFenceNV\0"); + let val = _f(cname); + if val.is_null() { + get_fence_sci_sync_fence_nv + } else { + ::std::mem::transmute(val) + } + }, + get_fence_sci_sync_obj_nv: unsafe { + unsafe extern "system" fn get_fence_sci_sync_obj_nv( + _device: Device, + _p_get_sci_sync_handle_info: *const FenceGetSciSyncInfoNV, + _p_handle: *mut c_void, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_fence_sci_sync_obj_nv) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkGetFenceSciSyncObjNV\0"); + let val = _f(cname); + if val.is_null() { + get_fence_sci_sync_obj_nv + } else { + ::std::mem::transmute(val) + } + }, + import_fence_sci_sync_fence_nv: unsafe { + unsafe extern "system" fn import_fence_sci_sync_fence_nv( + _device: Device, + _p_import_fence_sci_sync_info: *const ImportFenceSciSyncInfoNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(import_fence_sci_sync_fence_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkImportFenceSciSyncFenceNV\0", + ); + let val = _f(cname); + if val.is_null() { + import_fence_sci_sync_fence_nv + } else { + ::std::mem::transmute(val) + } + }, + import_fence_sci_sync_obj_nv: unsafe { + unsafe extern "system" fn import_fence_sci_sync_obj_nv( + _device: Device, + _p_import_fence_sci_sync_info: *const ImportFenceSciSyncInfoNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(import_fence_sci_sync_obj_nv) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkImportFenceSciSyncObjNV\0"); + let val = _f(cname); + if val.is_null() { + import_fence_sci_sync_obj_nv + } else { + ::std::mem::transmute(val) + } + }, + get_physical_device_sci_sync_attributes_nv: unsafe { + unsafe extern "system" fn get_physical_device_sci_sync_attributes_nv( + _physical_device: PhysicalDevice, + _p_sci_sync_attributes_info: *const SciSyncAttributesInfoNV, + _p_attributes: NvSciSyncAttrList, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_physical_device_sci_sync_attributes_nv) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetPhysicalDeviceSciSyncAttributesNV\0", + ); + let val = _f(cname); + if val.is_null() { + get_physical_device_sci_sync_attributes_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } +} +#[doc = "Generated from 'VK_NV_external_sci_sync2'"] +impl ObjectType { + #[doc = "VkSemaphoreSciSyncPoolNV"] + pub const SEMAPHORE_SCI_SYNC_POOL_NV: Self = Self(1_000_489_000); +} +#[doc = "Generated from 'VK_NV_external_sci_sync2'"] +impl StructureType { + pub const SEMAPHORE_SCI_SYNC_POOL_CREATE_INFO_NV: Self = Self(1_000_489_000); + pub const SEMAPHORE_SCI_SYNC_CREATE_INFO_NV: Self = Self(1_000_489_001); + pub const PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_2_FEATURES_NV: Self = Self(1_000_489_002); + pub const DEVICE_SEMAPHORE_SCI_SYNC_POOL_RESERVATION_CREATE_INFO_NV: Self = Self(1_000_489_003); +} impl NvRayTracingInvocationReorderFn { #[inline] pub const fn name() -> &'static ::std::ffi::CStr { @@ -21682,3 +22493,33 @@ impl StructureType { pub const PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: Self = Self(1_000_498_000); } +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); +} diff --git a/ash/src/vk/feature_extensions.rs b/ash/src/vk/feature_extensions.rs index 4b1820c9a..792531962 100644 --- a/ash/src/vk/feature_extensions.rs +++ b/ash/src/vk/feature_extensions.rs @@ -449,3 +449,34 @@ impl StructureType { pub const DEVICE_BUFFER_MEMORY_REQUIREMENTS: Self = Self(1_000_413_002); pub const DEVICE_IMAGE_MEMORY_REQUIREMENTS: Self = Self(1_000_413_003); } +#[doc = "Generated from 'VKSC_VERSION_1_0'"] +impl MemoryHeapFlags { + pub const SEU_SAFE: Self = Self(0b100); +} +#[doc = "Generated from 'VKSC_VERSION_1_0'"] +impl PipelineCacheCreateFlags { + pub const READ_ONLY: Self = Self::RESERVED_1_EXT; + pub const USE_APPLICATION_STORAGE: Self = Self(0b100); +} +#[doc = "Generated from 'VKSC_VERSION_1_0'"] +impl PipelineCacheHeaderVersion { + pub const SAFETY_CRITICAL_ONE: Self = Self(1_000_298_001); +} +#[doc = "Generated from 'VKSC_VERSION_1_0'"] +impl Result { + pub const ERROR_VALIDATION_FAILED: Self = Self(-1_000_011_001); + pub const ERROR_INVALID_PIPELINE_CACHE_DATA: Self = Self(-1_000_298_000); + pub const ERROR_NO_PIPELINE_MATCH: Self = Self(-1_000_298_001); +} +#[doc = "Generated from 'VKSC_VERSION_1_0'"] +impl StructureType { + pub const PHYSICAL_DEVICE_VULKAN_SC_1_0_FEATURES: Self = Self(1_000_298_000); + pub const PHYSICAL_DEVICE_VULKAN_SC_1_0_PROPERTIES: Self = Self(1_000_298_001); + pub const DEVICE_OBJECT_RESERVATION_CREATE_INFO: Self = Self(1_000_298_002); + pub const COMMAND_POOL_MEMORY_RESERVATION_CREATE_INFO: Self = Self(1_000_298_003); + pub const COMMAND_POOL_MEMORY_CONSUMPTION: Self = Self(1_000_298_004); + pub const PIPELINE_POOL_SIZE: Self = Self(1_000_298_005); + pub const FAULT_DATA: Self = Self(1_000_298_007); + pub const FAULT_CALLBACK_INFO: Self = Self(1_000_298_008); + pub const PIPELINE_OFFLINE_CREATE_INFO: Self = Self(1_000_298_010); +} diff --git a/ash/src/vk/platform_types.rs b/ash/src/vk/platform_types.rs index 4d6ffe059..be7af6a54 100644 --- a/ash/src/vk/platform_types.rs +++ b/ash/src/vk/platform_types.rs @@ -39,3 +39,8 @@ pub type MTLCommandQueue_id = *mut c_void; pub type MTLDevice_id = *mut c_void; pub type MTLSharedEvent_id = *mut c_void; pub type MTLTexture_id = *mut c_void; +pub type NvSciBufAttrList = *mut c_void; +pub type NvSciBufObj = *mut c_void; +pub type NvSciSyncAttrList = *mut c_void; +pub type NvSciSyncFence = *mut c_void; +pub type NvSciSyncObj = *mut c_void; diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index 9f93cbe76..bd6443d28 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit 9f93cbe76abe9f6cb4a36df10b08fa3b78ae0027 +Subproject commit bd6443d28f2ebecedfb839b52d612011ba623d14 diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 51ad0058d..fb9fd0088 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -25,6 +25,8 @@ use std::{ }; use syn::Ident; +const DESIRED_API: &str = "vulkan"; + macro_rules! get_variant { ($variant:path) => { |enum_| match enum_ { @@ -1138,6 +1140,16 @@ pub fn generate_define( let [vk_parse::TypeCodeMarkup::Name(define_name), ..] = &spec.markup[..] else { return quote!(); }; + + // TODO: Should probably have api="vulkansc" annotation + // https://github.com/ash-rs/ash/issues/698 + if matches!( + define_name.as_str(), + "VKSC_API_VARIANT" | "VKSC_API_VERSION_1_0" + ) { + return quote!(); + } + let name = constant_name(define_name); let ident = format_ident!("{}", name); @@ -1478,12 +1490,12 @@ fn is_static_array(field: &vkxml::Field) -> bool { .map(|ty| matches!(ty, vkxml::ArrayType::Static)) .unwrap_or(false) } -pub fn derive_default(struct_: &vkxml::Struct, has_lifetime: bool) -> Option { +pub fn derive_default( + struct_: &vkxml::Struct, + members: &[&vkxml::Field], + has_lifetime: bool, +) -> 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 @@ -1500,14 +1512,22 @@ pub fn derive_default(struct_: &vkxml::Struct, has_lifetime: bool) -> Option Option, has_lifetime: bool, ) -> 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() @@ -1571,15 +1588,15 @@ pub fn derive_debug( .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() + .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" { @@ -1620,6 +1637,7 @@ pub fn derive_debug( pub fn derive_setters( struct_: &vkxml::Struct, + members: &[&vkxml::Field], root_structs: &HashSet, has_lifetimes: &HashSet, ) -> Option { @@ -1633,18 +1651,9 @@ pub fn derive_setters( let name = name_to_tokens(&struct_.name); - let members = struct_ - .elements - .iter() - .filter_map(get_variant!(vkxml::StructElement::Member)); - - let next_field = members - .clone() - .find(|field| field.param_ident() == "p_next"); + let next_field = members.iter().find(|field| field.param_ident() == "p_next"); - let structure_type_field = members - .clone() - .find(|field| field.param_ident() == "s_type"); + let structure_type_field = members.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()); @@ -1655,7 +1664,7 @@ pub fn derive_setters( ("VkDescriptorSetLayoutBinding", "pImmutableSamplers"), ]; let filter_members: Vec = members - .clone() + .iter() .filter_map(|field| { let field_name = field.name.as_ref().unwrap(); @@ -1677,7 +1686,7 @@ pub fn derive_setters( }) .collect(); - let setters = members.clone().filter_map(|field| { + let setters = members.iter().filter_map(|field| { let param_ident = field.param_ident(); let param_ty_tokens = field.safe_type_tokens(quote!('a), None); @@ -1783,7 +1792,7 @@ pub fn derive_setters( let array_size_ident = format_ident!("{}", array_size.to_snake_case().as_str()); - let size_field = members.clone().find(|m| m.name.as_deref() == Some(array_size)).unwrap(); + let size_field = members.iter().find(|m| m.name.as_deref() == Some(array_size)).unwrap(); let cast = if size_field.basetype == "size_t" { quote!() @@ -1945,11 +1954,17 @@ 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>, has_lifetimes: &HashSet, ) -> 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)] @@ -2019,9 +2034,19 @@ 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, _)| field) + .collect::>(); - let params = members.clone().map(|field| { + let params = members.iter().map(|field| { let param_ident = field.param_ident(); let param_ty_tokens = if field.basetype == struct_.name { let pointer = field @@ -2045,9 +2070,9 @@ pub fn generate_struct( false => (quote!(), quote!()), }; - let debug_tokens = derive_debug(struct_, union_types, has_lifetime); - let default_tokens = derive_default(struct_, has_lifetime); - let setter_tokens = derive_setters(struct_, root_structs, has_lifetimes); + let debug_tokens = derive_debug(struct_, &members, union_types, has_lifetime); + let default_tokens = derive_default(struct_, &members, has_lifetime); + let setter_tokens = derive_setters(struct_, &members, root_structs, has_lifetimes); let manual_derive_tokens = manual_derives(struct_); let dbg_str = if debug_tokens.is_none() { quote!(#[cfg_attr(feature = "debug", derive(Debug))]) @@ -2169,6 +2194,12 @@ pub fn generate_definition_vk_parse( definition: &vk_parse::Type, 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)), _ => None, @@ -2179,6 +2210,7 @@ pub fn generate_definition( union_types: &HashSet<&str>, root_structs: &HashSet, has_lifetimes: &HashSet, + vk_parse_types: &HashMap, bitflags_cache: &mut HashSet, const_values: &mut BTreeMap, ) -> Option { @@ -2186,6 +2218,7 @@ pub fn generate_definition( vkxml::DefinitionsElement::Typedef(ref typedef) => Some(generate_typedef(typedef)), vkxml::DefinitionsElement::Struct(ref struct_) => Some(generate_struct( struct_, + vk_parse_types, root_structs, union_types, has_lifetimes, @@ -2204,6 +2237,10 @@ pub fn generate_feature<'a>( commands: &CommandMap<'a>, fn_cache: &mut HashSet<&'a str>, ) -> TokenStream { + if !feature.api.split(',').any(|n| n == "vulkan") { + return quote!(); + } + let (static_commands, entry_commands, device_commands, instance_commands) = feature .elements .iter() @@ -2613,7 +2650,7 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { _ => continue, }; } - let vk_parse_definitions: Vec<_> = spec2 + let vk_parse_types = spec2 .0 .iter() .filter_map(get_variant!(vk_parse::RegistryChild::Types)) @@ -2622,9 +2659,17 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { .iter() .filter_map(get_variant!(vk_parse::TypesChild::Type)) }) + .collect::>(); + let vk_parse_definitions: Vec<_> = vk_parse_types + .iter() .filter_map(|def| generate_definition_vk_parse(def, &mut identifier_renames)) .collect(); + let vk_parse_types = vk_parse_types + .into_iter() + .filter_map(|t| t.name.clone().map(|n| (n, t))) + .collect::>(); + let root_structs = root_structs(&definitions); let definition_code: Vec<_> = vk_parse_definitions .into_iter() @@ -2634,6 +2679,7 @@ pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { &union_types, &root_structs, &has_lifetimes, + &vk_parse_types, &mut bitflags_cache, &mut const_values, )