diff --git a/Changelog.md b/Changelog.md index 4c49a5a54..83525c377 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.244 (#697) +- Update Vulkan-Headers to 1.3.245 (#697, #723) ### Changed diff --git a/ash/Cargo.toml b/ash/Cargo.toml index cf685cd3e..739afee94 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.37.0+1.3.244" +version = "0.37.0+1.3.245" authors = [ "Maik Klein ", "Benjamin Saunders ", diff --git a/ash/src/vk/const_debugs.rs b/ash/src/vk/const_debugs.rs index 17741e45c..5a1591e41 100644 --- a/ash/src/vk/const_debugs.rs +++ b/ash/src/vk/const_debugs.rs @@ -651,6 +651,10 @@ impl fmt::Debug for BuildAccelerationStructureFlagsKHR { BuildAccelerationStructureFlagsKHR::ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT.0, "ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT", ), + ( + BuildAccelerationStructureFlagsKHR::ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV.0, + "ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV", + ), ]; debug_flags(f, KNOWN, self.0) } @@ -1419,6 +1423,21 @@ impl fmt::Debug for DiscardRectangleModeEXT { } } } +impl fmt::Debug for DisplacementMicromapFormatNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::TYPE_64_TRIANGLES_64_BYTES => Some("TYPE_64_TRIANGLES_64_BYTES"), + Self::TYPE_256_TRIANGLES_128_BYTES => Some("TYPE_256_TRIANGLES_128_BYTES"), + Self::TYPE_1024_TRIANGLES_128_BYTES => Some("TYPE_1024_TRIANGLES_128_BYTES"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} impl fmt::Debug for DisplayEventTypeEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -2926,6 +2945,7 @@ impl fmt::Debug for MicromapTypeEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { Self::OPACITY_MICROMAP => Some("OPACITY_MICROMAP"), + Self::DISPLACEMENT_MICROMAP_NV => Some("DISPLACEMENT_MICROMAP_NV"), _ => None, }; if let Some(x) = name { @@ -3383,6 +3403,10 @@ impl fmt::Debug for PipelineCreateFlags { PipelineCreateFlags::RAY_TRACING_OPACITY_MICROMAP_EXT.0, "RAY_TRACING_OPACITY_MICROMAP_EXT", ), + ( + PipelineCreateFlags::RAY_TRACING_DISPLACEMENT_MICROMAP_NV.0, + "RAY_TRACING_DISPLACEMENT_MICROMAP_NV", + ), ( PipelineCreateFlags::NO_PROTECTED_ACCESS_EXT.0, "NO_PROTECTED_ACCESS_EXT", @@ -5661,6 +5685,15 @@ impl fmt::Debug for StructureType { Self::ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT => { Some("ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT") } + Self::PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV => { + Some("PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV") + } + Self::PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV => { + Some("PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV") + } + Self::ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV => { + Some("ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV") + } Self::PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI => { Some("PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI") } diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index 6f079205a..aa4e71da6 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 = 244; +pub const HEADER_VERSION: u32 = 245; #[doc = ""] pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 3, HEADER_VERSION); #[doc = ""] @@ -44318,6 +44318,275 @@ impl<'a> AccelerationStructureTrianglesOpacityMicromapEXT<'a> { #[repr(C)] #[cfg_attr(feature = "debug", derive(Debug))] #[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceDisplacementMicromapFeaturesNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub displacement_micromap: Bool32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceDisplacementMicromapFeaturesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + displacement_micromap: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceDisplacementMicromapFeaturesNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceDisplacementMicromapFeaturesNV<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceDisplacementMicromapFeaturesNV<'_> {} +impl<'a> PhysicalDeviceDisplacementMicromapFeaturesNV<'a> { + #[inline] + pub fn displacement_micromap(mut self, displacement_micromap: bool) -> Self { + self.displacement_micromap = displacement_micromap.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceDisplacementMicromapPropertiesNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_displacement_micromap_subdivision_level: u32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceDisplacementMicromapPropertiesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + max_displacement_micromap_subdivision_level: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceDisplacementMicromapPropertiesNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV; +} +unsafe impl ExtendsPhysicalDeviceProperties2 + for PhysicalDeviceDisplacementMicromapPropertiesNV<'_> +{ +} +impl<'a> PhysicalDeviceDisplacementMicromapPropertiesNV<'a> { + #[inline] + pub fn max_displacement_micromap_subdivision_level( + mut self, + max_displacement_micromap_subdivision_level: u32, + ) -> Self { + self.max_displacement_micromap_subdivision_level = + max_displacement_micromap_subdivision_level; + self + } +} +#[repr(C)] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct AccelerationStructureTrianglesDisplacementMicromapNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub displacement_bias_and_scale_format: Format, + pub displacement_vector_format: Format, + pub displacement_bias_and_scale_buffer: DeviceOrHostAddressConstKHR, + pub displacement_bias_and_scale_stride: DeviceSize, + pub displacement_vector_buffer: DeviceOrHostAddressConstKHR, + pub displacement_vector_stride: DeviceSize, + pub displaced_micromap_primitive_flags: DeviceOrHostAddressConstKHR, + pub displaced_micromap_primitive_flags_stride: DeviceSize, + pub index_type: IndexType, + pub index_buffer: DeviceOrHostAddressConstKHR, + pub index_stride: DeviceSize, + pub base_triangle: u32, + pub usage_counts_count: u32, + pub p_usage_counts: *const MicromapUsageEXT, + pub pp_usage_counts: *const *const MicromapUsageEXT, + pub micromap: MicromapEXT, + pub _marker: PhantomData<&'a ()>, +} +#[cfg(feature = "debug")] +impl fmt::Debug for AccelerationStructureTrianglesDisplacementMicromapNV<'_> { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt.debug_struct("AccelerationStructureTrianglesDisplacementMicromapNV") + .field("s_type", &self.s_type) + .field("p_next", &self.p_next) + .field( + "displacement_bias_and_scale_format", + &self.displacement_bias_and_scale_format, + ) + .field( + "displacement_vector_format", + &self.displacement_vector_format, + ) + .field("displacement_bias_and_scale_buffer", &"union") + .field( + "displacement_bias_and_scale_stride", + &self.displacement_bias_and_scale_stride, + ) + .field("displacement_vector_buffer", &"union") + .field( + "displacement_vector_stride", + &self.displacement_vector_stride, + ) + .field("displaced_micromap_primitive_flags", &"union") + .field( + "displaced_micromap_primitive_flags_stride", + &self.displaced_micromap_primitive_flags_stride, + ) + .field("index_type", &self.index_type) + .field("index_buffer", &"union") + .field("index_stride", &self.index_stride) + .field("base_triangle", &self.base_triangle) + .field("usage_counts_count", &self.usage_counts_count) + .field("p_usage_counts", &self.p_usage_counts) + .field("pp_usage_counts", &self.pp_usage_counts) + .field("micromap", &self.micromap) + .finish() + } +} +impl ::std::default::Default for AccelerationStructureTrianglesDisplacementMicromapNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + displacement_bias_and_scale_format: Format::default(), + displacement_vector_format: Format::default(), + displacement_bias_and_scale_buffer: DeviceOrHostAddressConstKHR::default(), + displacement_bias_and_scale_stride: DeviceSize::default(), + displacement_vector_buffer: DeviceOrHostAddressConstKHR::default(), + displacement_vector_stride: DeviceSize::default(), + displaced_micromap_primitive_flags: DeviceOrHostAddressConstKHR::default(), + displaced_micromap_primitive_flags_stride: DeviceSize::default(), + index_type: IndexType::default(), + index_buffer: DeviceOrHostAddressConstKHR::default(), + index_stride: DeviceSize::default(), + base_triangle: u32::default(), + usage_counts_count: u32::default(), + p_usage_counts: ::std::ptr::null(), + pp_usage_counts: ::std::ptr::null(), + micromap: MicromapEXT::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for AccelerationStructureTrianglesDisplacementMicromapNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV; +} +unsafe impl ExtendsAccelerationStructureGeometryTrianglesDataKHR + for AccelerationStructureTrianglesDisplacementMicromapNV<'_> +{ +} +impl<'a> AccelerationStructureTrianglesDisplacementMicromapNV<'a> { + #[inline] + pub fn displacement_bias_and_scale_format( + mut self, + displacement_bias_and_scale_format: Format, + ) -> Self { + self.displacement_bias_and_scale_format = displacement_bias_and_scale_format; + self + } + #[inline] + pub fn displacement_vector_format(mut self, displacement_vector_format: Format) -> Self { + self.displacement_vector_format = displacement_vector_format; + self + } + #[inline] + pub fn displacement_bias_and_scale_buffer( + mut self, + displacement_bias_and_scale_buffer: DeviceOrHostAddressConstKHR, + ) -> Self { + self.displacement_bias_and_scale_buffer = displacement_bias_and_scale_buffer; + self + } + #[inline] + pub fn displacement_bias_and_scale_stride( + mut self, + displacement_bias_and_scale_stride: DeviceSize, + ) -> Self { + self.displacement_bias_and_scale_stride = displacement_bias_and_scale_stride; + self + } + #[inline] + pub fn displacement_vector_buffer( + mut self, + displacement_vector_buffer: DeviceOrHostAddressConstKHR, + ) -> Self { + self.displacement_vector_buffer = displacement_vector_buffer; + self + } + #[inline] + pub fn displacement_vector_stride(mut self, displacement_vector_stride: DeviceSize) -> Self { + self.displacement_vector_stride = displacement_vector_stride; + self + } + #[inline] + pub fn displaced_micromap_primitive_flags( + mut self, + displaced_micromap_primitive_flags: DeviceOrHostAddressConstKHR, + ) -> Self { + self.displaced_micromap_primitive_flags = displaced_micromap_primitive_flags; + self + } + #[inline] + pub fn displaced_micromap_primitive_flags_stride( + mut self, + displaced_micromap_primitive_flags_stride: DeviceSize, + ) -> Self { + self.displaced_micromap_primitive_flags_stride = displaced_micromap_primitive_flags_stride; + self + } + #[inline] + pub fn index_type(mut self, index_type: IndexType) -> Self { + self.index_type = index_type; + self + } + #[inline] + pub fn index_buffer(mut self, index_buffer: DeviceOrHostAddressConstKHR) -> Self { + self.index_buffer = index_buffer; + self + } + #[inline] + pub fn index_stride(mut self, index_stride: DeviceSize) -> Self { + self.index_stride = index_stride; + self + } + #[inline] + pub fn base_triangle(mut self, base_triangle: u32) -> Self { + self.base_triangle = base_triangle; + self + } + #[inline] + pub fn usage_counts(mut self, usage_counts: &'a [MicromapUsageEXT]) -> Self { + self.usage_counts_count = usage_counts.len() as _; + self.p_usage_counts = usage_counts.as_ptr(); + self + } + #[inline] + pub fn usage_counts_ptrs(mut self, usage_counts_ptrs: &'a [&'a MicromapUsageEXT]) -> Self { + self.usage_counts_count = usage_counts_ptrs.len() as _; + self.pp_usage_counts = usage_counts_ptrs.as_ptr().cast(); + self + } + #[inline] + pub fn micromap(mut self, micromap: MicromapEXT) -> Self { + self.micromap = micromap; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] #[doc = ""] pub struct PipelinePropertiesIdentifierEXT<'a> { pub s_type: StructureType, diff --git a/ash/src/vk/enums.rs b/ash/src/vk/enums.rs index 289b6219f..4eef2b072 100644 --- a/ash/src/vk/enums.rs +++ b/ash/src/vk/enums.rs @@ -2784,6 +2784,25 @@ impl DeviceFaultVendorBinaryHeaderVersionEXT { impl DeviceFaultVendorBinaryHeaderVersionEXT { pub const ONE: Self = Self(1); } +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +#[doc = ""] +pub struct DisplacementMicromapFormatNV(pub(crate) i32); +impl DisplacementMicromapFormatNV { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl DisplacementMicromapFormatNV { + pub const TYPE_64_TRIANGLES_64_BYTES: Self = Self(1); + pub const TYPE_256_TRIANGLES_128_BYTES: Self = Self(2); + pub const TYPE_1024_TRIANGLES_128_BYTES: Self = Self(3); +} impl fmt::Debug for ObjectType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { diff --git a/ash/src/vk/extensions.rs b/ash/src/vk/extensions.rs index 1fbc1bbc5..76502f1c1 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -18767,6 +18767,43 @@ impl StructureType { pub const MICROMAP_BUILD_SIZES_INFO_EXT: Self = Self(1_000_396_008); pub const ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT: Self = Self(1_000_396_009); } +impl NvDisplacementMicromapFn { + pub const NAME: &'static ::std::ffi::CStr = unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_displacement_micromap\0") + }; + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +pub struct NvDisplacementMicromapFn {} +unsafe impl Send for NvDisplacementMicromapFn {} +unsafe impl Sync for NvDisplacementMicromapFn {} +impl NvDisplacementMicromapFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self {} + } +} +#[doc = "Generated from 'VK_NV_displacement_micromap'"] +impl BuildAccelerationStructureFlagsKHR { + pub const ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV: Self = Self(0b10_0000_0000); +} +#[doc = "Generated from 'VK_NV_displacement_micromap'"] +impl MicromapTypeEXT { + pub const DISPLACEMENT_MICROMAP_NV: Self = Self(1_000_397_000); +} +#[doc = "Generated from 'VK_NV_displacement_micromap'"] +impl PipelineCreateFlags { + pub const RAY_TRACING_DISPLACEMENT_MICROMAP_NV: Self = + Self(0b1_0000_0000_0000_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_NV_displacement_micromap'"] +impl StructureType { + pub const PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV: Self = Self(1_000_397_000); + pub const PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV: Self = Self(1_000_397_001); + pub const ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV: Self = Self(1_000_397_002); +} impl ExtLoadStoreOpNoneFn { pub const NAME: &'static ::std::ffi::CStr = unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_load_store_op_none\0") }; diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index fa204df59..9b9fd871b 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit fa204df59c6caea6b9be3cf0754a88cd89056a87 +Subproject commit 9b9fd871b08110cd8f0b74e721b03213d9cc3081