Update Vulkan-Headers to 1.2.162 with stable ray-tracing spec (#341)

* Update Vulkan-Headers subproject to 1.2.162 (ray tracing)

* Generate against vk.xml 1.2.162

* generator: Shim IDirectFB and IDirectFBSurface to c_void

* generator: Edgecase for name-clash in p_geometries and pp_geometries

* extensions: Migrate acceleration structure to separate extension

* extensions: Migrate RT safe wrapper functions to ray_tracing_pipeline

* Add high level wrapper for currently-empty RayQuery extension

* vk: definition: Turn host/device AS handle into type safe union

Co-authored-by: Marijn Suijten <marijn@traverseresearch.nl>

Co-authored-by: Darius Bouma <darius1@live.nl>
This commit is contained in:
Marijn Suijten 2020-12-13 18:30:42 +01:00 committed by GitHub
parent bfa0309c97
commit 05747b25aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 9177 additions and 1809 deletions

View file

@ -0,0 +1,321 @@
#![allow(dead_code)]
use crate::prelude::*;
use crate::version::{DeviceV1_0, InstanceV1_0, InstanceV1_1};
use crate::vk;
use crate::RawPtr;
use std::ffi::CStr;
use std::mem;
#[derive(Clone)]
pub struct AccelerationStructure {
handle: vk::Device,
acceleration_structure_fn: vk::KhrAccelerationStructureFn,
}
impl AccelerationStructure {
pub fn new<I: InstanceV1_0, D: DeviceV1_0>(instance: &I, device: &D) -> Self {
let acceleration_structure_fn = vk::KhrAccelerationStructureFn::load(|name| unsafe {
mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))
});
Self {
handle: device.handle(),
acceleration_structure_fn,
}
}
pub unsafe fn get_properties<I: InstanceV1_1>(
instance: &I,
pdevice: vk::PhysicalDevice,
) -> vk::PhysicalDeviceAccelerationStructurePropertiesKHR {
let mut props_rt = vk::PhysicalDeviceAccelerationStructurePropertiesKHR::default();
{
let mut props = vk::PhysicalDeviceProperties2::builder().push_next(&mut props_rt);
instance.get_physical_device_properties2(pdevice, &mut props);
}
props_rt
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateAccelerationStructureKHR.html>"]
pub unsafe fn create_acceleration_structure(
&self,
create_info: &vk::AccelerationStructureCreateInfoKHR,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::AccelerationStructureKHR> {
let mut accel_struct = mem::zeroed();
let err_code = self
.acceleration_structure_fn
.create_acceleration_structure_khr(
self.handle,
create_info,
allocation_callbacks.as_raw_ptr(),
&mut accel_struct,
);
match err_code {
vk::Result::SUCCESS => Ok(accel_struct),
_ => Err(err_code),
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyAccelerationStructureKHR.html>"]
pub unsafe fn destroy_acceleration_structure(
&self,
accel_struct: vk::AccelerationStructureKHR,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
self.acceleration_structure_fn
.destroy_acceleration_structure_khr(
self.handle,
accel_struct,
allocation_callbacks.as_raw_ptr(),
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBuildAccelerationStructuresKHR.html>"]
pub unsafe fn cmd_build_acceleration_structures(
&self,
command_buffer: vk::CommandBuffer,
infos: &[vk::AccelerationStructureBuildGeometryInfoKHR],
build_range_infos: &[&[vk::AccelerationStructureBuildRangeInfoKHR]],
) {
assert_eq!(infos.len(), build_range_infos.len());
let build_range_infos = build_range_infos
.iter()
.map(|slice| slice.as_ptr())
.collect::<Vec<*const _>>();
self.acceleration_structure_fn
.cmd_build_acceleration_structures_khr(
command_buffer,
infos.len() as _,
infos.as_ptr(),
build_range_infos.as_ptr(),
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBuildAccelerationStructuresIndirectKHR.html>"]
pub unsafe fn cmd_build_acceleration_structures_indirect(
&self,
command_buffer: vk::CommandBuffer,
infos: &[vk::AccelerationStructureBuildGeometryInfoKHR],
indirect_device_addresses: &[vk::DeviceAddress],
indirect_strides: &[u32],
max_primitive_counts: &[&u32],
) {
assert_eq!(infos.len(), indirect_device_addresses.len());
assert_eq!(infos.len(), indirect_strides.len());
assert_eq!(infos.len(), max_primitive_counts.len());
let max_primitive_counts = max_primitive_counts
.iter()
.map(|cnt| *cnt as *const _)
.collect::<Vec<_>>();
self.acceleration_structure_fn
.cmd_build_acceleration_structures_indirect_khr(
command_buffer,
infos.len() as _,
infos.as_ptr(),
indirect_device_addresses.as_ptr(),
indirect_strides.as_ptr(),
max_primitive_counts.as_ptr(),
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBuildAccelerationStructuresKHR.html>"]
pub unsafe fn build_acceleration_structures(
&self,
device: vk::Device,
deferred_operation: vk::DeferredOperationKHR,
infos: &[vk::AccelerationStructureBuildGeometryInfoKHR],
build_range_infos: &[&[vk::AccelerationStructureBuildRangeInfoKHR]],
) -> VkResult<()> {
assert_eq!(infos.len(), build_range_infos.len());
let build_range_infos = build_range_infos
.iter()
.map(|slice| slice.as_ptr())
.collect::<Vec<*const _>>();
self.acceleration_structure_fn
.build_acceleration_structures_khr(
device,
deferred_operation,
infos.len() as _,
infos.as_ptr(),
build_range_infos.as_ptr(),
)
.into()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCopyAccelerationStructureKHR.html>"]
pub unsafe fn copy_acceleration_structure(
&self,
device: vk::Device,
deferred_operation: vk::DeferredOperationKHR,
info: &vk::CopyAccelerationStructureInfoKHR,
) -> VkResult<()> {
self.acceleration_structure_fn
.copy_acceleration_structure_khr(device, deferred_operation, info as *const _)
.into()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCopyAccelerationStructureToMemoryKHR.html>"]
pub unsafe fn copy_acceleration_structure_to_memory(
&self,
device: vk::Device,
deferred_operation: vk::DeferredOperationKHR,
info: &vk::CopyAccelerationStructureToMemoryInfoKHR,
) -> VkResult<()> {
self.acceleration_structure_fn
.copy_acceleration_structure_to_memory_khr(device, deferred_operation, info as *const _)
.into()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCopyMemoryToAccelerationStructureKHR.html>"]
pub unsafe fn copy_memory_to_acceleration_structure(
&self,
device: vk::Device,
deferred_operation: vk::DeferredOperationKHR,
info: &vk::CopyMemoryToAccelerationStructureInfoKHR,
) -> VkResult<()> {
self.acceleration_structure_fn
.copy_memory_to_acceleration_structure_khr(device, deferred_operation, info as *const _)
.into()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkWriteAccelerationStructuresPropertiesKHR.html>"]
pub unsafe fn write_acceleration_structures_properties(
&self,
device: vk::Device,
acceleration_structures: &[vk::AccelerationStructureKHR],
query_type: vk::QueryType,
data: &mut [u8],
stride: usize,
) -> VkResult<()> {
self.acceleration_structure_fn
.write_acceleration_structures_properties_khr(
device,
acceleration_structures.len() as _,
acceleration_structures.as_ptr(),
query_type,
data.len(),
data.as_mut_ptr() as *mut std::ffi::c_void,
stride,
)
.into()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyAccelerationStructureKHR.html>"]
pub unsafe fn cmd_copy_acceleration_structure(
&self,
command_buffer: vk::CommandBuffer,
info: &vk::CopyAccelerationStructureInfoKHR,
) {
self.acceleration_structure_fn
.cmd_copy_acceleration_structure_khr(command_buffer, info);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyAccelerationStructureToMemoryKHR.html>"]
pub unsafe fn cmd_copy_acceleration_structure_to_memory(
&self,
command_buffer: vk::CommandBuffer,
info: &vk::CopyAccelerationStructureToMemoryInfoKHR,
) {
self.acceleration_structure_fn
.cmd_copy_acceleration_structure_to_memory_khr(command_buffer, info as *const _);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyMemoryToAccelerationStructureKHR.html>"]
pub unsafe fn cmd_copy_memory_to_acceleration_structure(
&self,
command_buffer: vk::CommandBuffer,
info: &vk::CopyMemoryToAccelerationStructureInfoKHR,
) {
self.acceleration_structure_fn
.cmd_copy_memory_to_acceleration_structure_khr(command_buffer, info as *const _);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetAccelerationStructureHandleKHR.html>"]
pub unsafe fn get_acceleration_structure_device_address(
&self,
device: vk::Device,
info: &vk::AccelerationStructureDeviceAddressInfoKHR,
) -> vk::DeviceAddress {
self.acceleration_structure_fn
.get_acceleration_structure_device_address_khr(device, info as *const _)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdWriteAccelerationStructuresPropertiesKHR.html>"]
pub unsafe fn cmd_write_acceleration_structures_properties(
&self,
command_buffer: vk::CommandBuffer,
structures: &[vk::AccelerationStructureKHR],
query_type: vk::QueryType,
query_pool: vk::QueryPool,
first_query: u32,
) {
self.acceleration_structure_fn
.cmd_write_acceleration_structures_properties_khr(
command_buffer,
structures.len() as _,
structures.as_ptr(),
query_type,
query_pool,
first_query,
);
}
pub unsafe fn get_device_acceleration_structure_compatibility(
&self,
device: vk::Device,
version: &vk::AccelerationStructureVersionInfoKHR,
) -> vk::AccelerationStructureCompatibilityKHR {
let mut compatibility = vk::AccelerationStructureCompatibilityKHR::default();
self.acceleration_structure_fn
.get_device_acceleration_structure_compatibility_khr(
device,
version,
&mut compatibility as *mut _,
);
compatibility
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetAccelerationStructureBuildSizesKHR.html>"]
pub unsafe fn get_acceleration_structure_build_sizes(
&self,
device: vk::Device,
build_type: vk::AccelerationStructureBuildTypeKHR,
build_info: &vk::AccelerationStructureBuildGeometryInfoKHR,
max_primitive_counts: &[u32],
) -> vk::AccelerationStructureBuildSizesInfoKHR {
assert_eq!(max_primitive_counts.len(), build_info.geometry_count as _);
let mut size_info = vk::AccelerationStructureBuildSizesInfoKHR::default();
self.acceleration_structure_fn
.get_acceleration_structure_build_sizes_khr(
device,
build_type,
build_info as *const _,
max_primitive_counts.as_ptr(),
&mut size_info as *mut _,
);
size_info
}
pub fn name() -> &'static CStr {
vk::KhrAccelerationStructureFn::name()
}
pub fn fp(&self) -> &vk::KhrAccelerationStructureFn {
&self.acceleration_structure_fn
}
pub fn device(&self) -> vk::Device {
self.handle
}
}

View file

@ -1,3 +1,4 @@
pub use self::acceleration_structure::AccelerationStructure;
pub use self::android_surface::AndroidSurface;
pub use self::display::Display;
pub use self::display_swapchain::DisplaySwapchain;
@ -5,7 +6,8 @@ pub use self::draw_indirect_count::DrawIndirectCount;
pub use self::external_memory_fd::ExternalMemoryFd;
pub use self::pipeline_executable_properties::PipelineExecutableProperties;
pub use self::push_descriptor::PushDescriptor;
pub use self::ray_tracing::RayTracing;
pub use self::ray_query::RayQuery;
pub use self::ray_tracing_pipeline::RayTracingPipeline;
pub use self::surface::Surface;
pub use self::swapchain::Swapchain;
pub use self::timeline_semaphore::TimelineSemaphore;
@ -14,6 +16,7 @@ pub use self::win32_surface::Win32Surface;
pub use self::xcb_surface::XcbSurface;
pub use self::xlib_surface::XlibSurface;
mod acceleration_structure;
mod android_surface;
mod display;
mod display_swapchain;
@ -21,7 +24,8 @@ mod draw_indirect_count;
mod external_memory_fd;
mod pipeline_executable_properties;
mod push_descriptor;
mod ray_tracing;
mod ray_query;
mod ray_tracing_pipeline;
mod surface;
mod swapchain;
mod timeline_semaphore;

View file

@ -0,0 +1,35 @@
#![allow(dead_code)]
use crate::version::{DeviceV1_0, InstanceV1_0};
use crate::vk;
use std::ffi::CStr;
use std::mem;
#[derive(Clone)]
pub struct RayQuery {
handle: vk::Device,
ray_query_fn: vk::KhrRayQueryFn,
}
impl RayQuery {
pub fn new<I: InstanceV1_0, D: DeviceV1_0>(instance: &I, device: &D) -> Self {
let ray_query_fn = vk::KhrRayQueryFn::load(|name| unsafe {
mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))
});
Self {
handle: device.handle(),
ray_query_fn,
}
}
pub fn name() -> &'static CStr {
vk::KhrRayQueryFn::name()
}
pub fn fp(&self) -> &vk::KhrRayQueryFn {
&self.ray_query_fn
}
pub fn device(&self) -> vk::Device {
self.handle
}
}

View file

@ -1,343 +0,0 @@
#![allow(dead_code)]
use crate::prelude::*;
use crate::version::{DeviceV1_0, InstanceV1_0, InstanceV1_1};
use crate::vk;
use crate::RawPtr;
use std::ffi::CStr;
use std::mem;
#[derive(Clone)]
pub struct RayTracing {
handle: vk::Device,
ray_tracing_fn: vk::KhrRayTracingFn,
}
impl RayTracing {
pub fn new<I: InstanceV1_0, D: DeviceV1_0>(instance: &I, device: &D) -> RayTracing {
let ray_tracing_fn = vk::KhrRayTracingFn::load(|name| unsafe {
mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))
});
RayTracing {
handle: device.handle(),
ray_tracing_fn,
}
}
pub unsafe fn get_properties<I: InstanceV1_1>(
instance: &I,
pdevice: vk::PhysicalDevice,
) -> vk::PhysicalDeviceRayTracingPropertiesKHR {
let mut props_rt = vk::PhysicalDeviceRayTracingPropertiesKHR::default();
{
let mut props = vk::PhysicalDeviceProperties2::builder().push_next(&mut props_rt);
instance.get_physical_device_properties2(pdevice, &mut props);
}
props_rt
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateAccelerationStructureKHR.html>"]
pub unsafe fn create_acceleration_structure(
&self,
create_info: &vk::AccelerationStructureCreateInfoKHR,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::AccelerationStructureKHR> {
let mut accel_struct = mem::zeroed();
self.ray_tracing_fn
.create_acceleration_structure_khr(
self.handle,
create_info,
allocation_callbacks.as_raw_ptr(),
&mut accel_struct,
)
.result_with_success(accel_struct)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyAccelerationStructureKHR.html>"]
pub unsafe fn destroy_acceleration_structure(
&self,
accel_struct: vk::AccelerationStructureKHR,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
self.ray_tracing_fn.destroy_acceleration_structure_khr(
self.handle,
accel_struct,
allocation_callbacks.as_raw_ptr(),
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetAccelerationStructureMemoryRequirementsKHR.html>"]
pub unsafe fn get_acceleration_structure_memory_requirements(
&self,
info: &vk::AccelerationStructureMemoryRequirementsInfoKHR,
) -> vk::MemoryRequirements2KHR {
let mut requirements = Default::default();
self.ray_tracing_fn
.get_acceleration_structure_memory_requirements_khr(
self.handle,
info,
&mut requirements,
);
requirements
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBindAccelerationStructureMemoryKHR.html>"]
pub unsafe fn bind_acceleration_structure_memory(
&self,
bind_info: &[vk::BindAccelerationStructureMemoryInfoKHR],
) -> VkResult<()> {
self.ray_tracing_fn
.bind_acceleration_structure_memory_khr(
self.handle,
bind_info.len() as u32,
bind_info.as_ptr(),
)
.into()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBuildAccelerationStructureKHR.html>"]
pub unsafe fn cmd_build_acceleration_structure(
&self,
command_buffer: vk::CommandBuffer,
infos: &[vk::AccelerationStructureBuildGeometryInfoKHR],
offset_infos: &[&[vk::AccelerationStructureBuildOffsetInfoKHR]],
) {
let offset_info_ptr = offset_infos
.iter()
.map(|slice| slice.as_ptr())
.collect::<Vec<*const vk::AccelerationStructureBuildOffsetInfoKHR>>();
self.ray_tracing_fn.cmd_build_acceleration_structure_khr(
command_buffer,
infos.len() as u32,
infos.as_ptr(),
offset_info_ptr.as_ptr(),
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyAccelerationStructureKHR.html>"]
pub unsafe fn cmd_copy_acceleration_structure(
&self,
command_buffer: vk::CommandBuffer,
info: &vk::CopyAccelerationStructureInfoKHR,
) {
self.ray_tracing_fn
.cmd_copy_acceleration_structure_khr(command_buffer, info);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdTraceRaysKHR.html>"]
pub unsafe fn cmd_trace_rays(
&self,
command_buffer: vk::CommandBuffer,
raygen_shader_binding_tables: &[vk::StridedBufferRegionKHR],
miss_shader_binding_tables: &[vk::StridedBufferRegionKHR],
hit_shader_binding_tables: &[vk::StridedBufferRegionKHR],
callable_shader_binding_tables: &[vk::StridedBufferRegionKHR],
width: u32,
height: u32,
depth: u32,
) {
self.ray_tracing_fn.cmd_trace_rays_khr(
command_buffer,
raygen_shader_binding_tables.as_ptr(),
miss_shader_binding_tables.as_ptr(),
hit_shader_binding_tables.as_ptr(),
callable_shader_binding_tables.as_ptr(),
width,
height,
depth,
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateRayTracingPipelinesKHR.html>"]
pub unsafe fn create_ray_tracing_pipelines(
&self,
pipeline_cache: vk::PipelineCache,
create_info: &[vk::RayTracingPipelineCreateInfoKHR],
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<Vec<vk::Pipeline>> {
let mut pipelines = vec![mem::zeroed(); create_info.len()];
self.ray_tracing_fn
.create_ray_tracing_pipelines_khr(
self.handle,
pipeline_cache,
create_info.len() as u32,
create_info.as_ptr(),
allocation_callbacks.as_raw_ptr(),
pipelines.as_mut_ptr(),
)
.result_with_success(pipelines)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetRayTracingShaderGroupHandlesKHR.html>"]
pub unsafe fn get_ray_tracing_shader_group_handles(
&self,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
) -> VkResult<Vec<u8>> {
let mut data = Vec::<u8>::with_capacity(data_size);
let err_code = self
.ray_tracing_fn
.get_ray_tracing_shader_group_handles_khr(
self.handle,
pipeline,
first_group,
group_count,
data_size,
data.as_mut_ptr() as *mut std::ffi::c_void,
);
data.set_len(data_size);
err_code.result_with_success(data)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetAccelerationStructureHandleKHR.html>"]
pub unsafe fn get_acceleration_structure_device_address(
&self,
info: &vk::AccelerationStructureDeviceAddressInfoKHR,
) -> vk::DeviceAddress {
self.ray_tracing_fn
.get_acceleration_structure_device_address_khr(self.handle, info)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdWriteAccelerationStructuresPropertiesKHR.html>"]
pub unsafe fn cmd_write_acceleration_structures_properties(
&self,
command_buffer: vk::CommandBuffer,
structures: &[vk::AccelerationStructureKHR],
query_type: vk::QueryType,
query_pool: vk::QueryPool,
first_query: u32,
) {
self.ray_tracing_fn
.cmd_write_acceleration_structures_properties_khr(
command_buffer,
structures.len() as u32,
structures.as_ptr(),
query_type,
query_pool,
first_query,
);
}
pub unsafe fn cmd_build_acceleration_structure_indirect(
&self,
command_buffer: vk::CommandBuffer,
info: &vk::AccelerationStructureBuildGeometryInfoKHR,
indirect_buffer: vk::Buffer,
indirect_offset: vk::DeviceSize,
indirect_stride: u32,
) {
self.ray_tracing_fn
.cmd_build_acceleration_structure_indirect_khr(
command_buffer,
info,
indirect_buffer,
indirect_offset,
indirect_stride,
);
}
pub unsafe fn copy_acceleration_structure_to_memory(
&self,
device: vk::Device,
info: &vk::CopyAccelerationStructureToMemoryInfoKHR,
) -> VkResult<()> {
self.ray_tracing_fn
.copy_acceleration_structure_to_memory_khr(device, info)
.into()
}
pub unsafe fn copy_memory_to_acceleration_structure(
&self,
device: vk::Device,
info: &vk::CopyMemoryToAccelerationStructureInfoKHR,
) -> VkResult<()> {
self.ray_tracing_fn
.copy_memory_to_acceleration_structure_khr(device, info)
.into()
}
pub unsafe fn cmd_copy_acceleration_structure_to_memory(
&self,
command_buffer: vk::CommandBuffer,
info: &vk::CopyAccelerationStructureToMemoryInfoKHR,
) {
self.ray_tracing_fn
.cmd_copy_acceleration_structure_to_memory_khr(command_buffer, info);
}
pub unsafe fn cmd_copy_memory_to_acceleration_structure(
&self,
command_buffer: vk::CommandBuffer,
info: &vk::CopyMemoryToAccelerationStructureInfoKHR,
) {
self.ray_tracing_fn
.cmd_copy_memory_to_acceleration_structure_khr(command_buffer, info);
}
pub unsafe fn get_ray_tracing_capture_replay_shader_group_handles(
&self,
device: vk::Device,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
) -> VkResult<Vec<u8>> {
let mut data: Vec<u8> = Vec::with_capacity(data_size);
self.ray_tracing_fn
.get_ray_tracing_capture_replay_shader_group_handles_khr(
device,
pipeline,
first_group,
group_count,
data_size,
data.as_mut_ptr() as *mut _,
)
.result_with_success(data)
}
pub unsafe fn cmd_trace_rays_indirect(
&self,
command_buffer: vk::CommandBuffer,
raygen_shader_binding_table: &[vk::StridedBufferRegionKHR],
miss_shader_binding_table: &[vk::StridedBufferRegionKHR],
hit_shader_binding_table: &[vk::StridedBufferRegionKHR],
callable_shader_binding_table: &[vk::StridedBufferRegionKHR],
buffer: vk::Buffer,
offset: vk::DeviceSize,
) {
self.ray_tracing_fn.cmd_trace_rays_indirect_khr(
command_buffer,
raygen_shader_binding_table.as_ptr(),
miss_shader_binding_table.as_ptr(),
hit_shader_binding_table.as_ptr(),
callable_shader_binding_table.as_ptr(),
buffer,
offset,
);
}
pub unsafe fn get_device_acceleration_structure_compatibility(
&self,
device: vk::Device,
version: &vk::AccelerationStructureVersionKHR,
) -> VkResult<()> {
self.ray_tracing_fn
.get_device_acceleration_structure_compatibility_khr(device, version)
.into()
}
pub fn name() -> &'static CStr {
vk::KhrRayTracingFn::name()
}
pub fn fp(&self) -> &vk::KhrRayTracingFn {
&self.ray_tracing_fn
}
pub fn device(&self) -> vk::Device {
self.handle
}
}

View file

@ -0,0 +1,183 @@
#![allow(dead_code)]
use crate::prelude::*;
use crate::version::{DeviceV1_0, InstanceV1_0, InstanceV1_1};
use crate::vk;
use crate::RawPtr;
use std::ffi::CStr;
use std::mem;
#[derive(Clone)]
pub struct RayTracingPipeline {
handle: vk::Device,
ray_tracing_fn: vk::KhrRayTracingPipelineFn,
}
impl RayTracingPipeline {
pub fn new<I: InstanceV1_0, D: DeviceV1_0>(instance: &I, device: &D) -> Self {
let ray_tracing_fn = vk::KhrRayTracingPipelineFn::load(|name| unsafe {
mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))
});
Self {
handle: device.handle(),
ray_tracing_fn,
}
}
pub unsafe fn get_properties<I: InstanceV1_1>(
instance: &I,
pdevice: vk::PhysicalDevice,
) -> vk::PhysicalDeviceRayTracingPipelinePropertiesKHR {
let mut props_rt = vk::PhysicalDeviceRayTracingPipelinePropertiesKHR::default();
{
let mut props = vk::PhysicalDeviceProperties2::builder().push_next(&mut props_rt);
instance.get_physical_device_properties2(pdevice, &mut props);
}
props_rt
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdTraceRaysKHR.html>"]
pub unsafe fn cmd_trace_rays(
&self,
command_buffer: vk::CommandBuffer,
raygen_shader_binding_tables: &[vk::StridedDeviceAddressRegionKHR],
miss_shader_binding_tables: &[vk::StridedDeviceAddressRegionKHR],
hit_shader_binding_tables: &[vk::StridedDeviceAddressRegionKHR],
callable_shader_binding_tables: &[vk::StridedDeviceAddressRegionKHR],
width: u32,
height: u32,
depth: u32,
) {
self.ray_tracing_fn.cmd_trace_rays_khr(
command_buffer,
raygen_shader_binding_tables.as_ptr(),
miss_shader_binding_tables.as_ptr(),
hit_shader_binding_tables.as_ptr(),
callable_shader_binding_tables.as_ptr(),
width,
height,
depth,
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateRayTracingPipelinesKHR.html>"]
pub unsafe fn create_ray_tracing_pipelines(
&self,
deferred_operation: vk::DeferredOperationKHR,
pipeline_cache: vk::PipelineCache,
create_info: &[vk::RayTracingPipelineCreateInfoKHR],
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<Vec<vk::Pipeline>> {
let mut pipelines = vec![mem::zeroed(); create_info.len()];
self.ray_tracing_fn
.create_ray_tracing_pipelines_khr(
self.handle,
deferred_operation,
pipeline_cache,
create_info.len() as u32,
create_info.as_ptr(),
allocation_callbacks.as_raw_ptr(),
pipelines.as_mut_ptr(),
)
.result_with_success(pipelines)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetRayTracingShaderGroupHandlesKHR.html>"]
pub unsafe fn get_ray_tracing_shader_group_handles(
&self,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
) -> VkResult<Vec<u8>> {
let mut data = Vec::<u8>::with_capacity(data_size);
let err_code = self
.ray_tracing_fn
.get_ray_tracing_shader_group_handles_khr(
self.handle,
pipeline,
first_group,
group_count,
data_size,
data.as_mut_ptr() as *mut std::ffi::c_void,
);
data.set_len(data_size);
err_code.result_with_success(data)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.html>"]
pub unsafe fn get_ray_tracing_capture_replay_shader_group_handles(
&self,
device: vk::Device,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
) -> VkResult<Vec<u8>> {
let mut data: Vec<u8> = Vec::with_capacity(data_size);
self.ray_tracing_fn
.get_ray_tracing_capture_replay_shader_group_handles_khr(
device,
pipeline,
first_group,
group_count,
data_size,
data.as_mut_ptr() as *mut _,
)
.result_with_success(data)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdTraceRaysIndirectKHR.html>"]
pub unsafe fn cmd_trace_rays_indirect(
&self,
command_buffer: vk::CommandBuffer,
raygen_shader_binding_table: &[vk::StridedDeviceAddressRegionKHR],
miss_shader_binding_table: &[vk::StridedDeviceAddressRegionKHR],
hit_shader_binding_table: &[vk::StridedDeviceAddressRegionKHR],
callable_shader_binding_table: &[vk::StridedDeviceAddressRegionKHR],
indirect_device_address: vk::DeviceAddress,
) {
self.ray_tracing_fn.cmd_trace_rays_indirect_khr(
command_buffer,
raygen_shader_binding_table.as_ptr(),
miss_shader_binding_table.as_ptr(),
hit_shader_binding_table.as_ptr(),
callable_shader_binding_table.as_ptr(),
indirect_device_address,
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetRayTracingShaderGroupStackSizeKHR.html>"]
pub unsafe fn get_ray_tracing_shader_group_stack_size(
&self,
device: vk::Device,
pipeline: vk::Pipeline,
group: u32,
group_shader: vk::ShaderGroupShaderKHR,
) -> vk::DeviceSize {
self.ray_tracing_fn
.get_ray_tracing_shader_group_stack_size_khr(device, pipeline, group, group_shader)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetRayTracingPipelineStackSizeKHR.html>"]
pub unsafe fn cmd_set_ray_tracing_pipeline_stack_size(
&self,
command_buffer: vk::CommandBuffer,
pipeline_stack_size: u32,
) {
self.ray_tracing_fn
.cmd_set_ray_tracing_pipeline_stack_size_khr(command_buffer, pipeline_stack_size);
}
pub fn name() -> &'static CStr {
vk::KhrRayTracingPipelineFn::name()
}
pub fn fp(&self) -> &vk::KhrRayTracingPipelineFn {
&self.ray_tracing_fn
}
pub fn device(&self) -> vk::Device {
self.handle
}
}

View file

@ -21,7 +21,6 @@ pub type DescriptorBindingFlagsEXT = DescriptorBindingFlags;
pub type ResolveModeFlagsKHR = ResolveModeFlags;
pub type DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate;
pub type SamplerYcbcrConversionKHR = SamplerYcbcrConversion;
pub type AccelerationStructureNV = AccelerationStructureKHR;
pub type DescriptorUpdateTemplateTypeKHR = DescriptorUpdateTemplateType;
pub type PointClippingBehaviorKHR = PointClippingBehavior;
pub type SemaphoreTypeKHR = SemaphoreType;
@ -29,8 +28,6 @@ pub type CopyAccelerationStructureModeNV = CopyAccelerationStructureModeKHR;
pub type AccelerationStructureTypeNV = AccelerationStructureTypeKHR;
pub type GeometryTypeNV = GeometryTypeKHR;
pub type RayTracingShaderGroupTypeNV = RayTracingShaderGroupTypeKHR;
pub type AccelerationStructureMemoryRequirementsTypeNV =
AccelerationStructureMemoryRequirementsTypeKHR;
pub type TessellationDomainOriginKHR = TessellationDomainOrigin;
pub type SamplerYcbcrModelConversionKHR = SamplerYcbcrModelConversion;
pub type SamplerYcbcrRangeKHR = SamplerYcbcrRange;
@ -144,8 +141,6 @@ pub type PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomic
pub type PhysicalDeviceDepthStencilResolvePropertiesKHR =
PhysicalDeviceDepthStencilResolveProperties;
pub type SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve;
pub type BindAccelerationStructureMemoryInfoNV = BindAccelerationStructureMemoryInfoKHR;
pub type WriteDescriptorSetAccelerationStructureNV = WriteDescriptorSetAccelerationStructureKHR;
pub type ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo;
pub type PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures;
pub type PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR =

View file

@ -7,17 +7,6 @@ vk_bitflags_wrapped!(PipelineCacheCreateFlags, 0b0, Flags);
impl PipelineCacheCreateFlags {}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCullModeFlagBits.html>"]
pub struct CullModeFlags(pub(crate) Flags);
vk_bitflags_wrapped!(CullModeFlags, 0b11, Flags);
impl CullModeFlags {
pub const NONE: Self = Self(0);
pub const FRONT: Self = Self(0b1);
pub const BACK: Self = Self(0b10);
pub const FRONT_AND_BACK: Self = Self(0x0000_0003);
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueueFlagBits.html>"]
pub struct QueueFlags(pub(crate) Flags);
vk_bitflags_wrapped!(QueueFlags, 0b1111, Flags);
@ -33,6 +22,17 @@ impl QueueFlags {
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCullModeFlagBits.html>"]
pub struct CullModeFlags(pub(crate) Flags);
vk_bitflags_wrapped!(CullModeFlags, 0b11, Flags);
impl CullModeFlags {
pub const NONE: Self = Self(0);
pub const FRONT: Self = Self(0b1);
pub const BACK: Self = Self(0b10);
pub const FRONT_AND_BACK: Self = Self(0x0000_0003);
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRenderPassCreateFlagBits.html>"]
pub struct RenderPassCreateFlags(pub(crate) Flags);
vk_bitflags_wrapped!(RenderPassCreateFlags, 0b0, Flags);
@ -256,12 +256,6 @@ impl FenceCreateFlags {
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSemaphoreCreateFlagBits.html>"]
pub struct SemaphoreCreateFlags(pub(crate) Flags);
vk_bitflags_wrapped!(SemaphoreCreateFlags, 0b0, Flags);
impl SemaphoreCreateFlags {}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFormatFeatureFlagBits.html>"]
pub struct FormatFeatureFlags(pub(crate) Flags);
vk_bitflags_wrapped!(FormatFeatureFlags, 0b1_1111_1111_1111, Flags);
@ -651,6 +645,12 @@ impl IndirectStateFlagsNV {
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPrivateDataSlotCreateFlagBitsEXT.html>"]
pub struct PrivateDataSlotCreateFlagsEXT(pub(crate) Flags);
vk_bitflags_wrapped!(PrivateDataSlotCreateFlagsEXT, 0b0, Flags);
impl PrivateDataSlotCreateFlagsEXT {}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayoutCreateFlagBits.html>"]
pub struct DescriptorSetLayoutCreateFlags(pub(crate) Flags);
vk_bitflags_wrapped!(DescriptorSetLayoutCreateFlags, 0b0, Flags);
@ -881,6 +881,14 @@ impl BuildAccelerationStructureFlagsKHR {
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureCreateFlagBitsKHR.html>"]
pub struct AccelerationStructureCreateFlagsKHR(pub(crate) Flags);
vk_bitflags_wrapped!(AccelerationStructureCreateFlagsKHR, 0b1, Flags);
impl AccelerationStructureCreateFlagsKHR {
pub const DEVICE_ADDRESS_CAPTURE_REPLAY: Self = Self(0b1);
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFramebufferCreateFlagBits.html>"]
pub struct FramebufferCreateFlags(pub(crate) Flags);
vk_bitflags_wrapped!(FramebufferCreateFlags, 0b0, Flags);

View file

@ -42,7 +42,30 @@ impl fmt::Debug for AccelerationStructureBuildTypeKHR {
}
}
}
impl fmt::Debug for AccelerationStructureMemoryRequirementsTypeKHR {
impl fmt::Debug for AccelerationStructureCompatibilityKHR {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::COMPATIBLE => Some("COMPATIBLE"),
Self::INCOMPATIBLE => Some("INCOMPATIBLE"),
_ => None,
};
if let Some(x) = name {
f.write_str(x)
} else {
self.0.fmt(f)
}
}
}
impl fmt::Debug for AccelerationStructureCreateFlagsKHR {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[(
AccelerationStructureCreateFlagsKHR::DEVICE_ADDRESS_CAPTURE_REPLAY.0,
"DEVICE_ADDRESS_CAPTURE_REPLAY",
)];
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for AccelerationStructureMemoryRequirementsTypeNV {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::OBJECT => Some("OBJECT"),
@ -62,6 +85,7 @@ impl fmt::Debug for AccelerationStructureTypeKHR {
let name = match *self {
Self::TOP_LEVEL => Some("TOP_LEVEL"),
Self::BOTTOM_LEVEL => Some("BOTTOM_LEVEL"),
Self::GENERIC => Some("GENERIC"),
_ => None,
};
if let Some(x) = name {
@ -113,7 +137,6 @@ impl fmt::Debug for AccessFlags {
(AccessFlags::MEMORY_READ.0, "MEMORY_READ"),
(AccessFlags::MEMORY_WRITE.0, "MEMORY_WRITE"),
(AccessFlags::RESERVED_30_KHR.0, "RESERVED_30_KHR"),
(AccessFlags::RESERVED_31_KHR.0, "RESERVED_31_KHR"),
(AccessFlags::RESERVED_28_KHR.0, "RESERVED_28_KHR"),
(AccessFlags::RESERVED_29_KHR.0, "RESERVED_29_KHR"),
(
@ -202,6 +225,7 @@ impl fmt::Debug for AttachmentStoreOp {
let name = match *self {
Self::STORE => Some("STORE"),
Self::DONT_CARE => Some("DONT_CARE"),
Self::NONE_QCOM => Some("NONE_QCOM"),
_ => None,
};
if let Some(x) = name {
@ -329,6 +353,8 @@ impl fmt::Debug for BorderColor {
Self::INT_OPAQUE_BLACK => Some("INT_OPAQUE_BLACK"),
Self::FLOAT_OPAQUE_WHITE => Some("FLOAT_OPAQUE_WHITE"),
Self::INT_OPAQUE_WHITE => Some("INT_OPAQUE_WHITE"),
Self::FLOAT_CUSTOM_EXT => Some("FLOAT_CUSTOM_EXT"),
Self::INT_CUSTOM_EXT => Some("INT_CUSTOM_EXT"),
_ => None,
};
if let Some(x) = name {
@ -344,6 +370,7 @@ impl fmt::Debug for BufferCreateFlags {
(BufferCreateFlags::SPARSE_BINDING.0, "SPARSE_BINDING"),
(BufferCreateFlags::SPARSE_RESIDENCY.0, "SPARSE_RESIDENCY"),
(BufferCreateFlags::SPARSE_ALIASED.0, "SPARSE_ALIASED"),
(BufferCreateFlags::RESERVED_5_NV.0, "RESERVED_5_NV"),
(BufferCreateFlags::PROTECTED.0, "PROTECTED"),
(
BufferCreateFlags::DEVICE_ADDRESS_CAPTURE_REPLAY.0,
@ -387,7 +414,18 @@ impl fmt::Debug for BufferUsageFlags {
BufferUsageFlags::CONDITIONAL_RENDERING_EXT.0,
"CONDITIONAL_RENDERING_EXT",
),
(BufferUsageFlags::RAY_TRACING_KHR.0, "RAY_TRACING_KHR"),
(
BufferUsageFlags::ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_KHR.0,
"ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_KHR",
),
(
BufferUsageFlags::ACCELERATION_STRUCTURE_STORAGE_KHR.0,
"ACCELERATION_STRUCTURE_STORAGE_KHR",
),
(
BufferUsageFlags::SHADER_BINDING_TABLE_KHR.0,
"SHADER_BINDING_TABLE_KHR",
),
(BufferUsageFlags::RESERVED_18_QCOM.0, "RESERVED_18_QCOM"),
(
BufferUsageFlags::SHADER_DEVICE_ADDRESS.0,
@ -430,6 +468,20 @@ impl fmt::Debug for BuildAccelerationStructureFlagsKHR {
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for BuildAccelerationStructureModeKHR {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::BUILD => Some("BUILD"),
Self::UPDATE => Some("UPDATE"),
_ => None,
};
if let Some(x) = name {
f.write_str(x)
} else {
self.0.fmt(f)
}
}
}
impl fmt::Debug for ChromaLocation {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
@ -773,6 +825,7 @@ impl fmt::Debug for DebugReportObjectTypeEXT {
Self::SAMPLER_YCBCR_CONVERSION => Some("SAMPLER_YCBCR_CONVERSION"),
Self::DESCRIPTOR_UPDATE_TEMPLATE => Some("DESCRIPTOR_UPDATE_TEMPLATE"),
Self::ACCELERATION_STRUCTURE_KHR => Some("ACCELERATION_STRUCTURE_KHR"),
Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"),
_ => None,
};
if let Some(x) = name {
@ -841,6 +894,7 @@ impl fmt::Debug for DescriptorBindingFlags {
DescriptorBindingFlags::VARIABLE_DESCRIPTOR_COUNT.0,
"VARIABLE_DESCRIPTOR_COUNT",
),
(DescriptorBindingFlags::RESERVED_4_QCOM.0, "RESERVED_4_QCOM"),
];
debug_flags(f, KNOWN, self.0)
}
@ -897,6 +951,7 @@ impl fmt::Debug for DescriptorType {
Self::INPUT_ATTACHMENT => Some("INPUT_ATTACHMENT"),
Self::INLINE_UNIFORM_BLOCK_EXT => Some("INLINE_UNIFORM_BLOCK_EXT"),
Self::ACCELERATION_STRUCTURE_KHR => Some("ACCELERATION_STRUCTURE_KHR"),
Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"),
_ => None,
};
if let Some(x) = name {
@ -978,12 +1033,41 @@ impl fmt::Debug for DeviceGroupPresentModeFlagsKHR {
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for DeviceMemoryReportEventTypeEXT {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::ALLOCATE => Some("ALLOCATE"),
Self::FREE => Some("FREE"),
Self::IMPORT => Some("IMPORT"),
Self::UNIMPORT => Some("UNIMPORT"),
Self::ALLOCATION_FAILED => Some("ALLOCATION_FAILED"),
_ => None,
};
if let Some(x) = name {
f.write_str(x)
} else {
self.0.fmt(f)
}
}
}
impl fmt::Debug for DeviceMemoryReportFlagsEXT {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[];
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for DeviceQueueCreateFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[(DeviceQueueCreateFlags::PROTECTED.0, "PROTECTED")];
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for DirectFBSurfaceCreateFlagsEXT {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[];
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for DiscardRectangleModeEXT {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
@ -1067,6 +1151,8 @@ impl fmt::Debug for DriverId {
Self::GOOGLE_SWIFTSHADER => Some("GOOGLE_SWIFTSHADER"),
Self::GGP_PROPRIETARY => Some("GGP_PROPRIETARY"),
Self::BROADCOM_PROPRIETARY => Some("BROADCOM_PROPRIETARY"),
Self::MESA_LLVMPIPE => Some("MESA_LLVMPIPE"),
Self::MOLTEN => Some("MOLTEN"),
_ => None,
};
if let Some(x) = name {
@ -1091,10 +1177,26 @@ impl fmt::Debug for DynamicState {
Self::VIEWPORT_W_SCALING_NV => Some("VIEWPORT_W_SCALING_NV"),
Self::DISCARD_RECTANGLE_EXT => Some("DISCARD_RECTANGLE_EXT"),
Self::SAMPLE_LOCATIONS_EXT => Some("SAMPLE_LOCATIONS_EXT"),
Self::RAY_TRACING_PIPELINE_STACK_SIZE_KHR => {
Some("RAY_TRACING_PIPELINE_STACK_SIZE_KHR")
}
Self::VIEWPORT_SHADING_RATE_PALETTE_NV => Some("VIEWPORT_SHADING_RATE_PALETTE_NV"),
Self::VIEWPORT_COARSE_SAMPLE_ORDER_NV => Some("VIEWPORT_COARSE_SAMPLE_ORDER_NV"),
Self::EXCLUSIVE_SCISSOR_NV => Some("EXCLUSIVE_SCISSOR_NV"),
Self::FRAGMENT_SHADING_RATE_KHR => Some("FRAGMENT_SHADING_RATE_KHR"),
Self::LINE_STIPPLE_EXT => Some("LINE_STIPPLE_EXT"),
Self::CULL_MODE_EXT => Some("CULL_MODE_EXT"),
Self::FRONT_FACE_EXT => Some("FRONT_FACE_EXT"),
Self::PRIMITIVE_TOPOLOGY_EXT => Some("PRIMITIVE_TOPOLOGY_EXT"),
Self::VIEWPORT_WITH_COUNT_EXT => Some("VIEWPORT_WITH_COUNT_EXT"),
Self::SCISSOR_WITH_COUNT_EXT => Some("SCISSOR_WITH_COUNT_EXT"),
Self::VERTEX_INPUT_BINDING_STRIDE_EXT => Some("VERTEX_INPUT_BINDING_STRIDE_EXT"),
Self::DEPTH_TEST_ENABLE_EXT => Some("DEPTH_TEST_ENABLE_EXT"),
Self::DEPTH_WRITE_ENABLE_EXT => Some("DEPTH_WRITE_ENABLE_EXT"),
Self::DEPTH_COMPARE_OP_EXT => Some("DEPTH_COMPARE_OP_EXT"),
Self::DEPTH_BOUNDS_TEST_ENABLE_EXT => Some("DEPTH_BOUNDS_TEST_ENABLE_EXT"),
Self::STENCIL_TEST_ENABLE_EXT => Some("STENCIL_TEST_ENABLE_EXT"),
Self::STENCIL_OP_EXT => Some("STENCIL_OP_EXT"),
_ => None,
};
if let Some(x) = name {
@ -1494,6 +1596,38 @@ impl fmt::Debug for Format {
Self::ASTC_10X10_SFLOAT_BLOCK_EXT => Some("ASTC_10X10_SFLOAT_BLOCK_EXT"),
Self::ASTC_12X10_SFLOAT_BLOCK_EXT => Some("ASTC_12X10_SFLOAT_BLOCK_EXT"),
Self::ASTC_12X12_SFLOAT_BLOCK_EXT => Some("ASTC_12X12_SFLOAT_BLOCK_EXT"),
Self::ASTC_3X3X3_UNORM_BLOCK_EXT => Some("ASTC_3X3X3_UNORM_BLOCK_EXT"),
Self::ASTC_3X3X3_SRGB_BLOCK_EXT => Some("ASTC_3X3X3_SRGB_BLOCK_EXT"),
Self::ASTC_3X3X3_SFLOAT_BLOCK_EXT => Some("ASTC_3X3X3_SFLOAT_BLOCK_EXT"),
Self::ASTC_4X3X3_UNORM_BLOCK_EXT => Some("ASTC_4X3X3_UNORM_BLOCK_EXT"),
Self::ASTC_4X3X3_SRGB_BLOCK_EXT => Some("ASTC_4X3X3_SRGB_BLOCK_EXT"),
Self::ASTC_4X3X3_SFLOAT_BLOCK_EXT => Some("ASTC_4X3X3_SFLOAT_BLOCK_EXT"),
Self::ASTC_4X4X3_UNORM_BLOCK_EXT => Some("ASTC_4X4X3_UNORM_BLOCK_EXT"),
Self::ASTC_4X4X3_SRGB_BLOCK_EXT => Some("ASTC_4X4X3_SRGB_BLOCK_EXT"),
Self::ASTC_4X4X3_SFLOAT_BLOCK_EXT => Some("ASTC_4X4X3_SFLOAT_BLOCK_EXT"),
Self::ASTC_4X4X4_UNORM_BLOCK_EXT => Some("ASTC_4X4X4_UNORM_BLOCK_EXT"),
Self::ASTC_4X4X4_SRGB_BLOCK_EXT => Some("ASTC_4X4X4_SRGB_BLOCK_EXT"),
Self::ASTC_4X4X4_SFLOAT_BLOCK_EXT => Some("ASTC_4X4X4_SFLOAT_BLOCK_EXT"),
Self::ASTC_5X4X4_UNORM_BLOCK_EXT => Some("ASTC_5X4X4_UNORM_BLOCK_EXT"),
Self::ASTC_5X4X4_SRGB_BLOCK_EXT => Some("ASTC_5X4X4_SRGB_BLOCK_EXT"),
Self::ASTC_5X4X4_SFLOAT_BLOCK_EXT => Some("ASTC_5X4X4_SFLOAT_BLOCK_EXT"),
Self::ASTC_5X5X4_UNORM_BLOCK_EXT => Some("ASTC_5X5X4_UNORM_BLOCK_EXT"),
Self::ASTC_5X5X4_SRGB_BLOCK_EXT => Some("ASTC_5X5X4_SRGB_BLOCK_EXT"),
Self::ASTC_5X5X4_SFLOAT_BLOCK_EXT => Some("ASTC_5X5X4_SFLOAT_BLOCK_EXT"),
Self::ASTC_5X5X5_UNORM_BLOCK_EXT => Some("ASTC_5X5X5_UNORM_BLOCK_EXT"),
Self::ASTC_5X5X5_SRGB_BLOCK_EXT => Some("ASTC_5X5X5_SRGB_BLOCK_EXT"),
Self::ASTC_5X5X5_SFLOAT_BLOCK_EXT => Some("ASTC_5X5X5_SFLOAT_BLOCK_EXT"),
Self::ASTC_6X5X5_UNORM_BLOCK_EXT => Some("ASTC_6X5X5_UNORM_BLOCK_EXT"),
Self::ASTC_6X5X5_SRGB_BLOCK_EXT => Some("ASTC_6X5X5_SRGB_BLOCK_EXT"),
Self::ASTC_6X5X5_SFLOAT_BLOCK_EXT => Some("ASTC_6X5X5_SFLOAT_BLOCK_EXT"),
Self::ASTC_6X6X5_UNORM_BLOCK_EXT => Some("ASTC_6X6X5_UNORM_BLOCK_EXT"),
Self::ASTC_6X6X5_SRGB_BLOCK_EXT => Some("ASTC_6X6X5_SRGB_BLOCK_EXT"),
Self::ASTC_6X6X5_SFLOAT_BLOCK_EXT => Some("ASTC_6X6X5_SFLOAT_BLOCK_EXT"),
Self::ASTC_6X6X6_UNORM_BLOCK_EXT => Some("ASTC_6X6X6_UNORM_BLOCK_EXT"),
Self::ASTC_6X6X6_SRGB_BLOCK_EXT => Some("ASTC_6X6X6_SRGB_BLOCK_EXT"),
Self::ASTC_6X6X6_SFLOAT_BLOCK_EXT => Some("ASTC_6X6X6_SFLOAT_BLOCK_EXT"),
Self::A4R4G4B4_UNORM_PACK16_EXT => Some("A4R4G4B4_UNORM_PACK16_EXT"),
Self::A4B4G4R4_UNORM_PACK16_EXT => Some("A4B4G4R4_UNORM_PACK16_EXT"),
Self::G8B8G8R8_422_UNORM => Some("G8B8G8R8_422_UNORM"),
Self::B8G8R8G8_422_UNORM => Some("B8G8R8G8_422_UNORM"),
Self::G8_B8_R8_3PLANE_420_UNORM => Some("G8_B8_R8_3PLANE_420_UNORM"),
@ -1567,10 +1701,65 @@ impl fmt::Debug for Format {
}
impl fmt::Debug for FormatFeatureFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN : & [ ( Flags , & str ) ] = & [ ( FormatFeatureFlags :: SAMPLED_IMAGE . 0 , "SAMPLED_IMAGE" ) , ( FormatFeatureFlags :: STORAGE_IMAGE . 0 , "STORAGE_IMAGE" ) , ( FormatFeatureFlags :: STORAGE_IMAGE_ATOMIC . 0 , "STORAGE_IMAGE_ATOMIC" ) , ( FormatFeatureFlags :: UNIFORM_TEXEL_BUFFER . 0 , "UNIFORM_TEXEL_BUFFER" ) , ( FormatFeatureFlags :: STORAGE_TEXEL_BUFFER . 0 , "STORAGE_TEXEL_BUFFER" ) , ( FormatFeatureFlags :: STORAGE_TEXEL_BUFFER_ATOMIC . 0 , "STORAGE_TEXEL_BUFFER_ATOMIC" ) , ( FormatFeatureFlags :: VERTEX_BUFFER . 0 , "VERTEX_BUFFER" ) , ( FormatFeatureFlags :: COLOR_ATTACHMENT . 0 , "COLOR_ATTACHMENT" ) , ( FormatFeatureFlags :: COLOR_ATTACHMENT_BLEND . 0 , "COLOR_ATTACHMENT_BLEND" ) , ( FormatFeatureFlags :: DEPTH_STENCIL_ATTACHMENT . 0 , "DEPTH_STENCIL_ATTACHMENT" ) , ( FormatFeatureFlags :: BLIT_SRC . 0 , "BLIT_SRC" ) , ( FormatFeatureFlags :: BLIT_DST . 0 , "BLIT_DST" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_LINEAR . 0 , "SAMPLED_IMAGE_FILTER_LINEAR" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_CUBIC_IMG . 0 , "SAMPLED_IMAGE_FILTER_CUBIC_IMG" ) , ( FormatFeatureFlags :: RESERVED_27_KHR . 0 , "RESERVED_27_KHR" ) , ( FormatFeatureFlags :: RESERVED_28_KHR . 0 , "RESERVED_28_KHR" ) , ( FormatFeatureFlags :: RESERVED_25_KHR . 0 , "RESERVED_25_KHR" ) , ( FormatFeatureFlags :: RESERVED_26_KHR . 0 , "RESERVED_26_KHR" ) , ( FormatFeatureFlags :: ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR . 0 , "ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR" ) , ( FormatFeatureFlags :: FRAGMENT_DENSITY_MAP_EXT . 0 , "FRAGMENT_DENSITY_MAP_EXT" ) , ( FormatFeatureFlags :: TRANSFER_SRC . 0 , "TRANSFER_SRC" ) , ( FormatFeatureFlags :: TRANSFER_DST . 0 , "TRANSFER_DST" ) , ( FormatFeatureFlags :: MIDPOINT_CHROMA_SAMPLES . 0 , "MIDPOINT_CHROMA_SAMPLES" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE" ) , ( FormatFeatureFlags :: DISJOINT . 0 , "DISJOINT" ) , ( FormatFeatureFlags :: COSITED_CHROMA_SAMPLES . 0 , "COSITED_CHROMA_SAMPLES" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_MINMAX . 0 , "SAMPLED_IMAGE_FILTER_MINMAX" ) ] ;
const KNOWN : & [ ( Flags , & str ) ] = & [ ( FormatFeatureFlags :: SAMPLED_IMAGE . 0 , "SAMPLED_IMAGE" ) , ( FormatFeatureFlags :: STORAGE_IMAGE . 0 , "STORAGE_IMAGE" ) , ( FormatFeatureFlags :: STORAGE_IMAGE_ATOMIC . 0 , "STORAGE_IMAGE_ATOMIC" ) , ( FormatFeatureFlags :: UNIFORM_TEXEL_BUFFER . 0 , "UNIFORM_TEXEL_BUFFER" ) , ( FormatFeatureFlags :: STORAGE_TEXEL_BUFFER . 0 , "STORAGE_TEXEL_BUFFER" ) , ( FormatFeatureFlags :: STORAGE_TEXEL_BUFFER_ATOMIC . 0 , "STORAGE_TEXEL_BUFFER_ATOMIC" ) , ( FormatFeatureFlags :: VERTEX_BUFFER . 0 , "VERTEX_BUFFER" ) , ( FormatFeatureFlags :: COLOR_ATTACHMENT . 0 , "COLOR_ATTACHMENT" ) , ( FormatFeatureFlags :: COLOR_ATTACHMENT_BLEND . 0 , "COLOR_ATTACHMENT_BLEND" ) , ( FormatFeatureFlags :: DEPTH_STENCIL_ATTACHMENT . 0 , "DEPTH_STENCIL_ATTACHMENT" ) , ( FormatFeatureFlags :: BLIT_SRC . 0 , "BLIT_SRC" ) , ( FormatFeatureFlags :: BLIT_DST . 0 , "BLIT_DST" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_LINEAR . 0 , "SAMPLED_IMAGE_FILTER_LINEAR" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_CUBIC_IMG . 0 , "SAMPLED_IMAGE_FILTER_CUBIC_IMG" ) , ( FormatFeatureFlags :: RESERVED_27_KHR . 0 , "RESERVED_27_KHR" ) , ( FormatFeatureFlags :: RESERVED_28_KHR . 0 , "RESERVED_28_KHR" ) , ( FormatFeatureFlags :: RESERVED_25_KHR . 0 , "RESERVED_25_KHR" ) , ( FormatFeatureFlags :: RESERVED_26_KHR . 0 , "RESERVED_26_KHR" ) , ( FormatFeatureFlags :: ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR . 0 , "ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR" ) , ( FormatFeatureFlags :: FRAGMENT_DENSITY_MAP_EXT . 0 , "FRAGMENT_DENSITY_MAP_EXT" ) , ( FormatFeatureFlags :: FRAGMENT_SHADING_RATE_ATTACHMENT_KHR . 0 , "FRAGMENT_SHADING_RATE_ATTACHMENT_KHR" ) , ( FormatFeatureFlags :: TRANSFER_SRC . 0 , "TRANSFER_SRC" ) , ( FormatFeatureFlags :: TRANSFER_DST . 0 , "TRANSFER_DST" ) , ( FormatFeatureFlags :: MIDPOINT_CHROMA_SAMPLES . 0 , "MIDPOINT_CHROMA_SAMPLES" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE" ) , ( FormatFeatureFlags :: DISJOINT . 0 , "DISJOINT" ) , ( FormatFeatureFlags :: COSITED_CHROMA_SAMPLES . 0 , "COSITED_CHROMA_SAMPLES" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_MINMAX . 0 , "SAMPLED_IMAGE_FILTER_MINMAX" ) ] ;
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for FragmentShadingRateCombinerOpKHR {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::KEEP => Some("KEEP"),
Self::REPLACE => Some("REPLACE"),
Self::MIN => Some("MIN"),
Self::MAX => Some("MAX"),
Self::MUL => Some("MUL"),
_ => None,
};
if let Some(x) = name {
f.write_str(x)
} else {
self.0.fmt(f)
}
}
}
impl fmt::Debug for FragmentShadingRateNV {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::TYPE_1_INVOCATION_PER_PIXEL => Some("TYPE_1_INVOCATION_PER_PIXEL"),
Self::TYPE_1_INVOCATION_PER_1X2_PIXELS => Some("TYPE_1_INVOCATION_PER_1X2_PIXELS"),
Self::TYPE_1_INVOCATION_PER_2X1_PIXELS => Some("TYPE_1_INVOCATION_PER_2X1_PIXELS"),
Self::TYPE_1_INVOCATION_PER_2X2_PIXELS => Some("TYPE_1_INVOCATION_PER_2X2_PIXELS"),
Self::TYPE_1_INVOCATION_PER_2X4_PIXELS => Some("TYPE_1_INVOCATION_PER_2X4_PIXELS"),
Self::TYPE_1_INVOCATION_PER_4X2_PIXELS => Some("TYPE_1_INVOCATION_PER_4X2_PIXELS"),
Self::TYPE_1_INVOCATION_PER_4X4_PIXELS => Some("TYPE_1_INVOCATION_PER_4X4_PIXELS"),
Self::TYPE_2_INVOCATIONS_PER_PIXEL => Some("TYPE_2_INVOCATIONS_PER_PIXEL"),
Self::TYPE_4_INVOCATIONS_PER_PIXEL => Some("TYPE_4_INVOCATIONS_PER_PIXEL"),
Self::TYPE_8_INVOCATIONS_PER_PIXEL => Some("TYPE_8_INVOCATIONS_PER_PIXEL"),
Self::TYPE_16_INVOCATIONS_PER_PIXEL => Some("TYPE_16_INVOCATIONS_PER_PIXEL"),
Self::NO_INVOCATIONS => Some("NO_INVOCATIONS"),
_ => None,
};
if let Some(x) = name {
f.write_str(x)
} else {
self.0.fmt(f)
}
}
}
impl fmt::Debug for FragmentShadingRateTypeNV {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::FRAGMENT_SIZE => Some("FRAGMENT_SIZE"),
Self::ENUMS => Some("ENUMS"),
_ => None,
};
if let Some(x) = name {
f.write_str(x)
} else {
self.0.fmt(f)
}
}
}
impl fmt::Debug for FramebufferCreateFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[(FramebufferCreateFlags::IMAGELESS.0, "IMAGELESS")];
@ -1698,6 +1887,7 @@ impl fmt::Debug for ImageCreateFlags {
"SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_EXT",
),
(ImageCreateFlags::SUBSAMPLED_EXT.0, "SUBSAMPLED_EXT"),
(ImageCreateFlags::RESERVED_15_NV.0, "RESERVED_15_NV"),
(ImageCreateFlags::ALIAS.0, "ALIAS"),
(
ImageCreateFlags::SPLIT_INSTANCE_BIND_REGIONS.0,
@ -1828,10 +2018,16 @@ impl fmt::Debug for ImageUsageFlags {
}
impl fmt::Debug for ImageViewCreateFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[(
ImageViewCreateFlags::FRAGMENT_DENSITY_MAP_DYNAMIC_EXT.0,
"FRAGMENT_DENSITY_MAP_DYNAMIC_EXT",
)];
const KNOWN: &[(Flags, &str)] = &[
(
ImageViewCreateFlags::FRAGMENT_DENSITY_MAP_DYNAMIC_EXT.0,
"FRAGMENT_DENSITY_MAP_DYNAMIC_EXT",
),
(
ImageViewCreateFlags::FRAGMENT_DENSITY_MAP_DEFERRED_EXT.0,
"FRAGMENT_DENSITY_MAP_DEFERRED_EXT",
),
];
debug_flags(f, KNOWN, self.0)
}
}
@ -2093,9 +2289,11 @@ impl fmt::Debug for ObjectType {
Self::DEBUG_UTILS_MESSENGER_EXT => Some("DEBUG_UTILS_MESSENGER_EXT"),
Self::ACCELERATION_STRUCTURE_KHR => Some("ACCELERATION_STRUCTURE_KHR"),
Self::VALIDATION_CACHE_EXT => Some("VALIDATION_CACHE_EXT"),
Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"),
Self::PERFORMANCE_CONFIGURATION_INTEL => Some("PERFORMANCE_CONFIGURATION_INTEL"),
Self::DEFERRED_OPERATION_KHR => Some("DEFERRED_OPERATION_KHR"),
Self::INDIRECT_COMMANDS_LAYOUT_NV => Some("INDIRECT_COMMANDS_LAYOUT_NV"),
Self::PRIVATE_DATA_SLOT_EXT => Some("PRIVATE_DATA_SLOT_EXT"),
Self::SAMPLER_YCBCR_CONVERSION => Some("SAMPLER_YCBCR_CONVERSION"),
Self::DESCRIPTOR_UPDATE_TEMPLATE => Some("DESCRIPTOR_UPDATE_TEMPLATE"),
_ => None,
@ -2292,10 +2490,14 @@ impl fmt::Debug for PipelineBindPoint {
}
impl fmt::Debug for PipelineCacheCreateFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[(
PipelineCacheCreateFlags::EXTERNALLY_SYNCHRONIZED_EXT.0,
"EXTERNALLY_SYNCHRONIZED_EXT",
)];
const KNOWN: &[(Flags, &str)] = &[
(PipelineCacheCreateFlags::RESERVED_1_EXT.0, "RESERVED_1_EXT"),
(
PipelineCacheCreateFlags::EXTERNALLY_SYNCHRONIZED_EXT.0,
"EXTERNALLY_SYNCHRONIZED_EXT",
),
(PipelineCacheCreateFlags::RESERVED_2_EXT.0, "RESERVED_2_EXT"),
];
debug_flags(f, KNOWN, self.0)
}
}
@ -2378,6 +2580,10 @@ impl fmt::Debug for PipelineCreateFlags {
PipelineCreateFlags::RAY_TRACING_SKIP_AABBS_KHR.0,
"RAY_TRACING_SKIP_AABBS_KHR",
),
(
PipelineCreateFlags::RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_KHR.0,
"RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_KHR",
),
(PipelineCreateFlags::DEFER_COMPILE_NV.0, "DEFER_COMPILE_NV"),
(
PipelineCreateFlags::CAPTURE_STATISTICS_KHR.0,
@ -2569,14 +2775,14 @@ impl fmt::Debug for PipelineStageFlags {
PipelineStageFlags::CONDITIONAL_RENDERING_EXT.0,
"CONDITIONAL_RENDERING_EXT",
),
(
PipelineStageFlags::RAY_TRACING_SHADER_KHR.0,
"RAY_TRACING_SHADER_KHR",
),
(
PipelineStageFlags::ACCELERATION_STRUCTURE_BUILD_KHR.0,
"ACCELERATION_STRUCTURE_BUILD_KHR",
),
(
PipelineStageFlags::RAY_TRACING_SHADER_KHR.0,
"RAY_TRACING_SHADER_KHR",
),
(
PipelineStageFlags::SHADING_RATE_IMAGE_NV.0,
"SHADING_RATE_IMAGE_NV",
@ -2690,6 +2896,12 @@ impl fmt::Debug for PrimitiveTopology {
}
}
}
impl fmt::Debug for PrivateDataSlotCreateFlagsEXT {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[];
debug_flags(f, KNOWN, self.0)
}
}
impl fmt::Debug for QueryControlFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[(QueryControlFlags::PRECISE.0, "PRECISE")];
@ -2795,6 +3007,9 @@ impl fmt::Debug for QueryType {
Self::ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR => {
Some("ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR")
}
Self::ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV => {
Some("ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV")
}
Self::PERFORMANCE_QUERY_INTEL => Some("PERFORMANCE_QUERY_INTEL"),
_ => None,
};
@ -2914,7 +3129,6 @@ impl fmt::Debug for Result {
Self::ERROR_INCOMPATIBLE_DISPLAY_KHR => Some("ERROR_INCOMPATIBLE_DISPLAY_KHR"),
Self::ERROR_VALIDATION_FAILED_EXT => Some("ERROR_VALIDATION_FAILED_EXT"),
Self::ERROR_INVALID_SHADER_NV => Some("ERROR_INVALID_SHADER_NV"),
Self::ERROR_INCOMPATIBLE_VERSION_KHR => Some("ERROR_INCOMPATIBLE_VERSION_KHR"),
Self::ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT => {
Some("ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT")
}
@ -2926,9 +3140,7 @@ impl fmt::Debug for Result {
Self::THREAD_DONE_KHR => Some("THREAD_DONE_KHR"),
Self::OPERATION_DEFERRED_KHR => Some("OPERATION_DEFERRED_KHR"),
Self::OPERATION_NOT_DEFERRED_KHR => Some("OPERATION_NOT_DEFERRED_KHR"),
Self::ERROR_PIPELINE_COMPILE_REQUIRED_EXT => {
Some("ERROR_PIPELINE_COMPILE_REQUIRED_EXT")
}
Self::PIPELINE_COMPILE_REQUIRED_EXT => Some("PIPELINE_COMPILE_REQUIRED_EXT"),
Self::ERROR_OUT_OF_POOL_MEMORY => Some("ERROR_OUT_OF_POOL_MEMORY"),
Self::ERROR_INVALID_EXTERNAL_HANDLE => Some("ERROR_INVALID_EXTERNAL_HANDLE"),
Self::ERROR_FRAGMENTATION => Some("ERROR_FRAGMENTATION"),
@ -3116,6 +3328,22 @@ impl fmt::Debug for ShaderFloatControlsIndependence {
}
}
}
impl fmt::Debug for ShaderGroupShaderKHR {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
Self::GENERAL => Some("GENERAL"),
Self::CLOSEST_HIT => Some("CLOSEST_HIT"),
Self::ANY_HIT => Some("ANY_HIT"),
Self::INTERSECTION => Some("INTERSECTION"),
_ => None,
};
if let Some(x) = name {
f.write_str(x)
} else {
self.0.fmt(f)
}
}
}
impl fmt::Debug for ShaderInfoTypeAMD {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
@ -3388,6 +3616,7 @@ impl fmt::Debug for StructureType {
Some("PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT")
}
Self::IMAGE_VIEW_HANDLE_INFO_NVX => Some("IMAGE_VIEW_HANDLE_INFO_NVX"),
Self::IMAGE_VIEW_ADDRESS_PROPERTIES_NVX => Some("IMAGE_VIEW_ADDRESS_PROPERTIES_NVX"),
Self::TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD => {
Some("TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD")
}
@ -3581,18 +3810,12 @@ impl fmt::Debug for StructureType {
Self::PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV => {
Some("PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV")
}
Self::BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_KHR => {
Some("BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_KHR")
}
Self::WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR => {
Some("WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR")
}
Self::ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR => {
Some("ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR")
}
Self::ACCELERATION_STRUCTURE_CREATE_GEOMETRY_TYPE_INFO_KHR => {
Some("ACCELERATION_STRUCTURE_CREATE_GEOMETRY_TYPE_INFO_KHR")
}
Self::ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR => {
Some("ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR")
}
@ -3608,11 +3831,9 @@ impl fmt::Debug for StructureType {
Self::ACCELERATION_STRUCTURE_GEOMETRY_KHR => {
Some("ACCELERATION_STRUCTURE_GEOMETRY_KHR")
}
Self::ACCELERATION_STRUCTURE_INFO_KHR => Some("ACCELERATION_STRUCTURE_INFO_KHR"),
Self::ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_KHR => {
Some("ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_KHR")
Self::ACCELERATION_STRUCTURE_VERSION_INFO_KHR => {
Some("ACCELERATION_STRUCTURE_VERSION_INFO_KHR")
}
Self::ACCELERATION_STRUCTURE_VERSION_KHR => Some("ACCELERATION_STRUCTURE_VERSION_KHR"),
Self::COPY_ACCELERATION_STRUCTURE_INFO_KHR => {
Some("COPY_ACCELERATION_STRUCTURE_INFO_KHR")
}
@ -3622,11 +3843,23 @@ impl fmt::Debug for StructureType {
Self::COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR => {
Some("COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR")
}
Self::PHYSICAL_DEVICE_RAY_TRACING_FEATURES_KHR => {
Some("PHYSICAL_DEVICE_RAY_TRACING_FEATURES_KHR")
Self::PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR => {
Some("PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR")
}
Self::PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR => {
Some("PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR")
Self::PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR => {
Some("PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR")
}
Self::ACCELERATION_STRUCTURE_CREATE_INFO_KHR => {
Some("ACCELERATION_STRUCTURE_CREATE_INFO_KHR")
}
Self::ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR => {
Some("ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR")
}
Self::PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR => {
Some("PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR")
}
Self::PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR => {
Some("PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR")
}
Self::RAY_TRACING_PIPELINE_CREATE_INFO_KHR => {
Some("RAY_TRACING_PIPELINE_CREATE_INFO_KHR")
@ -3634,12 +3867,12 @@ impl fmt::Debug for StructureType {
Self::RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR => {
Some("RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR")
}
Self::ACCELERATION_STRUCTURE_CREATE_INFO_KHR => {
Some("ACCELERATION_STRUCTURE_CREATE_INFO_KHR")
}
Self::RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR => {
Some("RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR")
}
Self::PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR => {
Some("PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR")
}
Self::PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV => {
Some("PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV")
}
@ -3652,7 +3885,6 @@ impl fmt::Debug for StructureType {
Self::DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT => {
Some("DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT")
}
Self::DRM_FORMAT_MODIFIER_PROPERTIES_EXT => Some("DRM_FORMAT_MODIFIER_PROPERTIES_EXT"),
Self::PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT => {
Some("PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT")
}
@ -3669,6 +3901,12 @@ impl fmt::Debug for StructureType {
Self::SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT => {
Some("SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT")
}
Self::PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR => {
Some("PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR")
}
Self::PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR => {
Some("PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR")
}
Self::PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV => {
Some("PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV")
}
@ -3690,6 +3928,12 @@ impl fmt::Debug for StructureType {
Self::GEOMETRY_NV => Some("GEOMETRY_NV"),
Self::GEOMETRY_TRIANGLES_NV => Some("GEOMETRY_TRIANGLES_NV"),
Self::GEOMETRY_AABB_NV => Some("GEOMETRY_AABB_NV"),
Self::BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV => {
Some("BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV")
}
Self::WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV => {
Some("WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV")
}
Self::ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV => {
Some("ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV")
}
@ -3776,7 +4020,9 @@ impl fmt::Debug for StructureType {
Self::PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL => {
Some("PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL")
}
Self::QUERY_POOL_CREATE_INFO_INTEL => Some("QUERY_POOL_CREATE_INFO_INTEL"),
Self::QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL => {
Some("QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL")
}
Self::INITIALIZE_PERFORMANCE_API_INFO_INTEL => {
Some("INITIALIZE_PERFORMANCE_API_INFO_INTEL")
}
@ -3800,6 +4046,9 @@ impl fmt::Debug for StructureType {
Self::IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA => {
Some("IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA")
}
Self::PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR => {
Some("PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR")
}
Self::METAL_SURFACE_CREATE_INFO_EXT => Some("METAL_SURFACE_CREATE_INFO_EXT"),
Self::PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT")
@ -3819,12 +4068,30 @@ impl fmt::Debug for StructureType {
Self::PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT")
}
Self::FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR => {
Some("FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR")
}
Self::PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR => {
Some("PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR")
}
Self::PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR => {
Some("PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR")
}
Self::PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR => {
Some("PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR")
}
Self::PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR => {
Some("PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR")
}
Self::PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD => {
Some("PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD")
}
Self::PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD => {
Some("PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD")
}
Self::PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT")
}
Self::PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT => {
Some("PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT")
}
@ -3887,10 +4154,15 @@ impl fmt::Debug for StructureType {
Self::PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT => {
Some("PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT")
}
Self::PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT")
}
Self::PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT")
}
Self::DEFERRED_OPERATION_INFO_KHR => Some("DEFERRED_OPERATION_INFO_KHR"),
Self::PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT")
}
Self::PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR => {
Some("PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR")
}
@ -3936,7 +4208,38 @@ impl fmt::Debug for StructureType {
Self::RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM => {
Some("RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM")
}
Self::PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT")
}
Self::DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT => {
Some("DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT")
}
Self::DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT => {
Some("DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT")
}
Self::PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT")
}
Self::PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT => {
Some("PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT")
}
Self::SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT => {
Some("SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT")
}
Self::PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT => {
Some("PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT")
}
Self::PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT")
}
Self::PIPELINE_LIBRARY_CREATE_INFO_KHR => Some("PIPELINE_LIBRARY_CREATE_INFO_KHR"),
Self::PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT")
}
Self::DEVICE_PRIVATE_DATA_CREATE_INFO_EXT => {
Some("DEVICE_PRIVATE_DATA_CREATE_INFO_EXT")
}
Self::PRIVATE_DATA_SLOT_CREATE_INFO_EXT => Some("PRIVATE_DATA_SLOT_CREATE_INFO_EXT"),
Self::PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT")
}
@ -3947,6 +4250,40 @@ impl fmt::Debug for StructureType {
Some("DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV")
}
Self::RESERVED_QCOM => Some("RESERVED_QCOM"),
Self::PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV => {
Some("PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV")
}
Self::PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV => {
Some("PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV")
}
Self::PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV => {
Some("PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV")
}
Self::PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT")
}
Self::PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT => {
Some("PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT")
}
Self::COPY_COMMAND_TRANSFORM_INFO_QCOM => Some("COPY_COMMAND_TRANSFORM_INFO_QCOM"),
Self::PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT")
}
Self::COPY_BUFFER_INFO_2_KHR => Some("COPY_BUFFER_INFO_2_KHR"),
Self::COPY_IMAGE_INFO_2_KHR => Some("COPY_IMAGE_INFO_2_KHR"),
Self::COPY_BUFFER_TO_IMAGE_INFO_2_KHR => Some("COPY_BUFFER_TO_IMAGE_INFO_2_KHR"),
Self::COPY_IMAGE_TO_BUFFER_INFO_2_KHR => Some("COPY_IMAGE_TO_BUFFER_INFO_2_KHR"),
Self::BLIT_IMAGE_INFO_2_KHR => Some("BLIT_IMAGE_INFO_2_KHR"),
Self::RESOLVE_IMAGE_INFO_2_KHR => Some("RESOLVE_IMAGE_INFO_2_KHR"),
Self::BUFFER_COPY_2_KHR => Some("BUFFER_COPY_2_KHR"),
Self::IMAGE_COPY_2_KHR => Some("IMAGE_COPY_2_KHR"),
Self::IMAGE_BLIT_2_KHR => Some("IMAGE_BLIT_2_KHR"),
Self::BUFFER_IMAGE_COPY_2_KHR => Some("BUFFER_IMAGE_COPY_2_KHR"),
Self::IMAGE_RESOLVE_2_KHR => Some("IMAGE_RESOLVE_2_KHR"),
Self::PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT => {
Some("PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT")
}
Self::DIRECTFB_SURFACE_CREATE_INFO_EXT => Some("DIRECTFB_SURFACE_CREATE_INFO_EXT"),
Self::PHYSICAL_DEVICE_SUBGROUP_PROPERTIES => {
Some("PHYSICAL_DEVICE_SUBGROUP_PROPERTIES")
}
@ -4233,12 +4570,12 @@ impl fmt::Debug for SubpassDescriptionFlags {
"PER_VIEW_POSITION_X_ONLY_NVX",
),
(
SubpassDescriptionFlags::RESERVED_2_QCOM.0,
"RESERVED_2_QCOM",
SubpassDescriptionFlags::FRAGMENT_REGION_QCOM.0,
"FRAGMENT_REGION_QCOM",
),
(
SubpassDescriptionFlags::RESERVED_3_QCOM.0,
"RESERVED_3_QCOM",
SubpassDescriptionFlags::SHADER_RESOLVE_QCOM.0,
"SHADER_RESOLVE_QCOM",
),
];
debug_flags(f, KNOWN, self.0)
@ -4423,6 +4760,7 @@ impl fmt::Debug for ValidationFeatureEnableEXT {
Self::GPU_ASSISTED_RESERVE_BINDING_SLOT => Some("GPU_ASSISTED_RESERVE_BINDING_SLOT"),
Self::BEST_PRACTICES => Some("BEST_PRACTICES"),
Self::DEBUG_PRINTF => Some("DEBUG_PRINTF"),
Self::SYNCHRONIZATION_VALIDATION => Some("SYNCHRONIZATION_VALIDATION"),
_ => None,
};
if let Some(x) = name {
@ -4439,6 +4777,7 @@ impl fmt::Debug for VendorId {
Self::VSI => Some("VSI"),
Self::KAZAN => Some("KAZAN"),
Self::CODEPLAY => Some("CODEPLAY"),
Self::MESA => Some("MESA"),
_ => None,
};
if let Some(x) = name {

File diff suppressed because it is too large Load diff

View file

@ -1220,6 +1220,25 @@ impl DebugReportObjectTypeEXT {
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemoryReportEventTypeEXT.html>"]
pub struct DeviceMemoryReportEventTypeEXT(pub(crate) i32);
impl DeviceMemoryReportEventTypeEXT {
pub const fn from_raw(x: i32) -> Self {
DeviceMemoryReportEventTypeEXT(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl DeviceMemoryReportEventTypeEXT {
pub const ALLOCATE: Self = Self(0);
pub const FREE: Self = Self(1);
pub const IMPORT: Self = Self(2);
pub const UNIMPORT: Self = Self(3);
pub const ALLOCATION_FAILED: Self = Self(4);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRasterizationOrderAMD.html>"]
pub struct RasterizationOrderAMD(pub(crate) i32);
impl RasterizationOrderAMD {
@ -1267,6 +1286,7 @@ impl ValidationFeatureEnableEXT {
pub const GPU_ASSISTED_RESERVE_BINDING_SLOT: Self = Self(1);
pub const BEST_PRACTICES: Self = Self(2);
pub const DEBUG_PRINTF: Self = Self(3);
pub const SYNCHRONIZATION_VALIDATION: Self = Self(4);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
@ -1641,6 +1661,8 @@ impl VendorId {
pub const KAZAN: Self = Self(0x1_0003);
#[doc = "Codeplay Software Ltd. vendor ID"]
pub const CODEPLAY: Self = Self(0x1_0004);
#[doc = "Mesa vendor ID"]
pub const MESA: Self = Self(0x1_0005);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
@ -1679,6 +1701,10 @@ impl DriverId {
pub const GGP_PROPRIETARY: Self = Self(11);
#[doc = "Broadcom Inc."]
pub const BROADCOM_PROPRIETARY: Self = Self(12);
#[doc = "Mesa"]
pub const MESA_LLVMPIPE: Self = Self(13);
#[doc = "MoltenVK"]
pub const MOLTEN: Self = Self(14);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
@ -1744,6 +1770,22 @@ impl CopyAccelerationStructureModeKHR {
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBuildAccelerationStructureModeKHR.html>"]
pub struct BuildAccelerationStructureModeKHR(pub(crate) i32);
impl BuildAccelerationStructureModeKHR {
pub const fn from_raw(x: i32) -> Self {
BuildAccelerationStructureModeKHR(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl BuildAccelerationStructureModeKHR {
pub const BUILD: Self = Self(0);
pub const UPDATE: Self = Self(1);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureTypeKHR.html>"]
pub struct AccelerationStructureTypeKHR(pub(crate) i32);
impl AccelerationStructureTypeKHR {
@ -1757,6 +1799,7 @@ impl AccelerationStructureTypeKHR {
impl AccelerationStructureTypeKHR {
pub const TOP_LEVEL: Self = Self(0);
pub const BOTTOM_LEVEL: Self = Self(1);
pub const GENERIC: Self = Self(2);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
@ -1773,20 +1816,21 @@ impl GeometryTypeKHR {
impl GeometryTypeKHR {
pub const TRIANGLES: Self = Self(0);
pub const AABBS: Self = Self(1);
pub const INSTANCES: 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/VkAccelerationStructureMemoryRequirementsTypeKHR.html>"]
pub struct AccelerationStructureMemoryRequirementsTypeKHR(pub(crate) i32);
impl AccelerationStructureMemoryRequirementsTypeKHR {
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureMemoryRequirementsTypeNV.html>"]
pub struct AccelerationStructureMemoryRequirementsTypeNV(pub(crate) i32);
impl AccelerationStructureMemoryRequirementsTypeNV {
pub const fn from_raw(x: i32) -> Self {
AccelerationStructureMemoryRequirementsTypeKHR(x)
AccelerationStructureMemoryRequirementsTypeNV(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl AccelerationStructureMemoryRequirementsTypeKHR {
impl AccelerationStructureMemoryRequirementsTypeNV {
pub const OBJECT: Self = Self(0);
pub const BUILD_SCRATCH: Self = Self(1);
pub const UPDATE_SCRATCH: Self = Self(2);
@ -1827,6 +1871,40 @@ impl RayTracingShaderGroupTypeKHR {
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureCompatibilityKHR.html>"]
pub struct AccelerationStructureCompatibilityKHR(pub(crate) i32);
impl AccelerationStructureCompatibilityKHR {
pub const fn from_raw(x: i32) -> Self {
AccelerationStructureCompatibilityKHR(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl AccelerationStructureCompatibilityKHR {
pub const COMPATIBLE: Self = Self(0);
pub const INCOMPATIBLE: Self = Self(1);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderGroupShaderKHR.html>"]
pub struct ShaderGroupShaderKHR(pub(crate) i32);
impl ShaderGroupShaderKHR {
pub const fn from_raw(x: i32) -> Self {
ShaderGroupShaderKHR(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl ShaderGroupShaderKHR {
pub const GENERAL: Self = Self(0);
pub const CLOSEST_HIT: Self = Self(1);
pub const ANY_HIT: Self = Self(2);
pub const INTERSECTION: Self = Self(3);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryOverallocationBehaviorAMD.html>"]
pub struct MemoryOverallocationBehaviorAMD(pub(crate) i32);
impl MemoryOverallocationBehaviorAMD {
@ -2100,3 +2178,64 @@ impl LineRasterizationModeEXT {
pub const BRESENHAM: Self = Self(2);
pub const RECTANGULAR_SMOOTH: Self = Self(3);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFragmentShadingRateCombinerOpKHR.html>"]
pub struct FragmentShadingRateCombinerOpKHR(pub(crate) i32);
impl FragmentShadingRateCombinerOpKHR {
pub const fn from_raw(x: i32) -> Self {
FragmentShadingRateCombinerOpKHR(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl FragmentShadingRateCombinerOpKHR {
pub const KEEP: Self = Self(0);
pub const REPLACE: Self = Self(1);
pub const MIN: Self = Self(2);
pub const MAX: Self = Self(3);
pub const MUL: Self = Self(4);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFragmentShadingRateNV.html>"]
pub struct FragmentShadingRateNV(pub(crate) i32);
impl FragmentShadingRateNV {
pub const fn from_raw(x: i32) -> Self {
FragmentShadingRateNV(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl FragmentShadingRateNV {
pub const TYPE_1_INVOCATION_PER_PIXEL: Self = Self(0);
pub const TYPE_1_INVOCATION_PER_1X2_PIXELS: Self = Self(1);
pub const TYPE_1_INVOCATION_PER_2X1_PIXELS: Self = Self(4);
pub const TYPE_1_INVOCATION_PER_2X2_PIXELS: Self = Self(5);
pub const TYPE_1_INVOCATION_PER_2X4_PIXELS: Self = Self(6);
pub const TYPE_1_INVOCATION_PER_4X2_PIXELS: Self = Self(9);
pub const TYPE_1_INVOCATION_PER_4X4_PIXELS: Self = Self(10);
pub const TYPE_2_INVOCATIONS_PER_PIXEL: Self = Self(11);
pub const TYPE_4_INVOCATIONS_PER_PIXEL: Self = Self(12);
pub const TYPE_8_INVOCATIONS_PER_PIXEL: Self = Self(13);
pub const TYPE_16_INVOCATIONS_PER_PIXEL: Self = Self(14);
pub const NO_INVOCATIONS: Self = Self(15);
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFragmentShadingRateTypeNV.html>"]
pub struct FragmentShadingRateTypeNV(pub(crate) i32);
impl FragmentShadingRateTypeNV {
pub const fn from_raw(x: i32) -> Self {
FragmentShadingRateTypeNV(x)
}
pub const fn as_raw(self) -> i32 {
self.0
}
}
impl FragmentShadingRateTypeNV {
pub const FRAGMENT_SIZE: Self = Self(0);
pub const ENUMS: Self = Self(1);
}

File diff suppressed because it is too large Load diff

View file

@ -30,3 +30,5 @@ pub type AHardwareBuffer = c_void;
pub type CAMetalLayer = c_void;
pub type GgpStreamDescriptor = u32;
pub type GgpFrameToken = u64;
pub type IDirectFB = c_void;
pub type IDirectFBSurface = c_void;

@ -1 +1 @@
Subproject commit fb7f9c9bcd1d1544ea203a1f3d4253d0e90c5a90
Subproject commit d2308183f2846a1453ce7ae8c77ea7b5a7424ad2

View file

@ -380,6 +380,8 @@ pub fn platform_specific_types() -> Tokens {
// https://github.com/google/gapid/commit/22aafebec4638c6aaa77667096bca30f6e842d95#diff-ab3ab4a7d89b4fc8a344ff4e9332865f268ea1669ee379c1b516a954ecc2e7a6R20-R21
pub type GgpStreamDescriptor = u32;
pub type GgpFrameToken = u64;
pub type IDirectFB = c_void;
pub type IDirectFBSurface = c_void;
}
}
#[derive(Debug, Copy, Clone)]
@ -1721,20 +1723,30 @@ pub fn derive_setters(
// Unique cases
if name == "pCode" {
return Some(quote!{
pub fn code(mut self, code: &'a [u32]) -> #name_builder<'a> {
self.inner.code_size = code.len() * 4;
self.inner.p_code = code.as_ptr() as *const u32;
self
}
pub fn code(mut self, code: &'a [u32]) -> #name_builder<'a> {
self.inner.code_size = code.len() * 4;
self.inner.p_code = code.as_ptr() as *const u32;
self
}
});
}
if name == "pSampleMask" {
return Some(quote!{
pub fn sample_mask(mut self, sample_mask: &'a [SampleMask]) -> #name_builder<'a> {
self.inner.p_sample_mask = sample_mask.as_ptr() as *const SampleMask;
self
}
pub fn sample_mask(mut self, sample_mask: &'a [SampleMask]) -> #name_builder<'a> {
self.inner.p_sample_mask = sample_mask.as_ptr() as *const SampleMask;
self
}
});
}
if name == "ppGeometries" {
return Some(quote!{
pub fn geometries_ptrs(mut self, geometries: &'a [*const AccelerationStructureGeometryKHR]) -> #name_builder<'a> {
self.inner.geometry_count = geometries.len() as _;
self.inner.pp_geometries = geometries.as_ptr();
self
}
});
}
}
@ -1971,13 +1983,19 @@ pub fn generate_struct(
if &_struct.name == "VkAccelerationStructureInstanceKHR" {
return quote! {
#[repr(C)]
#[derive(Copy, Clone)]
pub union AccelerationStructureReferenceKHR {
pub device_handle: DeviceAddress,
pub host_handle: AccelerationStructureKHR,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AccelerationStructureInstanceKHR {
pub transform: TransformMatrixKHR,
pub instance_custom_index_and_mask: u32,
pub instance_shader_binding_table_record_offset_and_flags: u32,
pub acceleration_structure_reference: u64,
pub acceleration_structure_reference: AccelerationStructureReferenceKHR,
}
};
}