Update Vulkan-Headers to 1.3.271 (#816)
* Update Vulkan-Headers to 1.3.270 * Update Vulkan-Headers to 1.3.271 * extensions/nv/low_latency2: Support extension revision 2 Upon request the VK_NV_low_latency2 spec and API has been updated to move the count pointer from the `vkGetLatencyTimingsNV()` function to the `vkGetLatencyMarkerInfoNV` struct where the array pointer already resided. This got uncovered when it was realized that the `latency_marker_info` argument isn't an array at all (which the original design of this extension suggested), but a pointer to a single struct that _contains_ a pointer to an array, with the length passed as a separate argument to the function instead. The move of this count argument to a struct field - together with proper array length annotations - gets our generator to automatically emit a setter based on a slice argument.
This commit is contained in:
parent
ccf6be8be3
commit
5938fd2633
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "ash"
|
||||
version = "0.37.0+1.3.269"
|
||||
version = "0.37.0+1.3.271"
|
||||
authors = [
|
||||
"Maik Klein <maikklein@googlemail.com>",
|
||||
"Benjamin Saunders <ben.e.saunders@gmail.com>",
|
||||
|
|
|
@ -4,7 +4,6 @@ use crate::RawPtr;
|
|||
use crate::{Device, Instance};
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_NV_low_latency2.html>
|
||||
#[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
|
||||
}
|
||||
|
||||
/// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetLatencyTimingsNV.html>
|
||||
///
|
||||
/// 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)
|
||||
}
|
||||
|
||||
/// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueNotifyOutOfBandNV.html>
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ pub const API_VERSION_1_2: u32 = make_api_version(0, 1, 2, 0);
|
|||
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_API_VERSION_1_3.html>"]
|
||||
pub const API_VERSION_1_3: u32 = make_api_version(0, 1, 3, 0);
|
||||
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_HEADER_VERSION.html>"]
|
||||
pub const HEADER_VERSION: u32 = 269;
|
||||
pub const HEADER_VERSION: u32 = 271;
|
||||
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_HEADER_VERSION_COMPLETE.html>"]
|
||||
pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 3, HEADER_VERSION);
|
||||
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkSampleMask.html>"]
|
||||
|
@ -49770,7 +49770,7 @@ impl<'a> DirectDriverLoadingInfoLUNARG<'a> {
|
|||
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkDirectDriverLoadingListLUNARG.html>"]
|
||||
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 = "<https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.html>"]
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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!(
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 374f9fd97520f6dd1b80745de09208d878ab4a52
|
||||
Subproject commit 9d27c893cdfc8d96bc8ad5f6f4d88743f958305e
|
Loading…
Reference in a new issue