diff --git a/Changelog.md b/Changelog.md index 44e22fb6..a65b2d85 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Update Vulkan-Headers to 1.3.299 (#910, #951) +- Update Vulkan-Headers to 1.3.300 (#910, #951) - Added `VK_KHR_get_display_properties2` instance extension (#932) - Added `VK_EXT_metal_objects` device extension (#942) diff --git a/ash/Cargo.toml b/ash/Cargo.toml index 5b063826..b35694b3 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.38.0+1.3.299" +version = "0.38.0+1.3.300" authors = [ "Maik Klein ", "Benjamin Saunders ", diff --git a/ash/src/extensions_generated.rs b/ash/src/extensions_generated.rs index c5bc15f1..5059e632 100644 --- a/ash/src/extensions_generated.rs +++ b/ash/src/extensions_generated.rs @@ -20386,6 +20386,72 @@ pub mod nv { crate::vk::NV_RAY_TRACING_VALIDATION_SPEC_VERSION as SPEC_VERSION, }; } + #[doc = "VK_NV_cooperative_matrix2"] + pub mod cooperative_matrix2 { + use super::super::*; + pub use { + crate::vk::NV_COOPERATIVE_MATRIX2_NAME as NAME, + crate::vk::NV_COOPERATIVE_MATRIX2_SPEC_VERSION as SPEC_VERSION, + }; + #[doc = "VK_NV_cooperative_matrix2 instance-level functions"] + #[derive(Clone)] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } + #[derive(Clone)] + #[doc = "Raw VK_NV_cooperative_matrix2 instance-level function pointers"] + pub struct InstanceFn { + pub get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv: + PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV, + } + unsafe impl Send for InstanceFn {} + unsafe impl Sync for InstanceFn {} + impl InstanceFn { + pub fn load *const c_void>(mut f: F) -> Self { + Self::load_erased(&mut f) + } + fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { + Self { + get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv: unsafe { + unsafe extern "system" fn get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv( + _physical_device: PhysicalDevice, + _p_property_count: *mut u32, + _p_properties: *mut CooperativeMatrixFlexibleDimensionsPropertiesNV<'_>, + ) -> Result { + panic ! (concat ! ("Unable to load " , stringify ! (get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv))) + } + let cname = CStr::from_bytes_with_nul_unchecked( + b"vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV\0", + ); + let val = _f(cname); + if val.is_null() { + get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv + } else { + ::core::mem::transmute(val) + } + }, + } + } + } + } } #[doc = "Extensions tagged NVX"] pub mod nvx { diff --git a/ash/src/vk/const_debugs.rs b/ash/src/vk/const_debugs.rs index c99f8798..d5b52cfb 100644 --- a/ash/src/vk/const_debugs.rs +++ b/ash/src/vk/const_debugs.rs @@ -6879,6 +6879,15 @@ impl fmt::Debug for StructureType { Self::PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT => { Some("PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT") } + Self::PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV => { + Some("PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV") + } + Self::COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV => { + Some("COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV") + } + Self::PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV => { + Some("PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV") + } Self::PHYSICAL_DEVICE_SUBGROUP_PROPERTIES => { Some("PHYSICAL_DEVICE_SUBGROUP_PROPERTIES") } diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index 71f18dd7..712bf04e 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 = 299; +pub const HEADER_VERSION: u32 = 300; #[doc = ""] pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 3, HEADER_VERSION); #[doc = ""] @@ -59986,3 +59986,255 @@ impl DepthClampRangeEXT { self } } +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +#[must_use] +pub struct PhysicalDeviceCooperativeMatrix2FeaturesNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub cooperative_matrix_workgroup_scope: Bool32, + pub cooperative_matrix_flexible_dimensions: Bool32, + pub cooperative_matrix_reductions: Bool32, + pub cooperative_matrix_conversions: Bool32, + pub cooperative_matrix_per_element_operations: Bool32, + pub cooperative_matrix_tensor_addressing: Bool32, + pub cooperative_matrix_block_loads: Bool32, + pub _marker: PhantomData<&'a ()>, +} +unsafe impl Send for PhysicalDeviceCooperativeMatrix2FeaturesNV<'_> {} +unsafe impl Sync for PhysicalDeviceCooperativeMatrix2FeaturesNV<'_> {} +impl ::core::default::Default for PhysicalDeviceCooperativeMatrix2FeaturesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::core::ptr::null_mut(), + cooperative_matrix_workgroup_scope: Bool32::default(), + cooperative_matrix_flexible_dimensions: Bool32::default(), + cooperative_matrix_reductions: Bool32::default(), + cooperative_matrix_conversions: Bool32::default(), + cooperative_matrix_per_element_operations: Bool32::default(), + cooperative_matrix_tensor_addressing: Bool32::default(), + cooperative_matrix_block_loads: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceCooperativeMatrix2FeaturesNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceCooperativeMatrix2FeaturesNV<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceCooperativeMatrix2FeaturesNV<'_> {} +impl<'a> PhysicalDeviceCooperativeMatrix2FeaturesNV<'a> { + #[inline] + pub fn cooperative_matrix_workgroup_scope( + mut self, + cooperative_matrix_workgroup_scope: bool, + ) -> Self { + self.cooperative_matrix_workgroup_scope = cooperative_matrix_workgroup_scope.into(); + self + } + #[inline] + pub fn cooperative_matrix_flexible_dimensions( + mut self, + cooperative_matrix_flexible_dimensions: bool, + ) -> Self { + self.cooperative_matrix_flexible_dimensions = cooperative_matrix_flexible_dimensions.into(); + self + } + #[inline] + pub fn cooperative_matrix_reductions(mut self, cooperative_matrix_reductions: bool) -> Self { + self.cooperative_matrix_reductions = cooperative_matrix_reductions.into(); + self + } + #[inline] + pub fn cooperative_matrix_conversions(mut self, cooperative_matrix_conversions: bool) -> Self { + self.cooperative_matrix_conversions = cooperative_matrix_conversions.into(); + self + } + #[inline] + pub fn cooperative_matrix_per_element_operations( + mut self, + cooperative_matrix_per_element_operations: bool, + ) -> Self { + self.cooperative_matrix_per_element_operations = + cooperative_matrix_per_element_operations.into(); + self + } + #[inline] + pub fn cooperative_matrix_tensor_addressing( + mut self, + cooperative_matrix_tensor_addressing: bool, + ) -> Self { + self.cooperative_matrix_tensor_addressing = cooperative_matrix_tensor_addressing.into(); + self + } + #[inline] + pub fn cooperative_matrix_block_loads(mut self, cooperative_matrix_block_loads: bool) -> Self { + self.cooperative_matrix_block_loads = cooperative_matrix_block_loads.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +#[must_use] +pub struct PhysicalDeviceCooperativeMatrix2PropertiesNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub cooperative_matrix_workgroup_scope_max_workgroup_size: u32, + pub cooperative_matrix_flexible_dimensions_max_dimension: u32, + pub cooperative_matrix_workgroup_scope_reserved_shared_memory: u32, + pub _marker: PhantomData<&'a ()>, +} +unsafe impl Send for PhysicalDeviceCooperativeMatrix2PropertiesNV<'_> {} +unsafe impl Sync for PhysicalDeviceCooperativeMatrix2PropertiesNV<'_> {} +impl ::core::default::Default for PhysicalDeviceCooperativeMatrix2PropertiesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::core::ptr::null_mut(), + cooperative_matrix_workgroup_scope_max_workgroup_size: u32::default(), + cooperative_matrix_flexible_dimensions_max_dimension: u32::default(), + cooperative_matrix_workgroup_scope_reserved_shared_memory: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceCooperativeMatrix2PropertiesNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV; +} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceCooperativeMatrix2PropertiesNV<'_> {} +impl<'a> PhysicalDeviceCooperativeMatrix2PropertiesNV<'a> { + #[inline] + pub fn cooperative_matrix_workgroup_scope_max_workgroup_size( + mut self, + cooperative_matrix_workgroup_scope_max_workgroup_size: u32, + ) -> Self { + self.cooperative_matrix_workgroup_scope_max_workgroup_size = + cooperative_matrix_workgroup_scope_max_workgroup_size; + self + } + #[inline] + pub fn cooperative_matrix_flexible_dimensions_max_dimension( + mut self, + cooperative_matrix_flexible_dimensions_max_dimension: u32, + ) -> Self { + self.cooperative_matrix_flexible_dimensions_max_dimension = + cooperative_matrix_flexible_dimensions_max_dimension; + self + } + #[inline] + pub fn cooperative_matrix_workgroup_scope_reserved_shared_memory( + mut self, + cooperative_matrix_workgroup_scope_reserved_shared_memory: u32, + ) -> Self { + self.cooperative_matrix_workgroup_scope_reserved_shared_memory = + cooperative_matrix_workgroup_scope_reserved_shared_memory; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +#[must_use] +pub struct CooperativeMatrixFlexibleDimensionsPropertiesNV<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub m_granularity: u32, + pub n_granularity: u32, + pub k_granularity: u32, + pub a_type: ComponentTypeKHR, + pub b_type: ComponentTypeKHR, + pub c_type: ComponentTypeKHR, + pub result_type: ComponentTypeKHR, + pub saturating_accumulation: Bool32, + pub scope: ScopeKHR, + pub workgroup_invocations: u32, + pub _marker: PhantomData<&'a ()>, +} +unsafe impl Send for CooperativeMatrixFlexibleDimensionsPropertiesNV<'_> {} +unsafe impl Sync for CooperativeMatrixFlexibleDimensionsPropertiesNV<'_> {} +impl ::core::default::Default for CooperativeMatrixFlexibleDimensionsPropertiesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::core::ptr::null_mut(), + m_granularity: u32::default(), + n_granularity: u32::default(), + k_granularity: u32::default(), + a_type: ComponentTypeKHR::default(), + b_type: ComponentTypeKHR::default(), + c_type: ComponentTypeKHR::default(), + result_type: ComponentTypeKHR::default(), + saturating_accumulation: Bool32::default(), + scope: ScopeKHR::default(), + workgroup_invocations: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for CooperativeMatrixFlexibleDimensionsPropertiesNV<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV; +} +impl<'a> CooperativeMatrixFlexibleDimensionsPropertiesNV<'a> { + #[inline] + pub fn m_granularity(mut self, m_granularity: u32) -> Self { + self.m_granularity = m_granularity; + self + } + #[inline] + pub fn n_granularity(mut self, n_granularity: u32) -> Self { + self.n_granularity = n_granularity; + self + } + #[inline] + pub fn k_granularity(mut self, k_granularity: u32) -> Self { + self.k_granularity = k_granularity; + self + } + #[inline] + pub fn a_type(mut self, a_type: ComponentTypeKHR) -> Self { + self.a_type = a_type; + self + } + #[inline] + pub fn b_type(mut self, b_type: ComponentTypeKHR) -> Self { + self.b_type = b_type; + self + } + #[inline] + pub fn c_type(mut self, c_type: ComponentTypeKHR) -> Self { + self.c_type = c_type; + self + } + #[inline] + pub fn result_type(mut self, result_type: ComponentTypeKHR) -> Self { + self.result_type = result_type; + self + } + #[inline] + pub fn saturating_accumulation(mut self, saturating_accumulation: bool) -> Self { + self.saturating_accumulation = saturating_accumulation.into(); + self + } + #[inline] + pub fn scope(mut self, scope: ScopeKHR) -> Self { + self.scope = scope; + self + } + #[inline] + pub fn workgroup_invocations(mut self, workgroup_invocations: u32) -> Self { + self.workgroup_invocations = workgroup_invocations; + self + } +} diff --git a/ash/src/vk/extensions.rs b/ash/src/vk/extensions.rs index 601d624d..085ef712 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -4130,6 +4130,12 @@ impl StructureType { pub const PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT: Self = Self(1_000_582_000); pub const PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT: Self = Self(1_000_582_001); } +#[doc = "Generated from 'VK_NV_cooperative_matrix2'"] +impl StructureType { + pub const PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV: Self = Self(1_000_593_000); + pub const COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV: Self = Self(1_000_593_001); + pub const PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV: Self = Self(1_000_593_002); +} pub const KHR_SURFACE_NAME: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_KHR_surface\0") }; pub const KHR_SURFACE_SPEC_VERSION: u32 = 25u32; @@ -8199,3 +8205,13 @@ pub const MESA_IMAGE_ALIGNMENT_CONTROL_SPEC_VERSION: u32 = 1u32; pub const EXT_DEPTH_CLAMP_CONTROL_NAME: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_EXT_depth_clamp_control\0") }; pub const EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION: u32 = 1u32; +pub const NV_COOPERATIVE_MATRIX2_NAME: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_NV_cooperative_matrix2\0") }; +pub const NV_COOPERATIVE_MATRIX2_SPEC_VERSION: u32 = 1u32; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = + unsafe extern "system" fn( + physical_device: PhysicalDevice, + p_property_count: *mut u32, + p_properties: *mut CooperativeMatrixFlexibleDimensionsPropertiesNV<'_>, + ) -> Result; diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index b955ae0e..ab1ea905 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit b955ae0edb4f02074bfbf134ccc1980e83122d30 +Subproject commit ab1ea9059d75b42a5717c7ab55713bdf194ccf21