Commit 89f3271 1 parent 85b2696 commit 89f3271 Copy full SHA for 89f3271
File tree 4 files changed +47
-0
lines changed
4 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
17
- Update Vulkan-Headers to 1.3.219 (#605 , #608 , #619 )
18
18
- Added ` VK_EXT_sample_locations ` device extension (#616 )
19
19
- Added ` VK_NV_coverage_reduction_mode ` device extension (#617 )
20
+ - Added ` VK_KHR_ray_tracing_maintenance1 ` device extension (#620 )
20
21
- Added new functions to ` VK_KHR_swapchain ` , available since Vulkan 1.1 (#629 )
21
22
- Added ` VK_KHR_device_group_creation ` instance extension (#630 )
22
23
- Added ` VK_KHR_device_group ` device extension (#631 )
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ pub use self::maintenance4::Maintenance4;
25
25
pub use self :: pipeline_executable_properties:: PipelineExecutableProperties ;
26
26
pub use self :: present_wait:: PresentWait ;
27
27
pub use self :: push_descriptor:: PushDescriptor ;
28
+ pub use self :: ray_tracing_maintenance1:: RayTracingMaintenance1 ;
28
29
pub use self :: ray_tracing_pipeline:: RayTracingPipeline ;
29
30
pub use self :: surface:: Surface ;
30
31
pub use self :: swapchain:: Swapchain ;
@@ -62,6 +63,7 @@ mod maintenance4;
62
63
mod pipeline_executable_properties;
63
64
mod present_wait;
64
65
mod push_descriptor;
66
+ mod ray_tracing_maintenance1;
65
67
mod ray_tracing_pipeline;
66
68
mod surface;
67
69
mod swapchain;
Original file line number Diff line number Diff line change
1
+ use crate :: vk;
2
+ use crate :: { Device , Instance } ;
3
+ use std:: ffi:: CStr ;
4
+ use std:: mem;
5
+
6
+ /// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_KHR_ray_tracing_maintenance1.html>
7
+ #[ derive( Clone ) ]
8
+ pub struct RayTracingMaintenance1 {
9
+ fp : vk:: KhrRayTracingMaintenance1Fn ,
10
+ }
11
+
12
+ impl RayTracingMaintenance1 {
13
+ pub fn new ( instance : & Instance , device : & Device ) -> Self {
14
+ let handle = device. handle ( ) ;
15
+ let fp = vk:: KhrRayTracingMaintenance1Fn :: load ( |name| unsafe {
16
+ mem:: transmute ( instance. get_device_proc_addr ( handle, name. as_ptr ( ) ) )
17
+ } ) ;
18
+ Self { fp }
19
+ }
20
+
21
+ /// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysIndirect2KHR.html>
22
+ ///
23
+ /// `indirect_device_address` is a buffer device address which is a pointer to a [`vk::TraceRaysIndirectCommand2KHR`] structure containing the trace ray parameters.
24
+ #[ inline]
25
+ pub unsafe fn cmd_trace_rays_indirect2 (
26
+ & self ,
27
+ command_buffer : vk:: CommandBuffer ,
28
+ indirect_device_address : vk:: DeviceAddress ,
29
+ ) {
30
+ ( self . fp . cmd_trace_rays_indirect2_khr ) ( command_buffer, indirect_device_address) ;
31
+ }
32
+
33
+ #[ inline]
34
+ pub const fn name ( ) -> & ' static CStr {
35
+ vk:: KhrRayTracingMaintenance1Fn :: name ( )
36
+ }
37
+
38
+ #[ inline]
39
+ pub fn fp ( & self ) -> & vk:: KhrRayTracingMaintenance1Fn {
40
+ & self . fp
41
+ }
42
+ }
Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ impl RayTracingPipeline {
122
122
}
123
123
124
124
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysIndirectKHR.html>
125
+ ///
126
+ /// `indirect_device_address` is a buffer device address which is a pointer to a [`vk::TraceRaysIndirectCommandKHR`] structure containing the trace ray parameters.
125
127
pub unsafe fn cmd_trace_rays_indirect (
126
128
& self ,
127
129
command_buffer : vk:: CommandBuffer ,
You can’t perform that action at this time.
0 commit comments