diff --git a/Changelog.md b/Changelog.md index 00b6b1230..13d9cd84a 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.269 (#760, #763, #783) +- Update Vulkan-Headers to 1.3.271 (#760, #763, #783, #816) - 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 19952f37b..e27f2280a 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.37.0+1.3.269" +version = "0.37.0+1.3.271" authors = [ "Maik Klein ", "Benjamin Saunders ", diff --git a/ash/src/extensions/nv/low_latency2.rs b/ash/src/extensions/nv/low_latency2.rs index 88a1f9233..76a6720bc 100644 --- a/ash/src/extensions/nv/low_latency2.rs +++ b/ash/src/extensions/nv/low_latency2.rs @@ -4,7 +4,6 @@ use crate::RawPtr; use crate::{Device, Instance}; use std::ffi::CStr; use std::mem; -use std::ptr; /// #[derive(Clone)] @@ -53,32 +52,14 @@ impl LowLatency2 { (self.fp.set_latency_marker_nv)(self.handle, swapchain, latency_marker_info) } - /// Retrieve the number of elements to pass to [`get_latency_timings()`][Self::get_latency_timings()] - #[inline] - pub unsafe fn get_latency_timings_len(&self, swapchain: vk::SwapchainKHR) -> usize { - let mut count = 0; - (self.fp.get_latency_timings_nv)(self.handle, swapchain, &mut count, ptr::null_mut()); - count as usize - } - /// - /// - /// Call [`get_latency_timings_len()`][Self::get_latency_timings_len()] to query the number of elements to pass to `latency_marker_info`. - /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. #[inline] pub unsafe fn get_latency_timings( &self, swapchain: vk::SwapchainKHR, - latency_marker_info: &mut [vk::GetLatencyMarkerInfoNV<'_>], + latency_marker_info: &mut vk::GetLatencyMarkerInfoNV<'_>, ) { - let mut count = latency_marker_info.len() as u32; - (self.fp.get_latency_timings_nv)( - self.handle, - swapchain, - &mut count, - latency_marker_info.as_mut_ptr(), - ); - assert_eq!(count as usize, latency_marker_info.len()); + (self.fp.get_latency_timings_nv)(self.handle, swapchain, latency_marker_info) } /// diff --git a/ash/src/vk/const_debugs.rs b/ash/src/vk/const_debugs.rs index c7b2b6145..af86517d7 100644 --- a/ash/src/vk/const_debugs.rs +++ b/ash/src/vk/const_debugs.rs @@ -5272,6 +5272,9 @@ impl fmt::Debug for StructureType { Some("PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT") } Self::HDR_METADATA_EXT => Some("HDR_METADATA_EXT"), + Self::PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG => { + Some("PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG") + } Self::SHARED_PRESENT_SURFACE_CAPABILITIES_KHR => { Some("SHARED_PRESENT_SURFACE_CAPABILITIES_KHR") } diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index d9f9dc5bb..a3b4de47f 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 = 269; +pub const HEADER_VERSION: u32 = 271; #[doc = ""] pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 3, HEADER_VERSION); #[doc = ""] @@ -49770,7 +49770,7 @@ impl<'a> DirectDriverLoadingInfoLUNARG<'a> { #[doc = ""] pub struct DirectDriverLoadingListLUNARG<'a> { pub s_type: StructureType, - pub p_next: *mut c_void, + pub p_next: *const c_void, pub mode: DirectDriverLoadingModeLUNARG, pub driver_count: u32, pub p_drivers: *const DirectDriverLoadingInfoLUNARG<'a>, @@ -49781,7 +49781,7 @@ impl ::std::default::Default for DirectDriverLoadingListLUNARG<'_> { fn default() -> Self { Self { s_type: Self::STRUCTURE_TYPE, - p_next: ::std::ptr::null_mut(), + p_next: ::std::ptr::null(), mode: DirectDriverLoadingModeLUNARG::default(), driver_count: u32::default(), p_drivers: ::std::ptr::null(), @@ -51872,6 +51872,7 @@ impl<'a> SetLatencyMarkerInfoNV<'a> { pub struct GetLatencyMarkerInfoNV<'a> { pub s_type: StructureType, pub p_next: *const c_void, + pub timing_count: u32, pub p_timings: *mut LatencyTimingsFrameReportNV<'a>, pub _marker: PhantomData<&'a ()>, } @@ -51881,6 +51882,7 @@ impl ::std::default::Default for GetLatencyMarkerInfoNV<'_> { Self { s_type: Self::STRUCTURE_TYPE, p_next: ::std::ptr::null(), + timing_count: u32::default(), p_timings: ::std::ptr::null_mut(), _marker: PhantomData, } @@ -51891,8 +51893,9 @@ unsafe impl<'a> TaggedStructure for GetLatencyMarkerInfoNV<'a> { } impl<'a> GetLatencyMarkerInfoNV<'a> { #[inline] - pub fn timings(mut self, timings: &'a mut LatencyTimingsFrameReportNV<'a>) -> Self { - self.p_timings = timings; + pub fn timings(mut self, timings: &'a mut [LatencyTimingsFrameReportNV<'a>]) -> Self { + self.timing_count = timings.len() as _; + self.p_timings = timings.as_mut_ptr(); self } } @@ -52327,3 +52330,40 @@ impl<'a> PhysicalDeviceSchedulingControlsPropertiesARM<'a> { self } } +#[repr(C)] +#[cfg_attr(feature = "debug", derive(Debug))] +#[derive(Copy, Clone)] +#[doc = ""] +pub struct PhysicalDeviceRelaxedLineRasterizationFeaturesIMG<'a> { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub relaxed_line_rasterization: Bool32, + pub _marker: PhantomData<&'a ()>, +} +impl ::std::default::Default for PhysicalDeviceRelaxedLineRasterizationFeaturesIMG<'_> { + #[inline] + fn default() -> Self { + Self { + s_type: Self::STRUCTURE_TYPE, + p_next: ::std::ptr::null_mut(), + relaxed_line_rasterization: Bool32::default(), + _marker: PhantomData, + } + } +} +unsafe impl<'a> TaggedStructure for PhysicalDeviceRelaxedLineRasterizationFeaturesIMG<'a> { + const STRUCTURE_TYPE: StructureType = + StructureType::PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG; +} +unsafe impl ExtendsPhysicalDeviceFeatures2 + for PhysicalDeviceRelaxedLineRasterizationFeaturesIMG<'_> +{ +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceRelaxedLineRasterizationFeaturesIMG<'_> {} +impl<'a> PhysicalDeviceRelaxedLineRasterizationFeaturesIMG<'a> { + #[inline] + pub fn relaxed_line_rasterization(mut self, relaxed_line_rasterization: bool) -> Self { + self.relaxed_line_rasterization = relaxed_line_rasterization.into(); + self + } +} diff --git a/ash/src/vk/extensions.rs b/ash/src/vk/extensions.rs index 882d79385..d66bbebcc 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -5703,6 +5703,18 @@ impl StructureType { pub const SUBPASS_BEGIN_INFO_KHR: Self = Self::SUBPASS_BEGIN_INFO; pub const SUBPASS_END_INFO_KHR: Self = Self::SUBPASS_END_INFO; } +impl ImgRelaxedLineRasterizationFn { + pub const NAME: &'static ::std::ffi::CStr = unsafe { + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_IMG_relaxed_line_rasterization\0") + }; + pub const SPEC_VERSION: u32 = 1u32; +} +#[derive(Clone)] +pub struct ImgRelaxedLineRasterizationFn; +#[doc = "Generated from 'VK_IMG_relaxed_line_rasterization'"] +impl StructureType { + pub const PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG: Self = Self(1_000_110_000); +} impl KhrSharedPresentableImageFn { pub const NAME: &'static ::std::ffi::CStr = unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_KHR_shared_presentable_image\0") @@ -21711,7 +21723,7 @@ impl StructureType { 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; + pub const SPEC_VERSION: u32 = 2u32; } #[allow(non_camel_case_types)] pub type PFN_vkSetLatencySleepModeNV = unsafe extern "system" fn( @@ -21735,7 +21747,6 @@ pub type PFN_vkSetLatencyMarkerNV = unsafe extern "system" fn( 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)] @@ -21817,7 +21828,6 @@ impl NvLowLatency2Fn { 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!( diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index 374f9fd97..9d27c893c 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit 374f9fd97520f6dd1b80745de09208d878ab4a52 +Subproject commit 9d27c893cdfc8d96bc8ad5f6f4d88743f958305e