Update Vulkan-Headers to 1.2.184 (#454)

* generator: Fix Rust 1.53 clippy lints

* temporary: Allow bindgen nullptr dereference in layout tests

* Update Vulkan-Headers to 1.2.182

* extensions/ext: Add properties-getter for PhysicalDeviceDrmPropertiesEXT

* Update Vulkan-Headers to 1.2.183

* Remove upstream-fixed vk_platform.h header path fallback

Fixed in https://github.com/KhronosGroup/Vulkan-Docs/pull/1538

* Update Vulkan-Headers to 1.2.184
This commit is contained in:
Marijn Suijten 2021-07-09 11:55:20 +02:00 committed by GitHub
parent a75d8e7e88
commit 2045e38e84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 1794 additions and 103 deletions

View file

@ -7,6 +7,7 @@ pub use self::debug_utils::DebugUtils;
pub use self::extended_dynamic_state::ExtendedDynamicState; pub use self::extended_dynamic_state::ExtendedDynamicState;
pub use self::full_screen_exclusive::FullScreenExclusive; pub use self::full_screen_exclusive::FullScreenExclusive;
pub use self::metal_surface::MetalSurface; pub use self::metal_surface::MetalSurface;
pub use self::physical_device_drm::PhysicalDeviceDrm;
pub use self::tooling_info::ToolingInfo; pub use self::tooling_info::ToolingInfo;
mod buffer_device_address; mod buffer_device_address;
@ -18,4 +19,5 @@ mod debug_utils;
mod extended_dynamic_state; mod extended_dynamic_state;
mod full_screen_exclusive; mod full_screen_exclusive;
mod metal_surface; mod metal_surface;
mod physical_device_drm;
mod tooling_info; mod tooling_info;

View file

@ -0,0 +1,24 @@
use crate::vk;
use crate::Instance;
use std::ffi::CStr;
#[derive(Clone)]
pub struct PhysicalDeviceDrm;
impl PhysicalDeviceDrm {
pub unsafe fn get_properties(
instance: &Instance,
pdevice: vk::PhysicalDevice,
) -> vk::PhysicalDeviceDrmPropertiesEXT {
let mut props_drm = vk::PhysicalDeviceDrmPropertiesEXT::default();
{
let mut props = vk::PhysicalDeviceProperties2::builder().push_next(&mut props_drm);
instance.get_physical_device_properties2(pdevice, &mut props);
}
props_drm
}
pub fn name() -> &'static CStr {
vk::ExtPhysicalDeviceDrmFn::name()
}
}

View file

@ -26,6 +26,7 @@ mod features;
pub use features::*; pub use features::*;
#[doc = r" Native bindings from Vulkan headers, generated by bindgen"] #[doc = r" Native bindings from Vulkan headers, generated by bindgen"]
#[allow(nonstandard_style)] #[allow(nonstandard_style)]
#[allow(deref_nullptr)]
pub mod native; pub mod native;
mod platform_types; mod platform_types;
pub use platform_types::*; pub use platform_types::*;

View file

@ -65,8 +65,8 @@ impl fmt::Debug for AccelerationStructureCreateFlagsKHR {
"DEVICE_ADDRESS_CAPTURE_REPLAY", "DEVICE_ADDRESS_CAPTURE_REPLAY",
), ),
( (
AccelerationStructureCreateFlagsKHR::RESERVED_2_NV.0, AccelerationStructureCreateFlagsKHR::MOTION_NV.0,
"RESERVED_2_NV", "MOTION_NV",
), ),
]; ];
debug_flags(f, KNOWN, self.0) debug_flags(f, KNOWN, self.0)
@ -87,6 +87,33 @@ impl fmt::Debug for AccelerationStructureMemoryRequirementsTypeNV {
} }
} }
} }
impl fmt::Debug for AccelerationStructureMotionInfoFlagsNV {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[];
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for AccelerationStructureMotionInstanceFlagsNV {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[];
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for AccelerationStructureMotionInstanceTypeNV {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::STATIC => Some("STATIC"),
Self::MATRIX_MOTION => Some("MATRIX_MOTION"),
Self::SRT_MOTION => Some("SRT_MOTION"),
_ => None,
};
if let Some(x) = name {
f.write_str(x)
} else {
self.0.fmt(f)
}
}
}
impl fmt::Debug for AccelerationStructureTypeKHR { impl fmt::Debug for AccelerationStructureTypeKHR {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self { let name = match *self {
@ -587,10 +614,7 @@ impl fmt::Debug for BuildAccelerationStructureFlagsKHR {
BuildAccelerationStructureFlagsKHR::LOW_MEMORY.0, BuildAccelerationStructureFlagsKHR::LOW_MEMORY.0,
"LOW_MEMORY", "LOW_MEMORY",
), ),
( (BuildAccelerationStructureFlagsKHR::MOTION_NV.0, "MOTION_NV"),
BuildAccelerationStructureFlagsKHR::RESERVED_5_NV.0,
"RESERVED_5_NV",
),
]; ];
debug_flags(f, KNOWN, self.0) debug_flags(f, KNOWN, self.0)
} }
@ -1463,8 +1487,8 @@ impl fmt::Debug for ExternalMemoryHandleTypeFlags {
"ZIRCON_VMO_FUCHSIA", "ZIRCON_VMO_FUCHSIA",
), ),
( (
ExternalMemoryHandleTypeFlags::RESERVED_12_NV.0, ExternalMemoryHandleTypeFlags::RDMA_ADDRESS_NV.0,
"RESERVED_12_NV", "RDMA_ADDRESS_NV",
), ),
( (
ExternalMemoryHandleTypeFlags::RESERVED_13_NV.0, ExternalMemoryHandleTypeFlags::RESERVED_13_NV.0,
@ -2457,7 +2481,7 @@ impl fmt::Debug for MemoryPropertyFlags {
MemoryPropertyFlags::DEVICE_UNCACHED_AMD.0, MemoryPropertyFlags::DEVICE_UNCACHED_AMD.0,
"DEVICE_UNCACHED_AMD", "DEVICE_UNCACHED_AMD",
), ),
(MemoryPropertyFlags::RESERVED_8_NV.0, "RESERVED_8_NV"), (MemoryPropertyFlags::RDMA_CAPABLE_NV.0, "RDMA_CAPABLE_NV"),
(MemoryPropertyFlags::PROTECTED.0, "PROTECTED"), (MemoryPropertyFlags::PROTECTED.0, "PROTECTED"),
]; ];
debug_flags(f, KNOWN, self.0) debug_flags(f, KNOWN, self.0)
@ -2691,6 +2715,7 @@ impl fmt::Debug for PipelineBindPoint {
Self::GRAPHICS => Some("GRAPHICS"), Self::GRAPHICS => Some("GRAPHICS"),
Self::COMPUTE => Some("COMPUTE"), Self::COMPUTE => Some("COMPUTE"),
Self::RAY_TRACING_KHR => Some("RAY_TRACING_KHR"), Self::RAY_TRACING_KHR => Some("RAY_TRACING_KHR"),
Self::SUBPASS_SHADING_HUAWEI => Some("SUBPASS_SHADING_HUAWEI"),
_ => None, _ => None,
}; };
if let Some(x) = name { if let Some(x) = name {
@ -2822,7 +2847,10 @@ impl fmt::Debug for PipelineCreateFlags {
), ),
(PipelineCreateFlags::RESERVED_23_AMD.0, "RESERVED_23_AMD"), (PipelineCreateFlags::RESERVED_23_AMD.0, "RESERVED_23_AMD"),
(PipelineCreateFlags::RESERVED_10_AMD.0, "RESERVED_10_AMD"), (PipelineCreateFlags::RESERVED_10_AMD.0, "RESERVED_10_AMD"),
(PipelineCreateFlags::RESERVED_20_NV.0, "RESERVED_20_NV"), (
PipelineCreateFlags::RAY_TRACING_ALLOW_MOTION_NV.0,
"RAY_TRACING_ALLOW_MOTION_NV",
),
( (
PipelineCreateFlags::VIEW_INDEX_FROM_DEVICE_INDEX.0, PipelineCreateFlags::VIEW_INDEX_FROM_DEVICE_INDEX.0,
"VIEW_INDEX_FROM_DEVICE_INDEX", "VIEW_INDEX_FROM_DEVICE_INDEX",
@ -3101,6 +3129,10 @@ impl fmt::Debug for PipelineStageFlags2KHR {
), ),
(PipelineStageFlags2KHR::TASK_SHADER_NV.0, "TASK_SHADER_NV"), (PipelineStageFlags2KHR::TASK_SHADER_NV.0, "TASK_SHADER_NV"),
(PipelineStageFlags2KHR::MESH_SHADER_NV.0, "MESH_SHADER_NV"), (PipelineStageFlags2KHR::MESH_SHADER_NV.0, "MESH_SHADER_NV"),
(
PipelineStageFlags2KHR::SUBPASS_SHADING_HUAWEI.0,
"SUBPASS_SHADING_HUAWEI",
),
( (
PipelineStageFlags2KHR::RESERVED_40_HUAWEI.0, PipelineStageFlags2KHR::RESERVED_40_HUAWEI.0,
"RESERVED_40_HUAWEI", "RESERVED_40_HUAWEI",
@ -3735,6 +3767,10 @@ impl fmt::Debug for ShaderStageFlags {
(ShaderStageFlags::CALLABLE_KHR.0, "CALLABLE_KHR"), (ShaderStageFlags::CALLABLE_KHR.0, "CALLABLE_KHR"),
(ShaderStageFlags::TASK_NV.0, "TASK_NV"), (ShaderStageFlags::TASK_NV.0, "TASK_NV"),
(ShaderStageFlags::MESH_NV.0, "MESH_NV"), (ShaderStageFlags::MESH_NV.0, "MESH_NV"),
(
ShaderStageFlags::SUBPASS_SHADING_HUAWEI.0,
"SUBPASS_SHADING_HUAWEI",
),
]; ];
debug_flags(f, KNOWN, self.0) debug_flags(f, KNOWN, self.0)
} }
@ -4720,6 +4756,15 @@ impl fmt::Debug for StructureType {
Self::PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV => { Self::PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV => {
Some("PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV") Some("PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV")
} }
Self::ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV => {
Some("ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV")
}
Self::PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV => {
Some("PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV")
}
Self::ACCELERATION_STRUCTURE_MOTION_INFO_NV => {
Some("ACCELERATION_STRUCTURE_MOTION_INFO_NV")
}
Self::PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT => { Self::PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT") Some("PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT")
} }
@ -4766,6 +4811,7 @@ impl fmt::Debug for StructureType {
Self::VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT => { Self::VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT => {
Some("VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT") Some("VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT")
} }
Self::PHYSICAL_DEVICE_DRM_PROPERTIES_EXT => Some("PHYSICAL_DEVICE_DRM_PROPERTIES_EXT"),
Self::IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA => { Self::IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA => {
Some("IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA") Some("IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA")
} }
@ -4781,6 +4827,19 @@ impl fmt::Debug for StructureType {
Self::SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA => { Self::SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA => {
Some("SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA") Some("SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA")
} }
Self::SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI => {
Some("SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI")
}
Self::PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI => {
Some("PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI")
}
Self::PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI => {
Some("PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI")
}
Self::MEMORY_GET_REMOTE_ADDRESS_INFO_NV => Some("MEMORY_GET_REMOTE_ADDRESS_INFO_NV"),
Self::PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV => {
Some("PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV")
}
Self::PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT => { Self::PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT") Some("PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT")
} }
@ -4797,6 +4856,12 @@ impl fmt::Debug for StructureType {
Self::QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT => { Self::QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT => {
Some("QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT") Some("QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT")
} }
Self::PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT")
}
Self::PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT => {
Some("PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT")
}
Self::PHYSICAL_DEVICE_SUBGROUP_PROPERTIES => { Self::PHYSICAL_DEVICE_SUBGROUP_PROPERTIES => {
Some("PHYSICAL_DEVICE_SUBGROUP_PROPERTIES") Some("PHYSICAL_DEVICE_SUBGROUP_PROPERTIES")
} }

File diff suppressed because it is too large Load diff

View file

@ -2209,6 +2209,23 @@ impl ProvokingVertexModeEXT {
} }
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)] #[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureMotionInstanceTypeNV.html>"]
pub struct AccelerationStructureMotionInstanceTypeNV(pub(crate) i32);
impl AccelerationStructureMotionInstanceTypeNV {
pub const fn from_raw(x: i32) -> Self {
AccelerationStructureMotionInstanceTypeNV(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl AccelerationStructureMotionInstanceTypeNV {
pub const STATIC: Self = Self(0);
pub const MATRIX_MOTION: Self = Self(1);
pub const SRT_MOTION: Self = Self(2);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryResultStatusKHR.html>"] #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryResultStatusKHR.html>"]
pub struct QueryResultStatusKHR(pub(crate) i32); pub struct QueryResultStatusKHR(pub(crate) i32);
impl QueryResultStatusKHR { impl QueryResultStatusKHR {

View file

@ -20497,23 +20497,97 @@ impl StructureType {
impl StructureType { impl StructureType {
pub const DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT: Self = Self(1_000_284_002); pub const DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT: Self = Self(1_000_284_002);
} }
impl ExtExtension286Fn { impl ExtAcquireDrmDisplayFn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_286\0") ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_acquire_drm_display\0")
.expect("Wrong extension string") .expect("Wrong extension string")
} }
pub const SPEC_VERSION: u32 = 0u32; pub const SPEC_VERSION: u32 = 1u32;
} }
#[allow(non_camel_case_types)]
pub type PFN_vkAcquireDrmDisplayEXT = unsafe extern "system" fn(
physical_device: PhysicalDevice,
drm_fd: i32,
display: DisplayKHR,
) -> Result;
#[allow(non_camel_case_types)]
pub type PFN_vkGetDrmDisplayEXT = unsafe extern "system" fn(
physical_device: PhysicalDevice,
drm_fd: i32,
connector_id: u32,
display: *mut DisplayKHR,
) -> Result;
#[derive(Clone)] #[derive(Clone)]
pub struct ExtExtension286Fn {} pub struct ExtAcquireDrmDisplayFn {
unsafe impl Send for ExtExtension286Fn {} pub acquire_drm_display_ext: PFN_vkAcquireDrmDisplayEXT,
unsafe impl Sync for ExtExtension286Fn {} pub get_drm_display_ext: PFN_vkGetDrmDisplayEXT,
impl ExtExtension286Fn { }
unsafe impl Send for ExtAcquireDrmDisplayFn {}
unsafe impl Sync for ExtAcquireDrmDisplayFn {}
impl ExtAcquireDrmDisplayFn {
pub fn load<F>(mut _f: F) -> Self pub fn load<F>(mut _f: F) -> Self
where where
F: FnMut(&::std::ffi::CStr) -> *const c_void, F: FnMut(&::std::ffi::CStr) -> *const c_void,
{ {
ExtExtension286Fn {} ExtAcquireDrmDisplayFn {
acquire_drm_display_ext: unsafe {
unsafe extern "system" fn acquire_drm_display_ext(
_physical_device: PhysicalDevice,
_drm_fd: i32,
_display: DisplayKHR,
) -> Result {
panic!(concat!(
"Unable to load ",
stringify!(acquire_drm_display_ext)
))
}
let cname =
::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkAcquireDrmDisplayEXT\0");
let val = _f(cname);
if val.is_null() {
acquire_drm_display_ext
} else {
::std::mem::transmute(val)
}
},
get_drm_display_ext: unsafe {
unsafe extern "system" fn get_drm_display_ext(
_physical_device: PhysicalDevice,
_drm_fd: i32,
_connector_id: u32,
_display: *mut DisplayKHR,
) -> Result {
panic!(concat!("Unable to load ", stringify!(get_drm_display_ext)))
}
let cname =
::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkGetDrmDisplayEXT\0");
let val = _f(cname);
if val.is_null() {
get_drm_display_ext
} else {
::std::mem::transmute(val)
}
},
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkAcquireDrmDisplayEXT.html>"]
pub unsafe fn acquire_drm_display_ext(
&self,
physical_device: PhysicalDevice,
drm_fd: i32,
display: DisplayKHR,
) -> Result {
(self.acquire_drm_display_ext)(physical_device, drm_fd, display)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDrmDisplayEXT.html>"]
pub unsafe fn get_drm_display_ext(
&self,
physical_device: PhysicalDevice,
drm_fd: i32,
connector_id: u32,
display: *mut DisplayKHR,
) -> Result {
(self.get_drm_display_ext)(physical_device, drm_fd, connector_id, display)
} }
} }
impl ExtRobustness2Fn { impl ExtRobustness2Fn {
@ -22319,36 +22393,48 @@ impl StructureType {
impl StructureType { impl StructureType {
pub const PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV: Self = Self(1_000_326_002); pub const PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV: Self = Self(1_000_326_002);
} }
impl NvExtension328Fn { impl NvRayTracingMotionBlurFn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_extension_328\0") ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_ray_tracing_motion_blur\0")
.expect("Wrong extension string") .expect("Wrong extension string")
} }
pub const SPEC_VERSION: u32 = 0u32; pub const SPEC_VERSION: u32 = 1u32;
} }
#[derive(Clone)] #[derive(Clone)]
pub struct NvExtension328Fn {} pub struct NvRayTracingMotionBlurFn {}
unsafe impl Send for NvExtension328Fn {} unsafe impl Send for NvRayTracingMotionBlurFn {}
unsafe impl Sync for NvExtension328Fn {} unsafe impl Sync for NvRayTracingMotionBlurFn {}
impl NvExtension328Fn { impl NvRayTracingMotionBlurFn {
pub fn load<F>(mut _f: F) -> Self pub fn load<F>(mut _f: F) -> Self
where where
F: FnMut(&::std::ffi::CStr) -> *const c_void, F: FnMut(&::std::ffi::CStr) -> *const c_void,
{ {
NvExtension328Fn {} NvRayTracingMotionBlurFn {}
} }
} }
#[doc = "Generated from 'VK_NV_extension_328'"] #[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"]
impl StructureType {
pub const ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV: Self = Self(1_000_327_000);
}
#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"]
impl StructureType {
pub const PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV: Self = Self(1_000_327_001);
}
#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"]
impl StructureType {
pub const ACCELERATION_STRUCTURE_MOTION_INFO_NV: Self = Self(1_000_327_002);
}
#[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"]
impl BuildAccelerationStructureFlagsKHR { impl BuildAccelerationStructureFlagsKHR {
pub const RESERVED_5_NV: Self = Self(0b10_0000); pub const MOTION_NV: Self = Self(0b10_0000);
} }
#[doc = "Generated from 'VK_NV_extension_328'"] #[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"]
impl AccelerationStructureCreateFlagsKHR { impl AccelerationStructureCreateFlagsKHR {
pub const RESERVED_2_NV: Self = Self(0b100); pub const MOTION_NV: Self = Self(0b100);
} }
#[doc = "Generated from 'VK_NV_extension_328'"] #[doc = "Generated from 'VK_NV_ray_tracing_motion_blur'"]
impl PipelineCreateFlags { impl PipelineCreateFlags {
pub const RESERVED_20_NV: Self = Self(0b1_0000_0000_0000_0000_0000); pub const RAY_TRACING_ALLOW_MOTION_NV: Self = Self(0b1_0000_0000_0000_0000_0000);
} }
impl NvExtension329Fn { impl NvExtension329Fn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
@ -23322,25 +23408,29 @@ impl StructureType {
impl DynamicState { impl DynamicState {
pub const VERTEX_INPUT_EXT: Self = Self(1_000_352_000); pub const VERTEX_INPUT_EXT: Self = Self(1_000_352_000);
} }
impl ExtExtension354Fn { impl ExtPhysicalDeviceDrmFn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_354\0") ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_physical_device_drm\0")
.expect("Wrong extension string") .expect("Wrong extension string")
} }
pub const SPEC_VERSION: u32 = 0u32; pub const SPEC_VERSION: u32 = 1u32;
} }
#[derive(Clone)] #[derive(Clone)]
pub struct ExtExtension354Fn {} pub struct ExtPhysicalDeviceDrmFn {}
unsafe impl Send for ExtExtension354Fn {} unsafe impl Send for ExtPhysicalDeviceDrmFn {}
unsafe impl Sync for ExtExtension354Fn {} unsafe impl Sync for ExtPhysicalDeviceDrmFn {}
impl ExtExtension354Fn { impl ExtPhysicalDeviceDrmFn {
pub fn load<F>(mut _f: F) -> Self pub fn load<F>(mut _f: F) -> Self
where where
F: FnMut(&::std::ffi::CStr) -> *const c_void, F: FnMut(&::std::ffi::CStr) -> *const c_void,
{ {
ExtExtension354Fn {} ExtPhysicalDeviceDrmFn {}
} }
} }
#[doc = "Generated from 'VK_EXT_physical_device_drm'"]
impl StructureType {
pub const PHYSICAL_DEVICE_DRM_PROPERTIES_EXT: Self = Self(1_000_353_000);
}
impl ExtExtension355Fn { impl ExtExtension355Fn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_355\0") ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_355\0")
@ -23815,24 +23905,118 @@ impl QcomExtension369Fn {
impl DescriptorBindingFlags { impl DescriptorBindingFlags {
pub const RESERVED_4_QCOM: Self = Self(0b1_0000); pub const RESERVED_4_QCOM: Self = Self(0b1_0000);
} }
impl HuaweiExtension370Fn { impl HuaweiSubpassShadingFn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_HUAWEI_extension_370\0") ::std::ffi::CStr::from_bytes_with_nul(b"VK_HUAWEI_subpass_shading\0")
.expect("Wrong extension string") .expect("Wrong extension string")
} }
pub const SPEC_VERSION: u32 = 0u32; pub const SPEC_VERSION: u32 = 2u32;
} }
#[allow(non_camel_case_types)]
pub type PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = unsafe extern "system" fn(
device: Device,
renderpass: RenderPass,
p_max_workgroup_size: *mut Extent2D,
) -> Result;
#[allow(non_camel_case_types)]
pub type PFN_vkCmdSubpassShadingHUAWEI = unsafe extern "system" fn(command_buffer: CommandBuffer);
#[derive(Clone)] #[derive(Clone)]
pub struct HuaweiExtension370Fn {} pub struct HuaweiSubpassShadingFn {
unsafe impl Send for HuaweiExtension370Fn {} pub get_device_subpass_shading_max_workgroup_size_huawei:
unsafe impl Sync for HuaweiExtension370Fn {} PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI,
impl HuaweiExtension370Fn { pub cmd_subpass_shading_huawei: PFN_vkCmdSubpassShadingHUAWEI,
}
unsafe impl Send for HuaweiSubpassShadingFn {}
unsafe impl Sync for HuaweiSubpassShadingFn {}
impl HuaweiSubpassShadingFn {
pub fn load<F>(mut _f: F) -> Self pub fn load<F>(mut _f: F) -> Self
where where
F: FnMut(&::std::ffi::CStr) -> *const c_void, F: FnMut(&::std::ffi::CStr) -> *const c_void,
{ {
HuaweiExtension370Fn {} HuaweiSubpassShadingFn {
get_device_subpass_shading_max_workgroup_size_huawei: unsafe {
unsafe extern "system" fn get_device_subpass_shading_max_workgroup_size_huawei(
_device: Device,
_renderpass: RenderPass,
_p_max_workgroup_size: *mut Extent2D,
) -> Result {
panic!(concat!(
"Unable to load ",
stringify!(get_device_subpass_shading_max_workgroup_size_huawei)
))
}
let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked(
b"vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI\0",
);
let val = _f(cname);
if val.is_null() {
get_device_subpass_shading_max_workgroup_size_huawei
} else {
::std::mem::transmute(val)
}
},
cmd_subpass_shading_huawei: unsafe {
unsafe extern "system" fn cmd_subpass_shading_huawei(
_command_buffer: CommandBuffer,
) {
panic!(concat!(
"Unable to load ",
stringify!(cmd_subpass_shading_huawei)
))
}
let cname =
::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdSubpassShadingHUAWEI\0");
let val = _f(cname);
if val.is_null() {
cmd_subpass_shading_huawei
} else {
::std::mem::transmute(val)
}
},
}
} }
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.html>"]
pub unsafe fn get_device_subpass_shading_max_workgroup_size_huawei(
&self,
device: Device,
renderpass: RenderPass,
p_max_workgroup_size: *mut Extent2D,
) -> Result {
(self.get_device_subpass_shading_max_workgroup_size_huawei)(
device,
renderpass,
p_max_workgroup_size,
)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSubpassShadingHUAWEI.html>"]
pub unsafe fn cmd_subpass_shading_huawei(&self, command_buffer: CommandBuffer) {
(self.cmd_subpass_shading_huawei)(command_buffer)
}
}
#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"]
impl StructureType {
pub const SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI: Self = Self(1_000_369_000);
}
#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"]
impl StructureType {
pub const PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI: Self = Self(1_000_369_001);
}
#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"]
impl StructureType {
pub const PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI: Self = Self(1_000_369_002);
}
#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"]
impl PipelineBindPoint {
pub const SUBPASS_SHADING_HUAWEI: Self = Self(1_000_369_003);
}
#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"]
impl PipelineStageFlags2KHR {
pub const SUBPASS_SHADING_HUAWEI: Self =
Self(0b1000_0000_0000_0000_0000_0000_0000_0000_0000_0000);
}
#[doc = "Generated from 'VK_HUAWEI_subpass_shading'"]
impl ShaderStageFlags {
pub const SUBPASS_SHADING_HUAWEI: Self = Self(0b100_0000_0000_0000);
} }
impl HuaweiExtension371Fn { impl HuaweiExtension371Fn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
@ -23866,32 +24050,79 @@ impl PipelineStageFlags2KHR {
pub const RESERVED_40_HUAWEI: Self = pub const RESERVED_40_HUAWEI: Self =
Self(0b1_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000); Self(0b1_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000);
} }
impl NvExtension372Fn { impl NvExternalMemoryRdmaFn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_extension_372\0") ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_external_memory_rdma\0")
.expect("Wrong extension string") .expect("Wrong extension string")
} }
pub const SPEC_VERSION: u32 = 0u32; pub const SPEC_VERSION: u32 = 1u32;
} }
#[allow(non_camel_case_types)]
pub type PFN_vkGetMemoryRemoteAddressNV = unsafe extern "system" fn(
device: Device,
get_memory_remote_address_info: *const MemoryGetRemoteAddressInfoNV,
p_address: *mut RemoteAddressNV,
) -> Result;
#[derive(Clone)] #[derive(Clone)]
pub struct NvExtension372Fn {} pub struct NvExternalMemoryRdmaFn {
unsafe impl Send for NvExtension372Fn {} pub get_memory_remote_address_nv: PFN_vkGetMemoryRemoteAddressNV,
unsafe impl Sync for NvExtension372Fn {} }
impl NvExtension372Fn { unsafe impl Send for NvExternalMemoryRdmaFn {}
unsafe impl Sync for NvExternalMemoryRdmaFn {}
impl NvExternalMemoryRdmaFn {
pub fn load<F>(mut _f: F) -> Self pub fn load<F>(mut _f: F) -> Self
where where
F: FnMut(&::std::ffi::CStr) -> *const c_void, F: FnMut(&::std::ffi::CStr) -> *const c_void,
{ {
NvExtension372Fn {} NvExternalMemoryRdmaFn {
get_memory_remote_address_nv: unsafe {
unsafe extern "system" fn get_memory_remote_address_nv(
_device: Device,
_get_memory_remote_address_info: *const MemoryGetRemoteAddressInfoNV,
_p_address: *mut RemoteAddressNV,
) -> Result {
panic!(concat!(
"Unable to load ",
stringify!(get_memory_remote_address_nv)
))
}
let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked(
b"vkGetMemoryRemoteAddressNV\0",
);
let val = _f(cname);
if val.is_null() {
get_memory_remote_address_nv
} else {
::std::mem::transmute(val)
}
},
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetMemoryRemoteAddressNV.html>"]
pub unsafe fn get_memory_remote_address_nv(
&self,
device: Device,
get_memory_remote_address_info: *const MemoryGetRemoteAddressInfoNV,
p_address: *mut RemoteAddressNV,
) -> Result {
(self.get_memory_remote_address_nv)(device, get_memory_remote_address_info, p_address)
} }
} }
#[doc = "Generated from 'VK_NV_extension_372'"] #[doc = "Generated from 'VK_NV_external_memory_rdma'"]
impl MemoryPropertyFlags { impl StructureType {
pub const RESERVED_8_NV: Self = Self(0b1_0000_0000); pub const MEMORY_GET_REMOTE_ADDRESS_INFO_NV: Self = Self(1_000_371_000);
} }
#[doc = "Generated from 'VK_NV_extension_372'"] #[doc = "Generated from 'VK_NV_external_memory_rdma'"]
impl StructureType {
pub const PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV: Self = Self(1_000_371_001);
}
#[doc = "Generated from 'VK_NV_external_memory_rdma'"]
impl MemoryPropertyFlags {
pub const RDMA_CAPABLE_NV: Self = Self(0b1_0000_0000);
}
#[doc = "Generated from 'VK_NV_external_memory_rdma'"]
impl ExternalMemoryHandleTypeFlags { impl ExternalMemoryHandleTypeFlags {
pub const RESERVED_12_NV: Self = Self(0b1_0000_0000_0000); pub const RDMA_ADDRESS_NV: Self = Self(0b1_0000_0000_0000);
} }
impl NvExtension373Fn { impl NvExtension373Fn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
@ -24621,24 +24852,138 @@ impl ExtExtension392Fn {
ExtExtension392Fn {} ExtExtension392Fn {}
} }
} }
impl MesaMultiDrawFn { impl ExtMultiDrawFn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_MESA_multi_draw\0") ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_multi_draw\0")
.expect("Wrong extension string") .expect("Wrong extension string")
} }
pub const SPEC_VERSION: u32 = 0u32; pub const SPEC_VERSION: u32 = 1u32;
} }
#[allow(non_camel_case_types)]
pub type PFN_vkCmdDrawMultiEXT = unsafe extern "system" fn(
command_buffer: CommandBuffer,
draw_count: u32,
p_vertex_info: *const MultiDrawInfoEXT,
instance_count: u32,
first_instance: u32,
stride: u32,
);
#[allow(non_camel_case_types)]
pub type PFN_vkCmdDrawMultiIndexedEXT = unsafe extern "system" fn(
command_buffer: CommandBuffer,
draw_count: u32,
p_index_info: *const MultiDrawIndexedInfoEXT,
instance_count: u32,
first_instance: u32,
stride: u32,
p_vertex_offset: *const i32,
);
#[derive(Clone)] #[derive(Clone)]
pub struct MesaMultiDrawFn {} pub struct ExtMultiDrawFn {
unsafe impl Send for MesaMultiDrawFn {} pub cmd_draw_multi_ext: PFN_vkCmdDrawMultiEXT,
unsafe impl Sync for MesaMultiDrawFn {} pub cmd_draw_multi_indexed_ext: PFN_vkCmdDrawMultiIndexedEXT,
impl MesaMultiDrawFn { }
unsafe impl Send for ExtMultiDrawFn {}
unsafe impl Sync for ExtMultiDrawFn {}
impl ExtMultiDrawFn {
pub fn load<F>(mut _f: F) -> Self pub fn load<F>(mut _f: F) -> Self
where where
F: FnMut(&::std::ffi::CStr) -> *const c_void, F: FnMut(&::std::ffi::CStr) -> *const c_void,
{ {
MesaMultiDrawFn {} ExtMultiDrawFn {
cmd_draw_multi_ext: unsafe {
unsafe extern "system" fn cmd_draw_multi_ext(
_command_buffer: CommandBuffer,
_draw_count: u32,
_p_vertex_info: *const MultiDrawInfoEXT,
_instance_count: u32,
_first_instance: u32,
_stride: u32,
) {
panic!(concat!("Unable to load ", stringify!(cmd_draw_multi_ext)))
}
let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawMultiEXT\0");
let val = _f(cname);
if val.is_null() {
cmd_draw_multi_ext
} else {
::std::mem::transmute(val)
}
},
cmd_draw_multi_indexed_ext: unsafe {
unsafe extern "system" fn cmd_draw_multi_indexed_ext(
_command_buffer: CommandBuffer,
_draw_count: u32,
_p_index_info: *const MultiDrawIndexedInfoEXT,
_instance_count: u32,
_first_instance: u32,
_stride: u32,
_p_vertex_offset: *const i32,
) {
panic!(concat!(
"Unable to load ",
stringify!(cmd_draw_multi_indexed_ext)
))
}
let cname =
::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawMultiIndexedEXT\0");
let val = _f(cname);
if val.is_null() {
cmd_draw_multi_indexed_ext
} else {
::std::mem::transmute(val)
}
},
}
} }
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawMultiEXT.html>"]
pub unsafe fn cmd_draw_multi_ext(
&self,
command_buffer: CommandBuffer,
draw_count: u32,
p_vertex_info: *const MultiDrawInfoEXT,
instance_count: u32,
first_instance: u32,
stride: u32,
) {
(self.cmd_draw_multi_ext)(
command_buffer,
draw_count,
p_vertex_info,
instance_count,
first_instance,
stride,
)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawMultiIndexedEXT.html>"]
pub unsafe fn cmd_draw_multi_indexed_ext(
&self,
command_buffer: CommandBuffer,
draw_count: u32,
p_index_info: *const MultiDrawIndexedInfoEXT,
instance_count: u32,
first_instance: u32,
stride: u32,
p_vertex_offset: *const i32,
) {
(self.cmd_draw_multi_indexed_ext)(
command_buffer,
draw_count,
p_index_info,
instance_count,
first_instance,
stride,
p_vertex_offset,
)
}
}
#[doc = "Generated from 'VK_EXT_multi_draw'"]
impl StructureType {
pub const PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: Self = Self(1_000_392_000);
}
#[doc = "Generated from 'VK_EXT_multi_draw'"]
impl StructureType {
pub const PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT: Self = Self(1_000_392_001);
} }
impl ExtExtension394Fn { impl ExtExtension394Fn {
pub fn name() -> &'static ::std::ffi::CStr { pub fn name() -> &'static ::std::ffi::CStr {
@ -25077,3 +25422,79 @@ impl ArmExtension416Fn {
ArmExtension416Fn {} ArmExtension416Fn {}
} }
} }
impl KhrExtension417Fn {
pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_extension_417\0")
.expect("Wrong extension string")
}
pub const SPEC_VERSION: u32 = 0u32;
}
#[derive(Clone)]
pub struct KhrExtension417Fn {}
unsafe impl Send for KhrExtension417Fn {}
unsafe impl Sync for KhrExtension417Fn {}
impl KhrExtension417Fn {
pub fn load<F>(mut _f: F) -> Self
where
F: FnMut(&::std::ffi::CStr) -> *const c_void,
{
KhrExtension417Fn {}
}
}
impl ArmExtension418Fn {
pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_ARM_extension_418\0")
.expect("Wrong extension string")
}
pub const SPEC_VERSION: u32 = 0u32;
}
#[derive(Clone)]
pub struct ArmExtension418Fn {}
unsafe impl Send for ArmExtension418Fn {}
unsafe impl Sync for ArmExtension418Fn {}
impl ArmExtension418Fn {
pub fn load<F>(mut _f: F) -> Self
where
F: FnMut(&::std::ffi::CStr) -> *const c_void,
{
ArmExtension418Fn {}
}
}
impl ExtExtension419Fn {
pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_419\0")
.expect("Wrong extension string")
}
pub const SPEC_VERSION: u32 = 0u32;
}
#[derive(Clone)]
pub struct ExtExtension419Fn {}
unsafe impl Send for ExtExtension419Fn {}
unsafe impl Sync for ExtExtension419Fn {}
impl ExtExtension419Fn {
pub fn load<F>(mut _f: F) -> Self
where
F: FnMut(&::std::ffi::CStr) -> *const c_void,
{
ExtExtension419Fn {}
}
}
impl ExtExtension420Fn {
pub fn name() -> &'static ::std::ffi::CStr {
::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_420\0")
.expect("Wrong extension string")
}
pub const SPEC_VERSION: u32 = 0u32;
}
#[derive(Clone)]
pub struct ExtExtension420Fn {}
unsafe impl Send for ExtExtension420Fn {}
unsafe impl Sync for ExtExtension420Fn {}
impl ExtExtension420Fn {
pub fn load<F>(mut _f: F) -> Self
where
F: FnMut(&::std::ffi::CStr) -> *const c_void,
{
ExtExtension420Fn {}
}
}

@ -1 +1 @@
Subproject commit 9d10a96f2d57c3c37e167f2e73c9a31ac2e51fa5 Subproject commit 0193e158bc9f4d17e3c3a61c9311a0439ed5572d

View file

@ -29,7 +29,7 @@ pub enum CType {
} }
impl CType { impl CType {
fn to_string(&self) -> &'static str { fn to_string(self) -> &'static str {
match self { match self {
Self::USize => "usize", Self::USize => "usize",
Self::U32 => "u32", Self::U32 => "u32",
@ -1101,7 +1101,7 @@ pub fn generate_extension_constants<'a>(
vk_parse::ExtensionChild::Require { items, .. } => Some(items.iter()), vk_parse::ExtensionChild::Require { items, .. } => Some(items.iter()),
_ => None, _ => None,
}) })
.flat_map(|iter| iter); .flatten();
let enum_tokens = items.filter_map(|item| match item { let enum_tokens = items.filter_map(|item| match item {
vk_parse::InterfaceItem::Enum(enum_) => { vk_parse::InterfaceItem::Enum(enum_) => {
if !const_cache.insert(enum_.name.as_str()) { if !const_cache.insert(enum_.name.as_str()) {
@ -1916,7 +1916,7 @@ pub fn derive_setters(
}; };
// Interpret void array as byte array // Interpret void array as byte array
if field.basetype == "void" { if field.basetype == "void" && matches!(field.reference, Some(vkxml::ReferenceType::Pointer)) {
let mutable = if field.is_const { quote!(const) } else { quote!(mut) }; let mutable = if field.is_const { quote!(const) } else { quote!(mut) };
slice_param_ty_tokens = quote!([u8]); slice_param_ty_tokens = quote!([u8]);
@ -2121,6 +2121,7 @@ pub fn generate_struct(
} }
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureInstanceKHR.html>"]
pub struct AccelerationStructureInstanceKHR { pub struct AccelerationStructureInstanceKHR {
pub transform: TransformMatrixKHR, pub transform: TransformMatrixKHR,
pub instance_custom_index_and_mask: u32, pub instance_custom_index_and_mask: u32,
@ -2130,6 +2131,36 @@ pub fn generate_struct(
}; };
} }
if &_struct.name == "VkAccelerationStructureSRTMotionInstanceNV" {
return quote! {
#[repr(C)]
#[derive(Copy, Clone)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureSRTMotionInstanceNV.html>"]
pub struct AccelerationStructureSRTMotionInstanceNV {
pub transform_t0: SRTDataNV,
pub transform_t1: SRTDataNV,
pub instance_custom_index_and_mask: u32,
pub instance_shader_binding_table_record_offset_and_flags: u32,
pub acceleration_structure_reference: AccelerationStructureReferenceKHR,
}
};
}
if &_struct.name == "VkAccelerationStructureMatrixMotionInstanceNV" {
return quote! {
#[repr(C)]
#[derive(Copy, Clone)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/AccelerationStructureMatrixMotionInstanceNV.html>"]
pub struct AccelerationStructureMatrixMotionInstanceNV {
pub transform_t0: TransformMatrixKHR,
pub transform_t1: TransformMatrixKHR,
pub instance_custom_index_and_mask: u32,
pub instance_shader_binding_table_record_offset_and_flags: u32,
pub acceleration_structure_reference: AccelerationStructureReferenceKHR,
}
};
}
let members = _struct.elements.iter().filter_map(|elem| match *elem { let members = _struct.elements.iter().filter_map(|elem| match *elem {
vkxml::StructElement::Member(ref field) => Some(field), vkxml::StructElement::Member(ref field) => Some(field),
_ => None, _ => None,
@ -2893,6 +2924,10 @@ pub fn write_source_code<P: AsRef<Path>>(vk_headers_dir: &Path, src_dir: P) {
pub use features::*; pub use features::*;
/// Native bindings from Vulkan headers, generated by bindgen /// Native bindings from Vulkan headers, generated by bindgen
#[allow(nonstandard_style)] #[allow(nonstandard_style)]
// Temporarily allow UB nullptr dereference in bindgen layout tests until fixed upstream:
// https://github.com/rust-lang/rust-bindgen/pull/2055
// https://github.com/rust-lang/rust-bindgen/pull/2064
#[allow(deref_nullptr)]
pub mod native; pub mod native;
mod platform_types; mod platform_types;
pub use platform_types::*; pub use platform_types::*;
@ -2945,13 +2980,7 @@ pub fn write_source_code<P: AsRef<Path>>(vk_headers_dir: &Path, src_dir: P) {
let (header_includes, header_types) = extract_native_types(&spec2); let (header_includes, header_types) = extract_native_types(&spec2);
for (_name, path) in header_includes { for (_name, path) in header_includes {
let path = if path == "vk_platform.h" { bindings = bindings.header(vk_include.join(path).to_str().expect("Valid UTF8 string"));
// Fix broken path, https://github.com/KhronosGroup/Vulkan-Docs/pull/1538
vk_include.join("vulkan").join(path)
} else {
vk_include.join(path)
};
bindings = bindings.header(path.to_str().expect("Valid UTF8 string"));
} }
for typ in header_types { for typ in header_types {