diff --git a/Changelog.md b/Changelog.md index 319f52b3f..68c1d5ee2 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `Handle::is_null()` to allow checking if a handle is a `NULL` value (#694) - Allow building `Entry`/`Instance`/`Device` from handle+fns (see their `from_parts_1_x()` associated functions) (#748) -- Update Vulkan-Headers to 1.3.264 (#760, #763, #783) +- Update Vulkan-Headers to 1.3.266 (#760, #763, #783) - Added `VK_NV_memory_decompression` device extension (#761) - Added `VK_GOOGLE_display_timing` device extension (#765) - Added `VK_ANDROID_external_memory_android_hardware_buffer` device extension (#769) diff --git a/ash/Cargo.toml b/ash/Cargo.toml index b8c6dd378..e553a7143 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.37.0+1.3.264" +version = "0.37.0+1.3.266" authors = [ "Maik Klein ", "Benjamin Saunders ", diff --git a/ash/src/vk/const_debugs.rs b/ash/src/vk/const_debugs.rs index 44de85674..19aebf67c 100644 --- a/ash/src/vk/const_debugs.rs +++ b/ash/src/vk/const_debugs.rs @@ -1665,6 +1665,7 @@ impl fmt::Debug for DriverId { Self::MESA_DOZEN => Some("MESA_DOZEN"), Self::MESA_NVK => Some("MESA_NVK"), Self::IMAGINATION_OPEN_SOURCE_MESA => Some("IMAGINATION_OPEN_SOURCE_MESA"), + Self::MESA_AGXV => Some("MESA_AGXV"), _ => None, }; if let Some(x) = name { @@ -2965,6 +2966,30 @@ impl fmt::Debug for InternalAllocationType { } } } +impl fmt::Debug for LatencyMarkerNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::SIMULATION_START => Some("SIMULATION_START"), + Self::SIMULATION_END => Some("SIMULATION_END"), + Self::RENDERSUBMIT_START => Some("RENDERSUBMIT_START"), + Self::RENDERSUBMIT_END => Some("RENDERSUBMIT_END"), + Self::PRESENT_START => Some("PRESENT_START"), + Self::PRESENT_END => Some("PRESENT_END"), + Self::INPUT_SAMPLE => Some("INPUT_SAMPLE"), + Self::TRIGGER_FLASH => Some("TRIGGER_FLASH"), + Self::OUT_OF_BAND_RENDERSUBMIT_START => Some("OUT_OF_BAND_RENDERSUBMIT_START"), + Self::OUT_OF_BAND_RENDERSUBMIT_END => Some("OUT_OF_BAND_RENDERSUBMIT_END"), + Self::OUT_OF_BAND_PRESENT_START => Some("OUT_OF_BAND_PRESENT_START"), + Self::OUT_OF_BAND_PRESENT_END => Some("OUT_OF_BAND_PRESENT_END"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} impl fmt::Debug for LayeredDriverUnderlyingApiMSFT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -3266,6 +3291,20 @@ impl fmt::Debug for OpticalFlowUsageFlagsNV { debug_flags(f, KNOWN, self.0) } } +impl fmt::Debug for OutOfBandQueueTypeNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::RENDER => Some("RENDER"), + Self::PRESENT => Some("PRESENT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} impl fmt::Debug for PeerMemoryFeatureFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ @@ -4453,6 +4492,10 @@ impl fmt::Debug for ResolveModeFlags { (ResolveModeFlags::AVERAGE.0, "AVERAGE"), (ResolveModeFlags::MIN.0, "MIN"), (ResolveModeFlags::MAX.0, "MAX"), + ( + ResolveModeFlags::EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID.0, + "EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID", + ), ]; debug_flags(f, KNOWN, self.0) } @@ -6268,6 +6311,15 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT => { Some("PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT") } + Self::PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID => { + Some("PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID") + } + Self::PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID => { + Some("PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID") + } + Self::ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID => { + Some("ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID") + } Self::PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR => { Some("PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR") } @@ -6329,6 +6381,15 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT => { Some("PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT") } + Self::LATENCY_SLEEP_MODE_INFO_NV => Some("LATENCY_SLEEP_MODE_INFO_NV"), + Self::LATENCY_SLEEP_INFO_NV => Some("LATENCY_SLEEP_INFO_NV"), + Self::SET_LATENCY_MARKER_INFO_NV => Some("SET_LATENCY_MARKER_INFO_NV"), + Self::GET_LATENCY_MARKER_INFO_NV => Some("GET_LATENCY_MARKER_INFO_NV"), + Self::LATENCY_TIMINGS_FRAME_REPORT_NV => Some("LATENCY_TIMINGS_FRAME_REPORT_NV"), + Self::LATENCY_SUBMISSION_PRESENT_ID_NV => Some("LATENCY_SUBMISSION_PRESENT_ID_NV"), + Self::OUT_OF_BAND_QUEUE_TYPE_INFO_NV => Some("OUT_OF_BAND_QUEUE_TYPE_INFO_NV"), + Self::SWAPCHAIN_LATENCY_CREATE_INFO_NV => Some("SWAPCHAIN_LATENCY_CREATE_INFO_NV"), + Self::LATENCY_SURFACE_CAPABILITIES_NV => Some("LATENCY_SURFACE_CAPABILITIES_NV"), Self::PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR => { Some("PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR") } diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index c937f9cbe..67d5ab51e 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 = 264; +pub const HEADER_VERSION: u32 = 266; #[doc = ""] pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 3, HEADER_VERSION); #[doc = ""] @@ -21055,6 +21055,9 @@ unsafe impl<'a> TaggedStructure for ExternalFormatANDROID<'a> { } unsafe impl ExtendsImageCreateInfo for ExternalFormatANDROID<'_> {} unsafe impl ExtendsSamplerYcbcrConversionCreateInfo for ExternalFormatANDROID<'_> {} +unsafe impl ExtendsAttachmentDescription2 for ExternalFormatANDROID<'_> {} +unsafe impl ExtendsGraphicsPipelineCreateInfo for ExternalFormatANDROID<'_> {} +unsafe impl ExtendsCommandBufferInheritanceInfo for ExternalFormatANDROID<'_> {} impl<'a> ExternalFormatANDROID<'a> { #[inline] pub fn external_format(mut self, external_format: u64) -> Self { @@ -51232,3 +51235,541 @@ impl<'a> PhysicalDeviceLayeredDriverPropertiesMSFT<'a> { self } } +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceExternalFormatResolveFeaturesANDROID<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub external_format_resolve: Bool32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceExternalFormatResolveFeaturesANDROID<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + external_format_resolve: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceExternalFormatResolveFeaturesANDROID<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceExternalFormatResolveFeaturesANDROID<'_> +{ +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceExternalFormatResolveFeaturesANDROID<'_> {} +impl<'a> PhysicalDeviceExternalFormatResolveFeaturesANDROID<'a> { + #[inline] + pub fn external_format_resolve(mut self, external_format_resolve: bool) -> Self { + self.external_format_resolve = external_format_resolve.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceExternalFormatResolvePropertiesANDROID<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub null_color_attachment_with_external_format_resolve: Bool32, + pub external_format_resolve_chroma_offset_x: ChromaLocation, + pub external_format_resolve_chroma_offset_y: ChromaLocation, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceExternalFormatResolvePropertiesANDROID<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + null_color_attachment_with_external_format_resolve: Bool32::default(), + external_format_resolve_chroma_offset_x: ChromaLocation::default(), + external_format_resolve_chroma_offset_y: ChromaLocation::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceExternalFormatResolvePropertiesANDROID<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID; +} +unsafe impl ExtendsPhysicalDeviceProperties2 + for PhysicalDeviceExternalFormatResolvePropertiesANDROID<'_> +{ +} +impl<'a> PhysicalDeviceExternalFormatResolvePropertiesANDROID<'a> { + #[inline] + pub fn null_color_attachment_with_external_format_resolve( + mut self, + null_color_attachment_with_external_format_resolve: bool, + ) -> Self { + self.null_color_attachment_with_external_format_resolve = + null_color_attachment_with_external_format_resolve.into(); + self + } + #[inline] + pub fn external_format_resolve_chroma_offset_x( + mut self, + external_format_resolve_chroma_offset_x: ChromaLocation, + ) -> Self { + self.external_format_resolve_chroma_offset_x = external_format_resolve_chroma_offset_x; + self + } + #[inline] + pub fn external_format_resolve_chroma_offset_y( + mut self, + external_format_resolve_chroma_offset_y: ChromaLocation, + ) -> Self { + self.external_format_resolve_chroma_offset_y = external_format_resolve_chroma_offset_y; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct AndroidHardwareBufferFormatResolvePropertiesANDROID<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub color_attachment_format: Format, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for AndroidHardwareBufferFormatResolvePropertiesANDROID<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + color_attachment_format: Format::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for AndroidHardwareBufferFormatResolvePropertiesANDROID<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID; +} +unsafe impl ExtendsAndroidHardwareBufferPropertiesANDROID + for AndroidHardwareBufferFormatResolvePropertiesANDROID<'_> +{ +} +impl<'a> AndroidHardwareBufferFormatResolvePropertiesANDROID<'a> { + #[inline] + pub fn color_attachment_format(mut self, color_attachment_format: Format) -> Self { + self.color_attachment_format = color_attachment_format; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct LatencySleepModeInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub low_latency_mode: Bool32, + pub low_latency_boost: Bool32, + pub minimum_interval_us: u32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for LatencySleepModeInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + low_latency_mode: Bool32::default(), + low_latency_boost: Bool32::default(), + minimum_interval_us: u32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for LatencySleepModeInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::LATENCY_SLEEP_MODE_INFO_NV; +} +impl<'a> LatencySleepModeInfoNV<'a> { + #[inline] + pub fn low_latency_mode(mut self, low_latency_mode: bool) -> Self { + self.low_latency_mode = low_latency_mode.into(); + self + } + #[inline] + pub fn low_latency_boost(mut self, low_latency_boost: bool) -> Self { + self.low_latency_boost = low_latency_boost.into(); + self + } + #[inline] + pub fn minimum_interval_us(mut self, minimum_interval_us: u32) -> Self { + self.minimum_interval_us = minimum_interval_us; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct LatencySleepInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub signal_semaphore: Semaphore, + pub value: u64, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for LatencySleepInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + signal_semaphore: Semaphore::default(), + value: u64::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for LatencySleepInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::LATENCY_SLEEP_INFO_NV; +} +impl<'a> LatencySleepInfoNV<'a> { + #[inline] + pub fn signal_semaphore(mut self, signal_semaphore: Semaphore) -> Self { + self.signal_semaphore = signal_semaphore; + self + } + #[inline] + pub fn value(mut self, value: u64) -> Self { + self.value = value; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct SetLatencyMarkerInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub present_id: u64, + pub marker: LatencyMarkerNV, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for SetLatencyMarkerInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + present_id: u64::default(), + marker: LatencyMarkerNV::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for SetLatencyMarkerInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::SET_LATENCY_MARKER_INFO_NV; +} +impl<'a> SetLatencyMarkerInfoNV<'a> { + #[inline] + pub fn present_id(mut self, present_id: u64) -> Self { + self.present_id = present_id; + self + } + #[inline] + pub fn marker(mut self, marker: LatencyMarkerNV) -> Self { + self.marker = marker; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct GetLatencyMarkerInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_timings: *mut LatencyTimingsFrameReportNV<'a>, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for GetLatencyMarkerInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + p_timings: ::std::ptr::null_mut(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for GetLatencyMarkerInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::GET_LATENCY_MARKER_INFO_NV; +} +impl<'a> GetLatencyMarkerInfoNV<'a> { + #[inline] + pub fn timings(mut self, timings: &'a mut LatencyTimingsFrameReportNV<'a>) -> Self { + self.p_timings = timings; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct LatencyTimingsFrameReportNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub present_id: u64, + pub input_sample_time_us: u64, + pub sim_start_time_us: u64, + pub sim_end_time_us: u64, + pub render_submit_start_time_us: u64, + pub render_submit_end_time_us: u64, + pub present_start_time_us: u64, + pub present_end_time_us: u64, + pub driver_start_time_us: u64, + pub driver_end_time_us: u64, + pub os_render_queue_start_time_us: u64, + pub os_render_queue_end_time_us: u64, + pub gpu_render_start_time_us: u64, + pub gpu_render_end_time_us: u64, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for LatencyTimingsFrameReportNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + present_id: u64::default(), + input_sample_time_us: u64::default(), + sim_start_time_us: u64::default(), + sim_end_time_us: u64::default(), + render_submit_start_time_us: u64::default(), + render_submit_end_time_us: u64::default(), + present_start_time_us: u64::default(), + present_end_time_us: u64::default(), + driver_start_time_us: u64::default(), + driver_end_time_us: u64::default(), + os_render_queue_start_time_us: u64::default(), + os_render_queue_end_time_us: u64::default(), + gpu_render_start_time_us: u64::default(), + gpu_render_end_time_us: u64::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for LatencyTimingsFrameReportNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::LATENCY_TIMINGS_FRAME_REPORT_NV; +} +impl<'a> LatencyTimingsFrameReportNV<'a> { + #[inline] + pub fn present_id(mut self, present_id: u64) -> Self { + self.present_id = present_id; + self + } + #[inline] + pub fn input_sample_time_us(mut self, input_sample_time_us: u64) -> Self { + self.input_sample_time_us = input_sample_time_us; + self + } + #[inline] + pub fn sim_start_time_us(mut self, sim_start_time_us: u64) -> Self { + self.sim_start_time_us = sim_start_time_us; + self + } + #[inline] + pub fn sim_end_time_us(mut self, sim_end_time_us: u64) -> Self { + self.sim_end_time_us = sim_end_time_us; + self + } + #[inline] + pub fn render_submit_start_time_us(mut self, render_submit_start_time_us: u64) -> Self { + self.render_submit_start_time_us = render_submit_start_time_us; + self + } + #[inline] + pub fn render_submit_end_time_us(mut self, render_submit_end_time_us: u64) -> Self { + self.render_submit_end_time_us = render_submit_end_time_us; + self + } + #[inline] + pub fn present_start_time_us(mut self, present_start_time_us: u64) -> Self { + self.present_start_time_us = present_start_time_us; + self + } + #[inline] + pub fn present_end_time_us(mut self, present_end_time_us: u64) -> Self { + self.present_end_time_us = present_end_time_us; + self + } + #[inline] + pub fn driver_start_time_us(mut self, driver_start_time_us: u64) -> Self { + self.driver_start_time_us = driver_start_time_us; + self + } + #[inline] + pub fn driver_end_time_us(mut self, driver_end_time_us: u64) -> Self { + self.driver_end_time_us = driver_end_time_us; + self + } + #[inline] + pub fn os_render_queue_start_time_us(mut self, os_render_queue_start_time_us: u64) -> Self { + self.os_render_queue_start_time_us = os_render_queue_start_time_us; + self + } + #[inline] + pub fn os_render_queue_end_time_us(mut self, os_render_queue_end_time_us: u64) -> Self { + self.os_render_queue_end_time_us = os_render_queue_end_time_us; + self + } + #[inline] + pub fn gpu_render_start_time_us(mut self, gpu_render_start_time_us: u64) -> Self { + self.gpu_render_start_time_us = gpu_render_start_time_us; + self + } + #[inline] + pub fn gpu_render_end_time_us(mut self, gpu_render_end_time_us: u64) -> Self { + self.gpu_render_end_time_us = gpu_render_end_time_us; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct OutOfBandQueueTypeInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub queue_type: OutOfBandQueueTypeNV, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for OutOfBandQueueTypeInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + queue_type: OutOfBandQueueTypeNV::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for OutOfBandQueueTypeInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::OUT_OF_BAND_QUEUE_TYPE_INFO_NV; +} +impl<'a> OutOfBandQueueTypeInfoNV<'a> { + #[inline] + pub fn queue_type(mut self, queue_type: OutOfBandQueueTypeNV) -> Self { + self.queue_type = queue_type; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct LatencySubmissionPresentIdNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub present_id: u64, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for LatencySubmissionPresentIdNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + present_id: u64::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for LatencySubmissionPresentIdNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::LATENCY_SUBMISSION_PRESENT_ID_NV; +} +unsafe impl ExtendsSubmitInfo for LatencySubmissionPresentIdNV<'_> {} +unsafe impl ExtendsSubmitInfo2 for LatencySubmissionPresentIdNV<'_> {} +impl<'a> LatencySubmissionPresentIdNV<'a> { + #[inline] + pub fn present_id(mut self, present_id: u64) -> Self { + self.present_id = present_id; + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct SwapchainLatencyCreateInfoNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub latency_mode_enable: Bool32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for SwapchainLatencyCreateInfoNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + latency_mode_enable: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for SwapchainLatencyCreateInfoNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::SWAPCHAIN_LATENCY_CREATE_INFO_NV; +} +unsafe impl ExtendsSwapchainCreateInfoKHR for SwapchainLatencyCreateInfoNV<'_> {} +impl<'a> SwapchainLatencyCreateInfoNV<'a> { + #[inline] + pub fn latency_mode_enable(mut self, latency_mode_enable: bool) -> Self { + self.latency_mode_enable = latency_mode_enable.into(); + self + } +} +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct LatencySurfaceCapabilitiesNV<'a> { + pub s_type: StructureType, + pub p_next: *const c_void, + pub present_mode_count: u32, + pub p_present_modes: *mut PresentModeKHR, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for LatencySurfaceCapabilitiesNV<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null(), + present_mode_count: u32::default(), + p_present_modes: ::std::ptr::null_mut(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for LatencySurfaceCapabilitiesNV<'a> { + const STRUCTURE_TYPE: StructureType = StructureType::LATENCY_SURFACE_CAPABILITIES_NV; +} +unsafe impl ExtendsSurfaceCapabilities2KHR for LatencySurfaceCapabilitiesNV<'_> {} +impl<'a> LatencySurfaceCapabilitiesNV<'a> { + #[inline] + pub fn present_modes(mut self, present_modes: &'a mut [PresentModeKHR]) -> Self { + self.present_mode_count = present_modes.len() as _; + self.p_present_modes = present_modes.as_mut_ptr(); + self + } +} diff --git a/ash/src/vk/enums.rs b/ash/src/vk/enums.rs index 846cb6595..873ec2971 100644 --- a/ash/src/vk/enums.rs +++ b/ash/src/vk/enums.rs @@ -1812,6 +1812,8 @@ impl DriverId { pub const MESA_NVK: Self = Self(24); #[doc = "Imagination Technologies"] pub const IMAGINATION_OPEN_SOURCE_MESA: Self = Self(25); + #[doc = "Mesa open source project"] + pub const MESA_AGXV: Self = Self(26); } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] @@ -2858,6 +2860,52 @@ impl LayeredDriverUnderlyingApiMSFT { pub const NONE: Self = Self(0); pub const D3D12: Self = Self(1); } +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +#[doc = ""] +pub struct LatencyMarkerNV(pub(crate) i32); +impl LatencyMarkerNV { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl LatencyMarkerNV { + pub const SIMULATION_START: Self = Self(0); + pub const SIMULATION_END: Self = Self(1); + pub const RENDERSUBMIT_START: Self = Self(2); + pub const RENDERSUBMIT_END: Self = Self(3); + pub const PRESENT_START: Self = Self(4); + pub const PRESENT_END: Self = Self(5); + pub const INPUT_SAMPLE: Self = Self(6); + pub const TRIGGER_FLASH: Self = Self(7); + pub const OUT_OF_BAND_RENDERSUBMIT_START: Self = Self(8); + pub const OUT_OF_BAND_RENDERSUBMIT_END: Self = Self(9); + pub const OUT_OF_BAND_PRESENT_START: Self = Self(10); + pub const OUT_OF_BAND_PRESENT_END: Self = Self(11); +} +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +#[doc = ""] +pub struct OutOfBandQueueTypeNV(pub(crate) i32); +impl OutOfBandQueueTypeNV { + #[inline] + pub const fn from_raw(x: i32) -> Self { + Self(x) + } + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl OutOfBandQueueTypeNV { + pub const RENDER: Self = Self(0); + pub const PRESENT: Self = Self(1); +} 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 53b35859f..bab4fe7ea 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -19808,6 +19808,25 @@ impl PipelineCreateFlags { impl StructureType { pub const PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT: Self = Self(1_000_466_000); } +impl AndroidExternalFormatResolveFn { + pub const NAME: &'static ::std::ffi::CStr = unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_ANDROID_external_format_resolve\0") + }; + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +pub struct AndroidExternalFormatResolveFn; +#[doc = "Generated from 'VK_ANDROID_external_format_resolve'"] +impl ResolveModeFlags { + pub const EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID: Self = Self(0b1_0000); +} +#[doc = "Generated from 'VK_ANDROID_external_format_resolve'"] +impl StructureType { + pub const PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID: Self = Self(1_000_468_000); + pub const PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID: Self = + Self(1_000_468_001); + pub const ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID: Self = Self(1_000_468_002); +} impl KhrMaintenance5Fn { pub const NAME: &'static ::std::ffi::CStr = unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_maintenance5\0") }; @@ -21411,6 +21430,166 @@ impl StructureType { pub const PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: Self = Self(1_000_499_000); } +impl NvLowLatency2Fn { + pub const NAME: &'static ::std::ffi::CStr = + unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_low_latency2\0") }; + pub const SPEC_VERSION: u32 = 1u32; +} +#[allow(non_camel_case_types)] +pub type PFN_vkSetLatencySleepModeNV = unsafe extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_sleep_mode_info: *mut LatencySleepModeInfoNV, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkLatencySleepNV = unsafe extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_sleep_info: *mut LatencySleepInfoNV, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkSetLatencyMarkerNV = unsafe extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_latency_marker_info: *mut SetLatencyMarkerInfoNV, +); +#[allow(non_camel_case_types)] +pub type PFN_vkGetLatencyTimingsNV = unsafe extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_timing_count: *mut u32, + p_latency_marker_info: *mut GetLatencyMarkerInfoNV, +); +#[allow(non_camel_case_types)] +pub type PFN_vkQueueNotifyOutOfBandNV = + unsafe extern "system" fn(queue: Queue, p_queue_type_info: OutOfBandQueueTypeInfoNV); +#[derive(Clone)] +pub struct NvLowLatency2Fn { + pub set_latency_sleep_mode_nv: PFN_vkSetLatencySleepModeNV, + pub latency_sleep_nv: PFN_vkLatencySleepNV, + pub set_latency_marker_nv: PFN_vkSetLatencyMarkerNV, + pub get_latency_timings_nv: PFN_vkGetLatencyTimingsNV, + pub queue_notify_out_of_band_nv: PFN_vkQueueNotifyOutOfBandNV, +} +unsafe impl Send for NvLowLatency2Fn {} +unsafe impl Sync for NvLowLatency2Fn {} +impl NvLowLatency2Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + Self { + set_latency_sleep_mode_nv: unsafe { + unsafe extern "system" fn set_latency_sleep_mode_nv( + _device: Device, + _swapchain: SwapchainKHR, + _p_sleep_mode_info: *mut LatencySleepModeInfoNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(set_latency_sleep_mode_nv) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkSetLatencySleepModeNV\0"); + let val = _f(cname); + if val.is_null() { + set_latency_sleep_mode_nv + } else { + ::std::mem::transmute(val) + } + }, + latency_sleep_nv: unsafe { + unsafe extern "system" fn latency_sleep_nv( + _device: Device, + _swapchain: SwapchainKHR, + _p_sleep_info: *mut LatencySleepInfoNV, + ) -> Result { + panic!(concat!("Unable to load ", stringify!(latency_sleep_nv))) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkLatencySleepNV\0"); + let val = _f(cname); + if val.is_null() { + latency_sleep_nv + } else { + ::std::mem::transmute(val) + } + }, + set_latency_marker_nv: unsafe { + unsafe extern "system" fn set_latency_marker_nv( + _device: Device, + _swapchain: SwapchainKHR, + _p_latency_marker_info: *mut SetLatencyMarkerInfoNV, + ) { + panic!(concat!( + "Unable to load ", + stringify!(set_latency_marker_nv) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkSetLatencyMarkerNV\0"); + let val = _f(cname); + if val.is_null() { + set_latency_marker_nv + } else { + ::std::mem::transmute(val) + } + }, + get_latency_timings_nv: unsafe { + unsafe extern "system" fn get_latency_timings_nv( + _device: Device, + _swapchain: SwapchainKHR, + _p_timing_count: *mut u32, + _p_latency_marker_info: *mut GetLatencyMarkerInfoNV, + ) { + panic!(concat!( + "Unable to load ", + stringify!(get_latency_timings_nv) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkGetLatencyTimingsNV\0"); + let val = _f(cname); + if val.is_null() { + get_latency_timings_nv + } else { + ::std::mem::transmute(val) + } + }, + queue_notify_out_of_band_nv: unsafe { + unsafe extern "system" fn queue_notify_out_of_band_nv( + _queue: Queue, + _p_queue_type_info: OutOfBandQueueTypeInfoNV, + ) { + panic!(concat!( + "Unable to load ", + stringify!(queue_notify_out_of_band_nv) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkQueueNotifyOutOfBandNV\0"); + let val = _f(cname); + if val.is_null() { + queue_notify_out_of_band_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } +} +#[doc = "Generated from 'VK_NV_low_latency2'"] +impl StructureType { + pub const LATENCY_SLEEP_MODE_INFO_NV: Self = Self(1_000_505_000); + pub const LATENCY_SLEEP_INFO_NV: Self = Self(1_000_505_001); + pub const SET_LATENCY_MARKER_INFO_NV: Self = Self(1_000_505_002); + pub const GET_LATENCY_MARKER_INFO_NV: Self = Self(1_000_505_003); + pub const LATENCY_TIMINGS_FRAME_REPORT_NV: Self = Self(1_000_505_004); + pub const LATENCY_SUBMISSION_PRESENT_ID_NV: Self = Self(1_000_505_005); + pub const OUT_OF_BAND_QUEUE_TYPE_INFO_NV: Self = Self(1_000_505_006); + pub const SWAPCHAIN_LATENCY_CREATE_INFO_NV: Self = Self(1_000_505_007); + pub const LATENCY_SURFACE_CAPABILITIES_NV: Self = Self(1_000_505_008); +} impl KhrCooperativeMatrixFn { pub const NAME: &'static ::std::ffi::CStr = unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_cooperative_matrix\0") }; diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index fff6d143c..7e6913801 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit fff6d143cc4dccb5959db63c85c7b01406e0d333 +Subproject commit 7e691380166fb1cd9b193ac9db896bc23a4ea9ad