Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Vulkan-Headers to 1.3.271 #816

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ash"
version = "0.37.0+1.3.269"
version = "0.37.0+1.3.271"
authors = [
"Maik Klein <[email protected]>",
"Benjamin Saunders <[email protected]>",
Expand Down
23 changes: 2 additions & 21 deletions ash/src/extensions/nv/low_latency2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions ash/src/vk/const_debugs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
50 changes: 45 additions & 5 deletions ash/src/vk/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>"]
Expand Down Expand Up @@ -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>,
Expand All @@ -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(),
Expand Down Expand Up @@ -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 ()>,
}
Expand All @@ -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,
}
Expand All @@ -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();
Comment on lines +51896 to +51898
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the lifetime here makes the function useless, and we have to solve that in some way before merging this.

More context: #815 (comment)

self
}
}
Expand Down Expand Up @@ -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
}
}
16 changes: 13 additions & 3 deletions ash/src/vk/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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(
Expand All @@ -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)]
Expand Down Expand Up @@ -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!(
Expand Down