From 9cbf42f528457879ced229031487a52d4fdeb797 Mon Sep 17 00:00:00 2001 From: KyleMayes Date: Mon, 2 Sep 2024 00:41:26 +0000 Subject: [PATCH] Update generated bindings --- .commits | 2 +- CHANGELOG.md | 10 + vulkanalia-sys/src/bitmasks.rs | 1 + vulkanalia-sys/src/commands.rs | 38 ++ vulkanalia-sys/src/constants.rs | 1 + vulkanalia-sys/src/enums.rs | 37 +- vulkanalia-sys/src/extensions.rs | 34 +- vulkanalia-sys/src/handles.rs | 44 ++ vulkanalia-sys/src/structs.rs | 285 +++++++++- vulkanalia/src/vk/builders.rs | 885 ++++++++++++++++++++++++++++++- vulkanalia/src/vk/chains.rs | 210 +++++++- vulkanalia/src/vk/commands.rs | 83 +++ vulkanalia/src/vk/enums.rs | 5 + vulkanalia/src/vk/extensions.rs | 131 +++++ 14 files changed, 1739 insertions(+), 27 deletions(-) diff --git a/.commits b/.commits index 693705a..71f2522 100644 --- a/.commits +++ b/.commits @@ -1,2 +1,2 @@ -KhronosGroup/Vulkan-Docs/main/xml/vk.xml => 306edf6a920ae372d5134424fcc9c009c31e0760 +KhronosGroup/Vulkan-Docs/main/xml/vk.xml => 8e435deb15124bbf9a7e3340e6cc7975999ed5c5 KhronosGroup/Vulkan-Headers/main/include/vk_video => 5a5c9a643484d888873e32c5d7d484fae8e71d3d \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index fa1b052..3dd5ba1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [0.26.0] - UNRELEASED + +### Bindings Updates +- [Add discussion of processing frameworks being responsible for all defined attributes and tags (#2417)](https://github.com/KhronosGroup/Vulkan-Docs/commit/58d38a51ca9d1b4132af54c88b89481e7fe27dc9) +- [Reserve extension #604 (#2419)](https://github.com/KhronosGroup/Vulkan-Docs/commit/55255e28e68016d9861cb134dcc9db9255670a5d) +- [August 23, 2024 Vulkan 1.3.294 spec update](https://github.com/KhronosGroup/Vulkan-Docs/commit/fb9f45c5ee8f4e8cd6f2b19eeb751fd305773a67) +- [Missing require for pipeline binary key size - #2422 (#2423)](https://github.com/KhronosGroup/Vulkan-Docs/commit/2eaf6b23921b1a597371d0646e3202a684fb973e) +- [minor wording change to avoid ambiguity in 'the act of waiting'. (#2418)](https://github.com/KhronosGroup/Vulkan-Docs/commit/ccd06598b7745aca51ea45c27055f5fe9573114d) +- [August 30, 2024 Vulkan 1.3.295 spec update](https://github.com/KhronosGroup/Vulkan-Docs/commit/8e435deb15124bbf9a7e3340e6cc7975999ed5c5) + ## [0.25.0] - 2024-08-22 ### Changed diff --git a/vulkanalia-sys/src/bitmasks.rs b/vulkanalia-sys/src/bitmasks.rs index 6c35620..6eb0249 100644 --- a/vulkanalia-sys/src/bitmasks.rs +++ b/vulkanalia-sys/src/bitmasks.rs @@ -1374,6 +1374,7 @@ bitflags! { const RAY_TRACING_DISPLACEMENT_MICROMAP_NV = 1 << 28; const DESCRIPTOR_BUFFER_EXT = 1 << 29; const PROTECTED_ACCESS_ONLY_EXT = 1 << 30; + const CAPTURE_DATA = 1 << 31; const ENABLE_LEGACY_DITHERING_EXT = 1 << 34; } } diff --git a/vulkanalia-sys/src/commands.rs b/vulkanalia-sys/src/commands.rs index fdc3b14..26289fe 100644 --- a/vulkanalia-sys/src/commands.rs +++ b/vulkanalia-sys/src/commands.rs @@ -2195,6 +2195,14 @@ pub type PFN_vkCreateOpticalFlowSessionNV = unsafe extern "system" fn( _session: *mut OpticalFlowSessionNV, ) -> Result; +/// +pub type PFN_vkCreatePipelineBinariesKHR = unsafe extern "system" fn( + _device: Device, + _create_info: *const PipelineBinaryCreateInfoKHR, + _allocator: *const AllocationCallbacks, + _binaries: *mut PipelineBinaryHandlesInfoKHR, +) -> Result; + /// pub type PFN_vkCreatePipelineCache = unsafe extern "system" fn( _device: Device, @@ -2633,6 +2641,13 @@ pub type PFN_vkDestroyPipeline = unsafe extern "system" fn( _allocator: *const AllocationCallbacks, ); +/// +pub type PFN_vkDestroyPipelineBinaryKHR = unsafe extern "system" fn( + _device: Device, + _pipeline_binary: PipelineBinaryKHR, + _allocator: *const AllocationCallbacks, +); + /// pub type PFN_vkDestroyPipelineCache = unsafe extern "system" fn( _device: Device, @@ -3932,6 +3947,15 @@ pub type PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR = unsafe extern "syst _visual_id: VisualID, ) -> Bool32; +/// +pub type PFN_vkGetPipelineBinaryDataKHR = unsafe extern "system" fn( + _device: Device, + _info: *const PipelineBinaryDataInfoKHR, + _pipeline_binary_key: *mut PipelineBinaryKeyKHR, + _pipeline_binary_data_size: *mut usize, + _pipeline_binary_data: *mut c_void, +) -> Result; + /// pub type PFN_vkGetPipelineCacheData = unsafe extern "system" fn( _device: Device, @@ -3978,6 +4002,13 @@ pub type PFN_vkGetPipelineIndirectMemoryRequirementsNV = unsafe extern "system" _memory_requirements: *mut MemoryRequirements2, ); +/// +pub type PFN_vkGetPipelineKeyKHR = unsafe extern "system" fn( + _device: Device, + _pipeline_create_info: *const PipelineCreateInfoKHR, + _pipeline_key: *mut PipelineBinaryKeyKHR, +) -> Result; + /// pub type PFN_vkGetPipelinePropertiesEXT = unsafe extern "system" fn( _device: Device, @@ -4381,6 +4412,13 @@ pub type PFN_vkRegisterDisplayEventEXT = unsafe extern "system" fn( _fence: *mut Fence, ) -> Result; +/// +pub type PFN_vkReleaseCapturedPipelineDataKHR = unsafe extern "system" fn( + _device: Device, + _info: *const ReleaseCapturedPipelineDataInfoKHR, + _allocator: *const AllocationCallbacks, +) -> Result; + /// pub type PFN_vkReleaseDisplayEXT = unsafe extern "system" fn(_physical_device: PhysicalDevice, _display: DisplayKHR) -> Result; diff --git a/vulkanalia-sys/src/constants.rs b/vulkanalia-sys/src/constants.rs index 3d6a52b..acb5389 100644 --- a/vulkanalia-sys/src/constants.rs +++ b/vulkanalia-sys/src/constants.rs @@ -32,6 +32,7 @@ pub const MAX_GLOBAL_PRIORITY_SIZE_KHR: usize = 16; pub const MAX_MEMORY_HEAPS: usize = 16; pub const MAX_MEMORY_TYPES: usize = 32; pub const MAX_PHYSICAL_DEVICE_NAME_SIZE: usize = 256; +pub const MAX_PIPELINE_BINARY_KEY_SIZE_KHR: usize = 32; pub const MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT: usize = 32; pub const MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR: usize = 7; pub const QUEUE_FAMILY_EXTERNAL: u32 = !1; diff --git a/vulkanalia-sys/src/enums.rs b/vulkanalia-sys/src/enums.rs index d20e5cb..fcb757f 100644 --- a/vulkanalia-sys/src/enums.rs +++ b/vulkanalia-sys/src/enums.rs @@ -3475,6 +3475,7 @@ impl ObjectType { pub const MICROMAP_EXT: Self = Self(1000396000); pub const OPTICAL_FLOW_SESSION_NV: Self = Self(1000464000); pub const SHADER_EXT: Self = Self(1000482000); + pub const PIPELINE_BINARY_KHR: Self = Self(1000483000); pub const SEMAPHORE_SCI_SYNC_POOL_NV: Self = Self(1000489000); /// Constructs an instance of this enum with the supplied underlying value. @@ -3544,6 +3545,7 @@ impl fmt::Debug for ObjectType { 1000396000 => write!(f, "MICROMAP_EXT"), 1000464000 => write!(f, "OPTICAL_FLOW_SESSION_NV"), 1000482000 => write!(f, "SHADER_EXT"), + 1000483000 => write!(f, "PIPELINE_BINARY_KHR"), 1000489000 => write!(f, "SEMAPHORE_SCI_SYNC_POOL_NV"), _ => self.0.fmt(f), } @@ -4749,6 +4751,8 @@ impl Result { pub const ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR: Self = Self(-1000299000); pub const ERROR_COMPRESSION_EXHAUSTED_EXT: Self = Self(-1000338000); pub const INCOMPATIBLE_SHADER_BINARY_EXT: Self = Self(1000482000); + pub const PIPELINE_BINARY_MISSING_KHR: Self = Self(1000483000); + pub const ERROR_NOT_ENOUGH_SPACE_KHR: Self = Self(-1000483000); /// Constructs an instance of this enum with the supplied underlying value. #[inline] @@ -4813,6 +4817,8 @@ impl fmt::Debug for Result { -1000299000 => write!(f, "ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR"), -1000338000 => write!(f, "ERROR_COMPRESSION_EXHAUSTED_EXT"), 1000482000 => write!(f, "INCOMPATIBLE_SHADER_BINARY_EXT"), + 1000483000 => write!(f, "PIPELINE_BINARY_MISSING_KHR"), + -1000483000 => write!(f, "ERROR_NOT_ENOUGH_SPACE_KHR"), _ => self.0.fmt(f), } } @@ -4868,6 +4874,8 @@ impl fmt::Display for Result { -1000299000 => write!(f, "ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR"), -1000338000 => write!(f, "ERROR_COMPRESSION_EXHAUSTED_EXT"), 1000482000 => write!(f, "INCOMPATIBLE_SHADER_BINARY_EXT"), + 1000483000 => write!(f, "PIPELINE_BINARY_MISSING_KHR"), + -1000483000 => write!(f, "ERROR_NOT_ENOUGH_SPACE_KHR"), _ => write!(f, "unknown Vulkan result (code = {})", self.0), } } @@ -5935,7 +5943,6 @@ impl StructureType { pub const DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD: Self = Self(1000189000); pub const PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: Self = Self(1000190000); pub const PRESENT_FRAME_TOKEN_GGP: Self = Self(1000191000); - pub const PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: Self = Self(1000201000); pub const PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV: Self = Self(1000202000); pub const PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV: Self = Self(1000202001); pub const PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV: Self = Self(1000204000); @@ -6302,6 +6309,16 @@ impl StructureType { pub const PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT: Self = Self(1000482000); pub const PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT: Self = Self(1000482001); pub const SHADER_CREATE_INFO_EXT: Self = Self(1000482002); + pub const PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR: Self = Self(1000483000); + pub const PIPELINE_BINARY_CREATE_INFO_KHR: Self = Self(1000483001); + pub const PIPELINE_BINARY_INFO_KHR: Self = Self(1000483002); + pub const PIPELINE_BINARY_KEY_KHR: Self = Self(1000483003); + pub const PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR: Self = Self(1000483004); + pub const RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR: Self = Self(1000483005); + pub const PIPELINE_BINARY_DATA_INFO_KHR: Self = Self(1000483006); + pub const PIPELINE_CREATE_INFO_KHR: Self = Self(1000483007); + pub const DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR: Self = Self(1000483008); + pub const PIPELINE_BINARY_HANDLES_INFO_KHR: Self = Self(1000483009); pub const PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM: Self = Self(1000484000); pub const TILE_PROPERTIES_QCOM: Self = Self(1000484001); pub const PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC: Self = Self(1000485000); @@ -6340,6 +6357,8 @@ impl StructureType { pub const PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM: Self = Self(1000510000); pub const MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM: Self = Self(1000510001); + pub const PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR: Self = Self(1000201000); + pub const PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR: Self = Self(1000511000); pub const VIDEO_DECODE_AV1_CAPABILITIES_KHR: Self = Self(1000512000); pub const VIDEO_DECODE_AV1_PICTURE_INFO_KHR: Self = Self(1000512001); pub const VIDEO_DECODE_AV1_PROFILE_INFO_KHR: Self = Self(1000512003); @@ -6932,7 +6951,6 @@ impl fmt::Debug for StructureType { 1000189000 => write!(f, "DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD"), 1000190000 => write!(f, "PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT"), 1000191000 => write!(f, "PRESENT_FRAME_TOKEN_GGP"), - 1000201000 => write!(f, "PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV"), 1000202000 => write!(f, "PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV"), 1000202001 => write!(f, "PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV"), 1000204000 => write!(f, "PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV"), @@ -7395,6 +7413,16 @@ impl fmt::Debug for StructureType { 1000482000 => write!(f, "PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT"), 1000482001 => write!(f, "PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT"), 1000482002 => write!(f, "SHADER_CREATE_INFO_EXT"), + 1000483000 => write!(f, "PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR"), + 1000483001 => write!(f, "PIPELINE_BINARY_CREATE_INFO_KHR"), + 1000483002 => write!(f, "PIPELINE_BINARY_INFO_KHR"), + 1000483003 => write!(f, "PIPELINE_BINARY_KEY_KHR"), + 1000483004 => write!(f, "PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR"), + 1000483005 => write!(f, "RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR"), + 1000483006 => write!(f, "PIPELINE_BINARY_DATA_INFO_KHR"), + 1000483007 => write!(f, "PIPELINE_CREATE_INFO_KHR"), + 1000483008 => write!(f, "DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR"), + 1000483009 => write!(f, "PIPELINE_BINARY_HANDLES_INFO_KHR"), 1000484000 => write!(f, "PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM"), 1000484001 => write!(f, "TILE_PROPERTIES_QCOM"), 1000485000 => write!(f, "PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC"), @@ -7461,6 +7489,11 @@ impl fmt::Debug for StructureType { f, "MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM" ), + 1000201000 => write!(f, "PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR"), + 1000511000 => write!( + f, + "PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR" + ), 1000512000 => write!(f, "VIDEO_DECODE_AV1_CAPABILITIES_KHR"), 1000512001 => write!(f, "VIDEO_DECODE_AV1_PICTURE_INFO_KHR"), 1000512003 => write!(f, "VIDEO_DECODE_AV1_PROFILE_INFO_KHR"), diff --git a/vulkanalia-sys/src/extensions.rs b/vulkanalia-sys/src/extensions.rs index 2644608..680bb20 100644 --- a/vulkanalia-sys/src/extensions.rs +++ b/vulkanalia-sys/src/extensions.rs @@ -3049,6 +3049,22 @@ pub const KHR_CALIBRATED_TIMESTAMPS_EXTENSION: Extension = Extension { promoted_to: None, }; +/// +#[allow(deprecated)] +pub const KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_KHR_compute_shader_derivatives"), + number: 512, + type_: "device", + author: "KHR", + contact: "Jean-Noe Morissette @MagicPoncho", + platform: None, + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + /// #[allow(deprecated)] pub const KHR_COOPERATIVE_MATRIX_EXTENSION: Extension = Extension { @@ -3881,6 +3897,22 @@ pub const KHR_PERFORMANCE_QUERY_EXTENSION: Extension = Extension { promoted_to: None, }; +/// +#[allow(deprecated)] +pub const KHR_PIPELINE_BINARY_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_KHR_pipeline_binary"), + number: 484, + type_: "device", + author: "KHR", + contact: "Stu Smith @stu-s", + platform: None, + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + /// #[allow(deprecated)] pub const KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION: Extension = Extension { @@ -5056,7 +5088,7 @@ pub const NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION: Extension = Extension { required_version: None, deprecated_by: None, obsoleted_by: None, - promoted_to: None, + promoted_to: Some("VK_KHR_compute_shader_derivatives"), }; /// diff --git a/vulkanalia-sys/src/handles.rs b/vulkanalia-sys/src/handles.rs index c696032..89e6037 100644 --- a/vulkanalia-sys/src/handles.rs +++ b/vulkanalia-sys/src/handles.rs @@ -1545,6 +1545,50 @@ impl fmt::Debug for Pipeline { } } +/// +#[repr(transparent)] +#[derive(Copy, Clone, PartialEq, Eq, Hash)] +pub struct PipelineBinaryKHR(u64); + +impl Handle for PipelineBinaryKHR { + type Repr = u64; + + const TYPE: ObjectType = ObjectType::PIPELINE_BINARY_KHR; + + #[inline] + fn null() -> Self { + Self(0) + } + + #[inline] + fn from_raw(value: Self::Repr) -> Self { + Self(value) + } + + #[inline] + fn as_raw(self) -> Self::Repr { + self.0 + } + + #[inline] + fn is_null(self) -> bool { + self.0 == 0 + } +} + +impl Default for PipelineBinaryKHR { + #[inline] + fn default() -> Self { + Self::null() + } +} + +impl fmt::Debug for PipelineBinaryKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "PipelineBinaryKHR({:p})", self.0 as *const u8) + } +} + /// #[repr(transparent)] #[derive(Copy, Clone, PartialEq, Eq, Hash)] diff --git a/vulkanalia-sys/src/structs.rs b/vulkanalia-sys/src/structs.rs index ff27ee7..9bd5e72 100644 --- a/vulkanalia-sys/src/structs.rs +++ b/vulkanalia-sys/src/structs.rs @@ -4478,6 +4478,26 @@ impl Default for DeviceMemoryReportCallbackDataEXT { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct DevicePipelineBinaryInternalCacheControlKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub disable_internal_cache: Bool32, +} + +impl Default for DevicePipelineBinaryInternalCacheControlKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR, + next: ptr::null(), + disable_internal_cache: Bool32::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -10089,21 +10109,21 @@ impl Default for PhysicalDeviceCommandBufferInheritanceFeaturesNV { } } -/// +/// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] -pub struct PhysicalDeviceComputeShaderDerivativesFeaturesNV { +pub struct PhysicalDeviceComputeShaderDerivativesFeaturesKHR { pub s_type: StructureType, pub next: *mut c_void, pub compute_derivative_group_quads: Bool32, pub compute_derivative_group_linear: Bool32, } -impl Default for PhysicalDeviceComputeShaderDerivativesFeaturesNV { +impl Default for PhysicalDeviceComputeShaderDerivativesFeaturesKHR { #[inline] fn default() -> Self { Self { - s_type: StructureType::PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV, + s_type: StructureType::PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR, next: ptr::null_mut(), compute_derivative_group_quads: Bool32::default(), compute_derivative_group_linear: Bool32::default(), @@ -10111,6 +10131,26 @@ impl Default for PhysicalDeviceComputeShaderDerivativesFeaturesNV { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PhysicalDeviceComputeShaderDerivativesPropertiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub mesh_and_task_shader_derivatives: Bool32, +} + +impl Default for PhysicalDeviceComputeShaderDerivativesPropertiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR, + next: ptr::null_mut(), + mesh_and_task_shader_derivatives: Bool32::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -14136,6 +14176,54 @@ impl Default for PhysicalDevicePerformanceQueryPropertiesKHR { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PhysicalDevicePipelineBinaryFeaturesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub pipeline_binaries: Bool32, +} + +impl Default for PhysicalDevicePipelineBinaryFeaturesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR, + next: ptr::null_mut(), + pipeline_binaries: Bool32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PhysicalDevicePipelineBinaryPropertiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub pipeline_binary_internal_cache: Bool32, + pub pipeline_binary_internal_cache_control: Bool32, + pub pipeline_binary_prefers_internal_cache: Bool32, + pub pipeline_binary_precompiled_internal_cache: Bool32, + pub pipeline_binary_compressed_data: Bool32, +} + +impl Default for PhysicalDevicePipelineBinaryPropertiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR, + next: ptr::null_mut(), + pipeline_binary_internal_cache: Bool32::default(), + pipeline_binary_internal_cache_control: Bool32::default(), + pipeline_binary_prefers_internal_cache: Bool32::default(), + pipeline_binary_precompiled_internal_cache: Bool32::default(), + pipeline_binary_compressed_data: Bool32::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -17381,6 +17469,154 @@ impl Default for PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PipelineBinaryCreateInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub keys_and_data_info: *const PipelineBinaryKeysAndDataKHR, + pub pipeline: Pipeline, + pub pipeline_create_info: *const PipelineCreateInfoKHR, +} + +impl Default for PipelineBinaryCreateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PIPELINE_BINARY_CREATE_INFO_KHR, + next: ptr::null(), + keys_and_data_info: ptr::null(), + pipeline: Pipeline::default(), + pipeline_create_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PipelineBinaryDataInfoKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub pipeline_binary: PipelineBinaryKHR, +} + +impl Default for PipelineBinaryDataInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PIPELINE_BINARY_DATA_INFO_KHR, + next: ptr::null_mut(), + pipeline_binary: PipelineBinaryKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PipelineBinaryDataKHR { + pub data_size: usize, + pub data: *mut c_void, +} + +impl Default for PipelineBinaryDataKHR { + #[inline] + fn default() -> Self { + Self { + data_size: usize::default(), + data: ptr::null_mut(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PipelineBinaryHandlesInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub pipeline_binary_count: u32, + pub pipeline_binaries: *mut PipelineBinaryKHR, +} + +impl Default for PipelineBinaryHandlesInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PIPELINE_BINARY_HANDLES_INFO_KHR, + next: ptr::null(), + pipeline_binary_count: u32::default(), + pipeline_binaries: ptr::null_mut(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PipelineBinaryInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub binary_count: u32, + pub pipeline_binaries: *const PipelineBinaryKHR, +} + +impl Default for PipelineBinaryInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PIPELINE_BINARY_INFO_KHR, + next: ptr::null(), + binary_count: u32::default(), + pipeline_binaries: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PipelineBinaryKeyKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub key_size: u32, + pub key: ByteArray, +} + +impl Default for PipelineBinaryKeyKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PIPELINE_BINARY_KEY_KHR, + next: ptr::null_mut(), + key_size: u32::default(), + key: ByteArray::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PipelineBinaryKeysAndDataKHR { + pub binary_count: u32, + pub pipeline_binary_keys: *const PipelineBinaryKeyKHR, + pub pipeline_binary_data: *const PipelineBinaryDataKHR, +} + +impl Default for PipelineBinaryKeysAndDataKHR { + #[inline] + fn default() -> Self { + Self { + binary_count: u32::default(), + pipeline_binary_keys: ptr::null(), + pipeline_binary_data: ptr::null(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -17620,6 +17856,24 @@ impl Default for PipelineCreateFlags2CreateInfoKHR { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PipelineCreateInfoKHR { + pub s_type: StructureType, + pub next: *mut c_void, +} + +impl Default for PipelineCreateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PIPELINE_CREATE_INFO_KHR, + next: ptr::null_mut(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Default, Debug, Eq, Hash, PartialEq)] @@ -19404,6 +19658,26 @@ impl Default for RefreshObjectListKHR { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct ReleaseCapturedPipelineDataInfoKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub pipeline: Pipeline, +} + +impl Default for ReleaseCapturedPipelineDataInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR, + next: ptr::null_mut(), + pipeline: Pipeline::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -24626,6 +24900,9 @@ pub type PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeature pub type PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT; /// pub type PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures; +/// +pub type PhysicalDeviceComputeShaderDerivativesFeaturesNV = + PhysicalDeviceComputeShaderDerivativesFeaturesKHR; /// pub type PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties; diff --git a/vulkanalia/src/vk/builders.rs b/vulkanalia/src/vk/builders.rs index e8a9046..7cfdd46 100644 --- a/vulkanalia/src/vk/builders.rs +++ b/vulkanalia/src/vk/builders.rs @@ -8332,6 +8332,7 @@ unsafe impl Cast for ComponentMappingBuilder { /// A Vulkan struct that can be used to extend a [`ComputePipelineCreateInfo`]. pub unsafe trait ExtendsComputePipelineCreateInfo: fmt::Debug {} unsafe impl ExtendsComputePipelineCreateInfo for ComputePipelineIndirectBufferInfoNV {} +unsafe impl ExtendsComputePipelineCreateInfo for PipelineBinaryInfoKHR {} unsafe impl ExtendsComputePipelineCreateInfo for PipelineCompilerControlCreateInfoAMD {} unsafe impl ExtendsComputePipelineCreateInfo for PipelineCreateFlags2CreateInfoKHR {} unsafe impl ExtendsComputePipelineCreateInfo for PipelineCreationFeedbackCreateInfo {} @@ -13493,6 +13494,7 @@ unsafe impl ExtendsDeviceCreateInfo for DeviceDeviceMemoryReportCreateInfoEXT {} unsafe impl ExtendsDeviceCreateInfo for DeviceDiagnosticsConfigCreateInfoNV {} unsafe impl ExtendsDeviceCreateInfo for DeviceGroupDeviceCreateInfo {} unsafe impl ExtendsDeviceCreateInfo for DeviceMemoryOverallocationCreateInfoAMD {} +unsafe impl ExtendsDeviceCreateInfo for DevicePipelineBinaryInternalCacheControlKHR {} unsafe impl ExtendsDeviceCreateInfo for DevicePrivateDataCreateInfo {} unsafe impl ExtendsDeviceCreateInfo for DeviceQueueShaderCoreControlCreateInfoARM {} unsafe impl ExtendsDeviceCreateInfo for DeviceSemaphoreSciSyncPoolReservationCreateInfoNV {} @@ -13518,7 +13520,7 @@ unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceClusterCullingShaderFeatur unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceCoherentMemoryFeaturesAMD {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceColorWriteEnableFeaturesEXT {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceCommandBufferInheritanceFeaturesNV {} -unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceComputeShaderDerivativesFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceComputeShaderDerivativesFeaturesKHR {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceConditionalRenderingFeaturesEXT {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceCooperativeMatrixFeaturesKHR {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceCooperativeMatrixFeaturesNV {} @@ -13611,6 +13613,7 @@ unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceOpticalFlowFeaturesNV {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDevicePerStageDescriptorSetFeaturesNV {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDevicePerformanceQueryFeaturesKHR {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDevicePipelineBinaryFeaturesKHR {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDevicePipelineCreationCacheControlFeatures {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDevicePipelineExecutablePropertiesFeaturesKHR {} unsafe impl ExtendsDeviceCreateInfo for PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT {} @@ -15278,6 +15281,64 @@ unsafe impl Cast for DeviceMemoryReportCallbackDataEXTBuilder { } } +unsafe impl Cast for DevicePipelineBinaryInternalCacheControlKHR { + type Target = DevicePipelineBinaryInternalCacheControlKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for DevicePipelineBinaryInternalCacheControlKHR { + type Builder = DevicePipelineBinaryInternalCacheControlKHRBuilder; +} + +/// A builder for a [`DevicePipelineBinaryInternalCacheControlKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct DevicePipelineBinaryInternalCacheControlKHRBuilder { + value: DevicePipelineBinaryInternalCacheControlKHR, +} + +impl DevicePipelineBinaryInternalCacheControlKHRBuilder { + #[inline] + pub fn disable_internal_cache(mut self, disable_internal_cache: bool) -> Self { + self.value.disable_internal_cache = disable_internal_cache as Bool32; + self + } + + #[inline] + pub fn build(self) -> DevicePipelineBinaryInternalCacheControlKHR { + self.value + } +} + +impl ops::Deref for DevicePipelineBinaryInternalCacheControlKHRBuilder { + type Target = DevicePipelineBinaryInternalCacheControlKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for DevicePipelineBinaryInternalCacheControlKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for DevicePipelineBinaryInternalCacheControlKHRBuilder { + type Target = DevicePipelineBinaryInternalCacheControlKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for DevicePrivateDataCreateInfo { type Target = DevicePrivateDataCreateInfo; @@ -21920,6 +21981,7 @@ unsafe impl ExtendsGraphicsPipelineCreateInfo for ExternalFormatANDROID {} unsafe impl ExtendsGraphicsPipelineCreateInfo for GraphicsPipelineLibraryCreateInfoEXT {} unsafe impl ExtendsGraphicsPipelineCreateInfo for GraphicsPipelineShaderGroupsCreateInfoNV {} unsafe impl ExtendsGraphicsPipelineCreateInfo for MultiviewPerViewAttributesInfoNVX {} +unsafe impl ExtendsGraphicsPipelineCreateInfo for PipelineBinaryInfoKHR {} unsafe impl ExtendsGraphicsPipelineCreateInfo for PipelineCompilerControlCreateInfoAMD {} unsafe impl ExtendsGraphicsPipelineCreateInfo for PipelineCreateFlags2CreateInfoKHR {} unsafe impl ExtendsGraphicsPipelineCreateInfo for PipelineCreationFeedbackCreateInfo {} @@ -34177,8 +34239,8 @@ unsafe impl Cast for PhysicalDeviceCommandBufferInheritanceFeaturesNVBuilder { } } -unsafe impl Cast for PhysicalDeviceComputeShaderDerivativesFeaturesNV { - type Target = PhysicalDeviceComputeShaderDerivativesFeaturesNV; +unsafe impl Cast for PhysicalDeviceComputeShaderDerivativesFeaturesKHR { + type Target = PhysicalDeviceComputeShaderDerivativesFeaturesKHR; #[inline] fn into(self) -> Self::Target { @@ -34186,18 +34248,18 @@ unsafe impl Cast for PhysicalDeviceComputeShaderDerivativesFeaturesNV { } } -impl HasBuilder<'static> for PhysicalDeviceComputeShaderDerivativesFeaturesNV { - type Builder = PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder; +impl HasBuilder<'static> for PhysicalDeviceComputeShaderDerivativesFeaturesKHR { + type Builder = PhysicalDeviceComputeShaderDerivativesFeaturesKHRBuilder; } -/// A builder for a [`PhysicalDeviceComputeShaderDerivativesFeaturesNV`]. +/// A builder for a [`PhysicalDeviceComputeShaderDerivativesFeaturesKHR`]. #[repr(transparent)] #[derive(Copy, Clone, Debug, Default)] -pub struct PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder { - value: PhysicalDeviceComputeShaderDerivativesFeaturesNV, +pub struct PhysicalDeviceComputeShaderDerivativesFeaturesKHRBuilder { + value: PhysicalDeviceComputeShaderDerivativesFeaturesKHR, } -impl PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder { +impl PhysicalDeviceComputeShaderDerivativesFeaturesKHRBuilder { #[inline] pub fn compute_derivative_group_quads(mut self, compute_derivative_group_quads: bool) -> Self { self.value.compute_derivative_group_quads = compute_derivative_group_quads as Bool32; @@ -34214,13 +34276,13 @@ impl PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder { } #[inline] - pub fn build(self) -> PhysicalDeviceComputeShaderDerivativesFeaturesNV { + pub fn build(self) -> PhysicalDeviceComputeShaderDerivativesFeaturesKHR { self.value } } -impl ops::Deref for PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder { - type Target = PhysicalDeviceComputeShaderDerivativesFeaturesNV; +impl ops::Deref for PhysicalDeviceComputeShaderDerivativesFeaturesKHRBuilder { + type Target = PhysicalDeviceComputeShaderDerivativesFeaturesKHR; #[inline] fn deref(&self) -> &Self::Target { @@ -34228,15 +34290,76 @@ impl ops::Deref for PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder { } } -impl ops::DerefMut for PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder { +impl ops::DerefMut for PhysicalDeviceComputeShaderDerivativesFeaturesKHRBuilder { #[inline] fn deref_mut(&mut self) -> &mut Self::Target { &mut self.value } } -unsafe impl Cast for PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder { - type Target = PhysicalDeviceComputeShaderDerivativesFeaturesNV; +unsafe impl Cast for PhysicalDeviceComputeShaderDerivativesFeaturesKHRBuilder { + type Target = PhysicalDeviceComputeShaderDerivativesFeaturesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for PhysicalDeviceComputeShaderDerivativesPropertiesKHR { + type Target = PhysicalDeviceComputeShaderDerivativesPropertiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for PhysicalDeviceComputeShaderDerivativesPropertiesKHR { + type Builder = PhysicalDeviceComputeShaderDerivativesPropertiesKHRBuilder; +} + +/// A builder for a [`PhysicalDeviceComputeShaderDerivativesPropertiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PhysicalDeviceComputeShaderDerivativesPropertiesKHRBuilder { + value: PhysicalDeviceComputeShaderDerivativesPropertiesKHR, +} + +impl PhysicalDeviceComputeShaderDerivativesPropertiesKHRBuilder { + #[inline] + pub fn mesh_and_task_shader_derivatives( + mut self, + mesh_and_task_shader_derivatives: bool, + ) -> Self { + self.value.mesh_and_task_shader_derivatives = mesh_and_task_shader_derivatives as Bool32; + self + } + + #[inline] + pub fn build(self) -> PhysicalDeviceComputeShaderDerivativesPropertiesKHR { + self.value + } +} + +impl ops::Deref for PhysicalDeviceComputeShaderDerivativesPropertiesKHRBuilder { + type Target = PhysicalDeviceComputeShaderDerivativesPropertiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for PhysicalDeviceComputeShaderDerivativesPropertiesKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for PhysicalDeviceComputeShaderDerivativesPropertiesKHRBuilder { + type Target = PhysicalDeviceComputeShaderDerivativesPropertiesKHR; #[inline] fn into(self) -> Self::Target { @@ -39845,7 +39968,7 @@ unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceClusterCullingShade unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceCoherentMemoryFeaturesAMD {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceColorWriteEnableFeaturesEXT {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceCommandBufferInheritanceFeaturesNV {} -unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceComputeShaderDerivativesFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceComputeShaderDerivativesFeaturesKHR {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceConditionalRenderingFeaturesEXT {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceCooperativeMatrixFeaturesKHR {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceCooperativeMatrixFeaturesNV {} @@ -39958,6 +40081,7 @@ unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceOpticalFlowFeatures unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDevicePerStageDescriptorSetFeaturesNV {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDevicePerformanceQueryFeaturesKHR {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDevicePipelineBinaryFeaturesKHR {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDevicePipelineCreationCacheControlFeatures {} unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDevicePipelineExecutablePropertiesFeaturesKHR @@ -48094,6 +48218,161 @@ unsafe impl Cast for PhysicalDevicePerformanceQueryPropertiesKHRBuilder { } } +unsafe impl Cast for PhysicalDevicePipelineBinaryFeaturesKHR { + type Target = PhysicalDevicePipelineBinaryFeaturesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for PhysicalDevicePipelineBinaryFeaturesKHR { + type Builder = PhysicalDevicePipelineBinaryFeaturesKHRBuilder; +} + +/// A builder for a [`PhysicalDevicePipelineBinaryFeaturesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PhysicalDevicePipelineBinaryFeaturesKHRBuilder { + value: PhysicalDevicePipelineBinaryFeaturesKHR, +} + +impl PhysicalDevicePipelineBinaryFeaturesKHRBuilder { + #[inline] + pub fn pipeline_binaries(mut self, pipeline_binaries: bool) -> Self { + self.value.pipeline_binaries = pipeline_binaries as Bool32; + self + } + + #[inline] + pub fn build(self) -> PhysicalDevicePipelineBinaryFeaturesKHR { + self.value + } +} + +impl ops::Deref for PhysicalDevicePipelineBinaryFeaturesKHRBuilder { + type Target = PhysicalDevicePipelineBinaryFeaturesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for PhysicalDevicePipelineBinaryFeaturesKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for PhysicalDevicePipelineBinaryFeaturesKHRBuilder { + type Target = PhysicalDevicePipelineBinaryFeaturesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for PhysicalDevicePipelineBinaryPropertiesKHR { + type Target = PhysicalDevicePipelineBinaryPropertiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for PhysicalDevicePipelineBinaryPropertiesKHR { + type Builder = PhysicalDevicePipelineBinaryPropertiesKHRBuilder; +} + +/// A builder for a [`PhysicalDevicePipelineBinaryPropertiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PhysicalDevicePipelineBinaryPropertiesKHRBuilder { + value: PhysicalDevicePipelineBinaryPropertiesKHR, +} + +impl PhysicalDevicePipelineBinaryPropertiesKHRBuilder { + #[inline] + pub fn pipeline_binary_internal_cache(mut self, pipeline_binary_internal_cache: bool) -> Self { + self.value.pipeline_binary_internal_cache = pipeline_binary_internal_cache as Bool32; + self + } + + #[inline] + pub fn pipeline_binary_internal_cache_control( + mut self, + pipeline_binary_internal_cache_control: bool, + ) -> Self { + self.value.pipeline_binary_internal_cache_control = + pipeline_binary_internal_cache_control as Bool32; + self + } + + #[inline] + pub fn pipeline_binary_prefers_internal_cache( + mut self, + pipeline_binary_prefers_internal_cache: bool, + ) -> Self { + self.value.pipeline_binary_prefers_internal_cache = + pipeline_binary_prefers_internal_cache as Bool32; + self + } + + #[inline] + pub fn pipeline_binary_precompiled_internal_cache( + mut self, + pipeline_binary_precompiled_internal_cache: bool, + ) -> Self { + self.value.pipeline_binary_precompiled_internal_cache = + pipeline_binary_precompiled_internal_cache as Bool32; + self + } + + #[inline] + pub fn pipeline_binary_compressed_data( + mut self, + pipeline_binary_compressed_data: bool, + ) -> Self { + self.value.pipeline_binary_compressed_data = pipeline_binary_compressed_data as Bool32; + self + } + + #[inline] + pub fn build(self) -> PhysicalDevicePipelineBinaryPropertiesKHR { + self.value + } +} + +impl ops::Deref for PhysicalDevicePipelineBinaryPropertiesKHRBuilder { + type Target = PhysicalDevicePipelineBinaryPropertiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for PhysicalDevicePipelineBinaryPropertiesKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for PhysicalDevicePipelineBinaryPropertiesKHRBuilder { + type Target = PhysicalDevicePipelineBinaryPropertiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for PhysicalDevicePipelineCreationCacheControlFeatures { type Target = PhysicalDevicePipelineCreationCacheControlFeatures; @@ -49319,6 +49598,10 @@ unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceClusterCullingShaderPropertiesHUAWEI { } +unsafe impl ExtendsPhysicalDeviceProperties2 + for PhysicalDeviceComputeShaderDerivativesPropertiesKHR +{ +} unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceConservativeRasterizationPropertiesEXT { @@ -49400,6 +49683,7 @@ unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceOpacityMicromapPr unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceOpticalFlowPropertiesNV {} unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePCIBusInfoPropertiesEXT {} unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePerformanceQueryPropertiesKHR {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePipelineBinaryPropertiesKHR {} unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePipelineRobustnessPropertiesEXT {} unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePointClippingProperties {} unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePortabilitySubsetPropertiesKHR {} @@ -59137,6 +59421,464 @@ unsafe impl Cast for PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesBuilder } } +unsafe impl Cast for PipelineBinaryCreateInfoKHR { + type Target = PipelineBinaryCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for PipelineBinaryCreateInfoKHR { + type Builder = PipelineBinaryCreateInfoKHRBuilder<'b>; +} + +/// A builder for a [`PipelineBinaryCreateInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PipelineBinaryCreateInfoKHRBuilder<'b> { + value: PipelineBinaryCreateInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> PipelineBinaryCreateInfoKHRBuilder<'b> { + #[inline] + pub fn keys_and_data_info( + mut self, + keys_and_data_info: &'b impl Cast, + ) -> Self { + self.value.keys_and_data_info = keys_and_data_info.as_ref(); + self + } + + #[inline] + pub fn pipeline(mut self, pipeline: Pipeline) -> Self { + self.value.pipeline = pipeline; + self + } + + #[inline] + pub fn pipeline_create_info( + mut self, + pipeline_create_info: &'b impl Cast, + ) -> Self { + self.value.pipeline_create_info = pipeline_create_info.as_ref(); + self + } + + #[inline] + pub fn build(self) -> PipelineBinaryCreateInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for PipelineBinaryCreateInfoKHRBuilder<'b> { + type Target = PipelineBinaryCreateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for PipelineBinaryCreateInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for PipelineBinaryCreateInfoKHRBuilder<'b> { + type Target = PipelineBinaryCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for PipelineBinaryDataInfoKHR { + type Target = PipelineBinaryDataInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for PipelineBinaryDataInfoKHR { + type Builder = PipelineBinaryDataInfoKHRBuilder; +} + +/// A builder for a [`PipelineBinaryDataInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PipelineBinaryDataInfoKHRBuilder { + value: PipelineBinaryDataInfoKHR, +} + +impl PipelineBinaryDataInfoKHRBuilder { + #[inline] + pub fn pipeline_binary(mut self, pipeline_binary: PipelineBinaryKHR) -> Self { + self.value.pipeline_binary = pipeline_binary; + self + } + + #[inline] + pub fn build(self) -> PipelineBinaryDataInfoKHR { + self.value + } +} + +impl ops::Deref for PipelineBinaryDataInfoKHRBuilder { + type Target = PipelineBinaryDataInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for PipelineBinaryDataInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for PipelineBinaryDataInfoKHRBuilder { + type Target = PipelineBinaryDataInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for PipelineBinaryDataKHR { + type Target = PipelineBinaryDataKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for PipelineBinaryDataKHR { + type Builder = PipelineBinaryDataKHRBuilder<'b>; +} + +/// A builder for a [`PipelineBinaryDataKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PipelineBinaryDataKHRBuilder<'b> { + value: PipelineBinaryDataKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> PipelineBinaryDataKHRBuilder<'b> { + #[inline] + pub fn data(mut self, data: &'b mut [u8]) -> Self { + self.value.data_size = data.len() as usize; + self.value.data = data.as_mut_ptr().cast(); + self + } + + #[inline] + pub fn build(self) -> PipelineBinaryDataKHR { + self.value + } +} + +impl<'b> ops::Deref for PipelineBinaryDataKHRBuilder<'b> { + type Target = PipelineBinaryDataKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for PipelineBinaryDataKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for PipelineBinaryDataKHRBuilder<'b> { + type Target = PipelineBinaryDataKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for PipelineBinaryHandlesInfoKHR { + type Target = PipelineBinaryHandlesInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for PipelineBinaryHandlesInfoKHR { + type Builder = PipelineBinaryHandlesInfoKHRBuilder<'b>; +} + +/// A builder for a [`PipelineBinaryHandlesInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PipelineBinaryHandlesInfoKHRBuilder<'b> { + value: PipelineBinaryHandlesInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> PipelineBinaryHandlesInfoKHRBuilder<'b> { + #[inline] + pub fn pipeline_binary_count(mut self, pipeline_binary_count: u32) -> Self { + self.value.pipeline_binary_count = pipeline_binary_count; + self + } + + #[inline] + pub fn pipeline_binaries(mut self, pipeline_binaries: &'b mut [PipelineBinaryKHR]) -> Self { + self.value.pipeline_binary_count = pipeline_binaries.len() as u32; + self.value.pipeline_binaries = pipeline_binaries.as_mut_ptr(); + self + } + + #[inline] + pub fn build(self) -> PipelineBinaryHandlesInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for PipelineBinaryHandlesInfoKHRBuilder<'b> { + type Target = PipelineBinaryHandlesInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for PipelineBinaryHandlesInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for PipelineBinaryHandlesInfoKHRBuilder<'b> { + type Target = PipelineBinaryHandlesInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for PipelineBinaryInfoKHR { + type Target = PipelineBinaryInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for PipelineBinaryInfoKHR { + type Builder = PipelineBinaryInfoKHRBuilder<'b>; +} + +/// A builder for a [`PipelineBinaryInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PipelineBinaryInfoKHRBuilder<'b> { + value: PipelineBinaryInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> PipelineBinaryInfoKHRBuilder<'b> { + #[inline] + pub fn pipeline_binaries(mut self, pipeline_binaries: &'b [PipelineBinaryKHR]) -> Self { + self.value.binary_count = pipeline_binaries.len() as u32; + self.value.pipeline_binaries = pipeline_binaries.as_ptr(); + self + } + + #[inline] + pub fn build(self) -> PipelineBinaryInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for PipelineBinaryInfoKHRBuilder<'b> { + type Target = PipelineBinaryInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for PipelineBinaryInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for PipelineBinaryInfoKHRBuilder<'b> { + type Target = PipelineBinaryInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for PipelineBinaryKeyKHR { + type Target = PipelineBinaryKeyKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for PipelineBinaryKeyKHR { + type Builder = PipelineBinaryKeyKHRBuilder; +} + +/// A builder for a [`PipelineBinaryKeyKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PipelineBinaryKeyKHRBuilder { + value: PipelineBinaryKeyKHR, +} + +impl PipelineBinaryKeyKHRBuilder { + #[inline] + pub fn key_size(mut self, key_size: u32) -> Self { + self.value.key_size = key_size; + self + } + + #[inline] + pub fn key(mut self, key: impl Into>) -> Self { + self.value.key = key.into(); + self + } + + #[inline] + pub fn build(self) -> PipelineBinaryKeyKHR { + self.value + } +} + +impl ops::Deref for PipelineBinaryKeyKHRBuilder { + type Target = PipelineBinaryKeyKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for PipelineBinaryKeyKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for PipelineBinaryKeyKHRBuilder { + type Target = PipelineBinaryKeyKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for PipelineBinaryKeysAndDataKHR { + type Target = PipelineBinaryKeysAndDataKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for PipelineBinaryKeysAndDataKHR { + type Builder = PipelineBinaryKeysAndDataKHRBuilder<'b>; +} + +/// A builder for a [`PipelineBinaryKeysAndDataKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PipelineBinaryKeysAndDataKHRBuilder<'b> { + value: PipelineBinaryKeysAndDataKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> PipelineBinaryKeysAndDataKHRBuilder<'b> { + #[inline] + pub fn pipeline_binary_keys( + mut self, + pipeline_binary_keys: &'b [impl Cast], + ) -> Self { + self.value.binary_count = pipeline_binary_keys.len() as u32; + self.value.pipeline_binary_keys = pipeline_binary_keys.as_ptr().cast(); + self + } + + #[inline] + pub fn pipeline_binary_data( + mut self, + pipeline_binary_data: &'b [impl Cast], + ) -> Self { + self.value.binary_count = pipeline_binary_data.len() as u32; + self.value.pipeline_binary_data = pipeline_binary_data.as_ptr().cast(); + self + } + + #[inline] + pub fn build(self) -> PipelineBinaryKeysAndDataKHR { + self.value + } +} + +impl<'b> ops::Deref for PipelineBinaryKeysAndDataKHRBuilder<'b> { + type Target = PipelineBinaryKeysAndDataKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for PipelineBinaryKeysAndDataKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for PipelineBinaryKeysAndDataKHRBuilder<'b> { + type Target = PipelineBinaryKeysAndDataKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for PipelineCacheCreateInfo { type Target = PipelineCacheCreateInfo; @@ -59974,6 +60716,58 @@ unsafe impl Cast for PipelineCreateFlags2CreateInfoKHRBuilder { } } +unsafe impl Cast for PipelineCreateInfoKHR { + type Target = PipelineCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for PipelineCreateInfoKHR { + type Builder = PipelineCreateInfoKHRBuilder; +} + +/// A builder for a [`PipelineCreateInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PipelineCreateInfoKHRBuilder { + value: PipelineCreateInfoKHR, +} + +impl PipelineCreateInfoKHRBuilder { + #[inline] + pub fn build(self) -> PipelineCreateInfoKHR { + self.value + } +} + +impl ops::Deref for PipelineCreateInfoKHRBuilder { + type Target = PipelineCreateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for PipelineCreateInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for PipelineCreateInfoKHRBuilder { + type Target = PipelineCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for PipelineCreationFeedback { type Target = PipelineCreationFeedback; @@ -65041,6 +65835,7 @@ unsafe impl Cast for QueueFamilyVideoPropertiesKHRBuilder { /// A Vulkan struct that can be used to extend a [`RayTracingPipelineCreateInfoKHR`]. pub unsafe trait ExtendsRayTracingPipelineCreateInfoKHR: fmt::Debug {} +unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineBinaryInfoKHR {} unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineCreateFlags2CreateInfoKHR {} unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineCreationFeedbackCreateInfo {} unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineRobustnessCreateInfoEXT {} @@ -65868,6 +66663,64 @@ unsafe impl<'b> Cast for RefreshObjectListKHRBuilder<'b> { } } +unsafe impl Cast for ReleaseCapturedPipelineDataInfoKHR { + type Target = ReleaseCapturedPipelineDataInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for ReleaseCapturedPipelineDataInfoKHR { + type Builder = ReleaseCapturedPipelineDataInfoKHRBuilder; +} + +/// A builder for a [`ReleaseCapturedPipelineDataInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct ReleaseCapturedPipelineDataInfoKHRBuilder { + value: ReleaseCapturedPipelineDataInfoKHR, +} + +impl ReleaseCapturedPipelineDataInfoKHRBuilder { + #[inline] + pub fn pipeline(mut self, pipeline: Pipeline) -> Self { + self.value.pipeline = pipeline; + self + } + + #[inline] + pub fn build(self) -> ReleaseCapturedPipelineDataInfoKHR { + self.value + } +} + +impl ops::Deref for ReleaseCapturedPipelineDataInfoKHRBuilder { + type Target = ReleaseCapturedPipelineDataInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for ReleaseCapturedPipelineDataInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for ReleaseCapturedPipelineDataInfoKHRBuilder { + type Target = ReleaseCapturedPipelineDataInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for ReleaseSwapchainImagesInfoEXT { type Target = ReleaseSwapchainImagesInfoEXT; diff --git a/vulkanalia/src/vk/chains.rs b/vulkanalia/src/vk/chains.rs index 3a7c97b..1b8a690 100644 --- a/vulkanalia/src/vk/chains.rs +++ b/vulkanalia/src/vk/chains.rs @@ -2424,6 +2424,20 @@ unsafe impl OutputChainStruct for DeviceMemoryReportCallbackDataEXT { } } +unsafe impl InputChainStruct for DevicePipelineBinaryInternalCacheControlKHR { + const TYPE: StructureType = StructureType::DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + unsafe impl InputChainStruct for DevicePrivateDataCreateInfo { const TYPE: StructureType = StructureType::DEVICE_PRIVATE_DATA_CREATE_INFO; @@ -5921,9 +5935,31 @@ unsafe impl OutputChainStruct for PhysicalDeviceCommandBufferInheritanceFeatures } } -unsafe impl InputChainStruct for PhysicalDeviceComputeShaderDerivativesFeaturesNV { +unsafe impl InputChainStruct for PhysicalDeviceComputeShaderDerivativesFeaturesKHR { + const TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for PhysicalDeviceComputeShaderDerivativesFeaturesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for PhysicalDeviceComputeShaderDerivativesPropertiesKHR { const TYPE: StructureType = - StructureType::PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV; + StructureType::PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR; #[inline] fn s_type(&self) -> StructureType { @@ -5936,7 +5972,7 @@ unsafe impl InputChainStruct for PhysicalDeviceComputeShaderDerivativesFeaturesN } } -unsafe impl OutputChainStruct for PhysicalDeviceComputeShaderDerivativesFeaturesNV { +unsafe impl OutputChainStruct for PhysicalDeviceComputeShaderDerivativesPropertiesKHR { #[inline] fn next_mut(&self) -> *mut c_void { self.next @@ -9280,6 +9316,48 @@ unsafe impl OutputChainStruct for PhysicalDevicePerformanceQueryPropertiesKHR { } } +unsafe impl InputChainStruct for PhysicalDevicePipelineBinaryFeaturesKHR { + const TYPE: StructureType = StructureType::PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for PhysicalDevicePipelineBinaryFeaturesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for PhysicalDevicePipelineBinaryPropertiesKHR { + const TYPE: StructureType = StructureType::PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for PhysicalDevicePipelineBinaryPropertiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + unsafe impl InputChainStruct for PhysicalDevicePipelineCreationCacheControlFeatures { const TYPE: StructureType = StructureType::PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES; @@ -11997,6 +12075,90 @@ unsafe impl OutputChainStruct for PhysicalDeviceZeroInitializeWorkgroupMemoryFea } } +unsafe impl InputChainStruct for PipelineBinaryCreateInfoKHR { + const TYPE: StructureType = StructureType::PIPELINE_BINARY_CREATE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for PipelineBinaryDataInfoKHR { + const TYPE: StructureType = StructureType::PIPELINE_BINARY_DATA_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for PipelineBinaryDataInfoKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for PipelineBinaryHandlesInfoKHR { + const TYPE: StructureType = StructureType::PIPELINE_BINARY_HANDLES_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for PipelineBinaryInfoKHR { + const TYPE: StructureType = StructureType::PIPELINE_BINARY_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for PipelineBinaryKeyKHR { + const TYPE: StructureType = StructureType::PIPELINE_BINARY_KEY_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for PipelineBinaryKeyKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + unsafe impl InputChainStruct for PipelineCacheCreateInfo { const TYPE: StructureType = StructureType::PIPELINE_CACHE_CREATE_INFO; @@ -12123,6 +12285,27 @@ unsafe impl InputChainStruct for PipelineCreateFlags2CreateInfoKHR { } } +unsafe impl InputChainStruct for PipelineCreateInfoKHR { + const TYPE: StructureType = StructureType::PIPELINE_CREATE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for PipelineCreateInfoKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + unsafe impl InputChainStruct for PipelineCreationFeedbackCreateInfo { const TYPE: StructureType = StructureType::PIPELINE_CREATION_FEEDBACK_CREATE_INFO; @@ -13191,6 +13374,27 @@ unsafe impl InputChainStruct for RefreshObjectListKHR { } } +unsafe impl InputChainStruct for ReleaseCapturedPipelineDataInfoKHR { + const TYPE: StructureType = StructureType::RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for ReleaseCapturedPipelineDataInfoKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + unsafe impl InputChainStruct for ReleaseSwapchainImagesInfoEXT { const TYPE: StructureType = StructureType::RELEASE_SWAPCHAIN_IMAGES_INFO_EXT; diff --git a/vulkanalia/src/vk/commands.rs b/vulkanalia/src/vk/commands.rs index 84e9b98..04f84e8 100644 --- a/vulkanalia/src/vk/commands.rs +++ b/vulkanalia/src/vk/commands.rs @@ -346,6 +346,7 @@ pub struct DeviceCommands { pub create_indirect_commands_layout_nv: PFN_vkCreateIndirectCommandsLayoutNV, pub create_micromap_ext: PFN_vkCreateMicromapEXT, pub create_optical_flow_session_nv: PFN_vkCreateOpticalFlowSessionNV, + pub create_pipeline_binaries_khr: PFN_vkCreatePipelineBinariesKHR, pub create_pipeline_cache: PFN_vkCreatePipelineCache, pub create_pipeline_layout: PFN_vkCreatePipelineLayout, pub create_private_data_slot: PFN_vkCreatePrivateDataSlot, @@ -396,6 +397,7 @@ pub struct DeviceCommands { pub destroy_micromap_ext: PFN_vkDestroyMicromapEXT, pub destroy_optical_flow_session_nv: PFN_vkDestroyOpticalFlowSessionNV, pub destroy_pipeline: PFN_vkDestroyPipeline, + pub destroy_pipeline_binary_khr: PFN_vkDestroyPipelineBinaryKHR, pub destroy_pipeline_cache: PFN_vkDestroyPipelineCache, pub destroy_pipeline_layout: PFN_vkDestroyPipelineLayout, pub destroy_private_data_slot: PFN_vkDestroyPrivateDataSlot, @@ -558,6 +560,7 @@ pub struct DeviceCommands { PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR, pub get_physical_device_video_format_properties_khr: PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR, + pub get_pipeline_binary_data_khr: PFN_vkGetPipelineBinaryDataKHR, pub get_pipeline_cache_data: PFN_vkGetPipelineCacheData, pub get_pipeline_executable_internal_representations_khr: PFN_vkGetPipelineExecutableInternalRepresentationsKHR, @@ -565,6 +568,7 @@ pub struct DeviceCommands { pub get_pipeline_executable_statistics_khr: PFN_vkGetPipelineExecutableStatisticsKHR, pub get_pipeline_indirect_device_address_nv: PFN_vkGetPipelineIndirectDeviceAddressNV, pub get_pipeline_indirect_memory_requirements_nv: PFN_vkGetPipelineIndirectMemoryRequirementsNV, + pub get_pipeline_key_khr: PFN_vkGetPipelineKeyKHR, pub get_pipeline_properties_ext: PFN_vkGetPipelinePropertiesEXT, pub get_private_data: PFN_vkGetPrivateData, pub get_private_data_ext: PFN_vkGetPrivateDataEXT, @@ -623,6 +627,7 @@ pub struct DeviceCommands { pub queue_wait_idle: PFN_vkQueueWaitIdle, pub register_device_event_ext: PFN_vkRegisterDeviceEventEXT, pub register_display_event_ext: PFN_vkRegisterDisplayEventEXT, + pub release_captured_pipeline_data_khr: PFN_vkReleaseCapturedPipelineDataKHR, pub release_full_screen_exclusive_mode_ext: PFN_vkReleaseFullScreenExclusiveModeEXT, pub release_performance_configuration_intel: PFN_vkReleasePerformanceConfigurationINTEL, pub release_profiling_lock_khr: PFN_vkReleaseProfilingLockKHR, @@ -5497,6 +5502,22 @@ impl DeviceCommands { fallback } }, + create_pipeline_binaries_khr: { + let value = loader(b"vkCreatePipelineBinariesKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _create_info: *const PipelineBinaryCreateInfoKHR, + _allocator: *const AllocationCallbacks, + _binaries: *mut PipelineBinaryHandlesInfoKHR, + ) -> Result { + panic!("could not load vkCreatePipelineBinariesKHR") + } + fallback + } + }, create_pipeline_cache: { let value = loader(b"vkCreatePipelineCache\0".as_ptr().cast()); if let Some(value) = value { @@ -6272,6 +6293,21 @@ impl DeviceCommands { fallback } }, + destroy_pipeline_binary_khr: { + let value = loader(b"vkDestroyPipelineBinaryKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _pipeline_binary: PipelineBinaryKHR, + _allocator: *const AllocationCallbacks, + ) { + panic!("could not load vkDestroyPipelineBinaryKHR") + } + fallback + } + }, destroy_pipeline_cache: { let value = loader(b"vkDestroyPipelineCache\0".as_ptr().cast()); if let Some(value) = value { @@ -8451,6 +8487,23 @@ impl DeviceCommands { fallback } }, + get_pipeline_binary_data_khr: { + let value = loader(b"vkGetPipelineBinaryDataKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _info: *const PipelineBinaryDataInfoKHR, + _pipeline_binary_key: *mut PipelineBinaryKeyKHR, + _pipeline_binary_data_size: *mut usize, + _pipeline_binary_data: *mut c_void, + ) -> Result { + panic!("could not load vkGetPipelineBinaryDataKHR") + } + fallback + } + }, get_pipeline_cache_data: { let value = loader(b"vkGetPipelineCacheData\0".as_ptr().cast()); if let Some(value) = value { @@ -8552,6 +8605,21 @@ impl DeviceCommands { fallback } }, + get_pipeline_key_khr: { + let value = loader(b"vkGetPipelineKeyKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _pipeline_create_info: *const PipelineCreateInfoKHR, + _pipeline_key: *mut PipelineBinaryKeyKHR, + ) -> Result { + panic!("could not load vkGetPipelineKeyKHR") + } + fallback + } + }, get_pipeline_properties_ext: { let value = loader(b"vkGetPipelinePropertiesEXT\0".as_ptr().cast()); if let Some(value) = value { @@ -9426,6 +9494,21 @@ impl DeviceCommands { fallback } }, + release_captured_pipeline_data_khr: { + let value = loader(b"vkReleaseCapturedPipelineDataKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _info: *const ReleaseCapturedPipelineDataInfoKHR, + _allocator: *const AllocationCallbacks, + ) -> Result { + panic!("could not load vkReleaseCapturedPipelineDataKHR") + } + fallback + } + }, release_full_screen_exclusive_mode_ext: { let value = loader(b"vkReleaseFullScreenExclusiveModeEXT\0".as_ptr().cast()); if let Some(value) = value { diff --git a/vulkanalia/src/vk/enums.rs b/vulkanalia/src/vk/enums.rs index 0dc670d..052c8ed 100644 --- a/vulkanalia/src/vk/enums.rs +++ b/vulkanalia/src/vk/enums.rs @@ -47,6 +47,7 @@ impl SuccessCode { pub const OPERATION_DEFERRED_KHR: Self = Self(1000268002); pub const OPERATION_NOT_DEFERRED_KHR: Self = Self(1000268003); pub const INCOMPATIBLE_SHADER_BINARY_EXT: Self = Self(1000482000); + pub const PIPELINE_BINARY_MISSING_KHR: Self = Self(1000483000); /// Constructs an instance of this enum with the supplied underlying value. #[inline] @@ -77,6 +78,7 @@ impl fmt::Debug for SuccessCode { 1000268002 => write!(f, "OPERATION_DEFERRED_KHR"), 1000268003 => write!(f, "OPERATION_NOT_DEFERRED_KHR"), 1000482000 => write!(f, "INCOMPATIBLE_SHADER_BINARY_EXT"), + 1000483000 => write!(f, "PIPELINE_BINARY_MISSING_KHR"), _ => self.0.fmt(f), } } @@ -136,6 +138,7 @@ impl ErrorCode { pub const FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT: Self = Self(-1000255000); pub const INVALID_VIDEO_STD_PARAMETERS_KHR: Self = Self(-1000299000); pub const COMPRESSION_EXHAUSTED_EXT: Self = Self(-1000338000); + pub const NOT_ENOUGH_SPACE_KHR: Self = Self(-1000483000); /// Constructs an instance of this enum with the supplied underlying value. #[inline] @@ -187,6 +190,7 @@ impl fmt::Debug for ErrorCode { -1000255000 => write!(f, "FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"), -1000299000 => write!(f, "INVALID_VIDEO_STD_PARAMETERS_KHR"), -1000338000 => write!(f, "COMPRESSION_EXHAUSTED_EXT"), + -1000483000 => write!(f, "NOT_ENOUGH_SPACE_KHR"), _ => self.0.fmt(f), } } @@ -229,6 +233,7 @@ impl fmt::Display for ErrorCode { -1000255000 => write!(f, "An operation on a swapchain created with VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT failed as it did not have exclusive full-screen access. This may occur due to implementation-dependent reasons, outside of the application's control."), -1000299000 => write!(f, "INVALID_VIDEO_STD_PARAMETERS_KHR"), -1000338000 => write!(f, "COMPRESSION_EXHAUSTED_EXT"), + -1000483000 => write!(f, "NOT_ENOUGH_SPACE_KHR"), _ => write!(f, "unknown Vulkan result (code = {})", self.0), } } diff --git a/vulkanalia/src/vk/extensions.rs b/vulkanalia/src/vk/extensions.rs index 9131e81..b9e51dc 100644 --- a/vulkanalia/src/vk/extensions.rs +++ b/vulkanalia/src/vk/extensions.rs @@ -6353,6 +6353,15 @@ pub trait KhrCalibratedTimestampsExtension: DeviceV1_0 { impl KhrCalibratedTimestampsExtension for crate::Device {} +/// +pub trait KhrComputeShaderDerivativesExtension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION; +} + +impl KhrComputeShaderDerivativesExtension for crate::Device {} + /// pub trait KhrCooperativeMatrixExtension: DeviceV1_0 { /// The metadata for this extension. @@ -8760,6 +8769,128 @@ pub trait KhrPerformanceQueryExtension: DeviceV1_0 { impl KhrPerformanceQueryExtension for crate::Device {} +/// +pub trait KhrPipelineBinaryExtension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = KHR_PIPELINE_BINARY_EXTENSION; + + /// + #[inline] + unsafe fn create_pipeline_binaries_khr( + &self, + create_info: &PipelineBinaryCreateInfoKHR, + allocator: Option<&AllocationCallbacks>, + binaries: &mut PipelineBinaryHandlesInfoKHR, + ) -> crate::VkResult { + let __result = (self.commands().create_pipeline_binaries_khr)( + self.handle(), + create_info, + allocator.map_or(ptr::null(), |v| v), + binaries, + ); + + if __result >= Result::SUCCESS { + Ok(__result.into()) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn destroy_pipeline_binary_khr( + &self, + pipeline_binary: PipelineBinaryKHR, + allocator: Option<&AllocationCallbacks>, + ) { + let __result = (self.commands().destroy_pipeline_binary_khr)( + self.handle(), + pipeline_binary, + allocator.map_or(ptr::null(), |v| v), + ); + } + + /// + #[inline] + unsafe fn get_pipeline_binary_data_khr( + &self, + info: &PipelineBinaryDataInfoKHR, + pipeline_binary_key: &mut PipelineBinaryKeyKHR, + ) -> crate::VkResult> { + let mut pipeline_binary_data_size = 0; + + (self.commands().get_pipeline_binary_data_khr)( + self.handle(), + info, + ptr::null_mut(), + &mut pipeline_binary_data_size, + ptr::null_mut(), + ); + + let mut pipeline_binary_data = Vec::with_capacity(pipeline_binary_data_size as usize); + + let __result = (self.commands().get_pipeline_binary_data_khr)( + self.handle(), + info, + pipeline_binary_key, + &mut pipeline_binary_data_size, + pipeline_binary_data.as_mut_ptr() as *mut c_void, + ); + + debug_assert!(pipeline_binary_data.capacity() == pipeline_binary_data_size as usize); + pipeline_binary_data.set_len(pipeline_binary_data_size as usize); + + if __result == Result::SUCCESS { + Ok(pipeline_binary_data) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn get_pipeline_key_khr( + &self, + pipeline_create_info: Option<&PipelineCreateInfoKHR>, + pipeline_key: &mut PipelineBinaryKeyKHR, + ) -> crate::VkResult<()> { + let __result = (self.commands().get_pipeline_key_khr)( + self.handle(), + pipeline_create_info.map_or(ptr::null(), |v| v), + pipeline_key, + ); + + if __result == Result::SUCCESS { + Ok(()) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn release_captured_pipeline_data_khr( + &self, + info: &ReleaseCapturedPipelineDataInfoKHR, + allocator: Option<&AllocationCallbacks>, + ) -> crate::VkResult<()> { + let __result = (self.commands().release_captured_pipeline_data_khr)( + self.handle(), + info, + allocator.map_or(ptr::null(), |v| v), + ); + + if __result == Result::SUCCESS { + Ok(()) + } else { + Err(__result.into()) + } + } +} + +impl KhrPipelineBinaryExtension for crate::Device {} + /// pub trait KhrPipelineExecutablePropertiesExtension: DeviceV1_0 { /// The metadata for this extension.