extensions/khr: Add VK_KHR_ray_tracing_maintenance1 device extension (#620)
This commit is contained in:
parent
94fdc70a4c
commit
400d68fc7d
|
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Update Vulkan-Headers to 1.3.219 (#605, #608, #619)
|
||||
- Added `VK_EXT_sample_locations` device extension (#616)
|
||||
- Added `VK_NV_coverage_reduction_mode` device extension (#617)
|
||||
- Added `VK_KHR_ray_tracing_maintenance1` device extension (#620)
|
||||
- Added new functions to `VK_KHR_swapchain`, available since Vulkan 1.1 (#629)
|
||||
- Added `VK_KHR_device_group_creation` instance extension (#630)
|
||||
- Added `VK_KHR_device_group` device extension (#631)
|
||||
|
|
|
@ -25,6 +25,7 @@ pub use self::maintenance4::Maintenance4;
|
|||
pub use self::pipeline_executable_properties::PipelineExecutableProperties;
|
||||
pub use self::present_wait::PresentWait;
|
||||
pub use self::push_descriptor::PushDescriptor;
|
||||
pub use self::ray_tracing_maintenance1::RayTracingMaintenance1;
|
||||
pub use self::ray_tracing_pipeline::RayTracingPipeline;
|
||||
pub use self::surface::Surface;
|
||||
pub use self::swapchain::Swapchain;
|
||||
|
@ -62,6 +63,7 @@ mod maintenance4;
|
|||
mod pipeline_executable_properties;
|
||||
mod present_wait;
|
||||
mod push_descriptor;
|
||||
mod ray_tracing_maintenance1;
|
||||
mod ray_tracing_pipeline;
|
||||
mod surface;
|
||||
mod swapchain;
|
||||
|
|
42
ash/src/extensions/khr/ray_tracing_maintenance1.rs
Normal file
42
ash/src/extensions/khr/ray_tracing_maintenance1.rs
Normal file
|
@ -0,0 +1,42 @@
|
|||
use crate::vk;
|
||||
use crate::{Device, Instance};
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
|
||||
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_KHR_ray_tracing_maintenance1.html>
|
||||
#[derive(Clone)]
|
||||
pub struct RayTracingMaintenance1 {
|
||||
fp: vk::KhrRayTracingMaintenance1Fn,
|
||||
}
|
||||
|
||||
impl RayTracingMaintenance1 {
|
||||
pub fn new(instance: &Instance, device: &Device) -> Self {
|
||||
let handle = device.handle();
|
||||
let fp = vk::KhrRayTracingMaintenance1Fn::load(|name| unsafe {
|
||||
mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr()))
|
||||
});
|
||||
Self { fp }
|
||||
}
|
||||
|
||||
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysIndirect2KHR.html>
|
||||
///
|
||||
/// `indirect_device_address` is a buffer device address which is a pointer to a [`vk::TraceRaysIndirectCommand2KHR`] structure containing the trace ray parameters.
|
||||
#[inline]
|
||||
pub unsafe fn cmd_trace_rays_indirect2(
|
||||
&self,
|
||||
command_buffer: vk::CommandBuffer,
|
||||
indirect_device_address: vk::DeviceAddress,
|
||||
) {
|
||||
(self.fp.cmd_trace_rays_indirect2_khr)(command_buffer, indirect_device_address);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub const fn name() -> &'static CStr {
|
||||
vk::KhrRayTracingMaintenance1Fn::name()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn fp(&self) -> &vk::KhrRayTracingMaintenance1Fn {
|
||||
&self.fp
|
||||
}
|
||||
}
|
|
@ -122,6 +122,8 @@ impl RayTracingPipeline {
|
|||
}
|
||||
|
||||
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysIndirectKHR.html>
|
||||
///
|
||||
/// `indirect_device_address` is a buffer device address which is a pointer to a [`vk::TraceRaysIndirectCommandKHR`] structure containing the trace ray parameters.
|
||||
pub unsafe fn cmd_trace_rays_indirect(
|
||||
&self,
|
||||
command_buffer: vk::CommandBuffer,
|
||||
|
|
Loading…
Reference in a new issue