From 458a6fba2063ab6c27a86dd926d760a8af622490 Mon Sep 17 00:00:00 2001 From: Graham Wihlidal Date: Sun, 10 Feb 2019 03:51:32 +0100 Subject: [PATCH] Implemented get_ray_tracing_shader_group_handles --- ash/src/extensions/nv/ray_tracing.rs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ash/src/extensions/nv/ray_tracing.rs b/ash/src/extensions/nv/ray_tracing.rs index f26b38b..aabef17 100644 --- a/ash/src/extensions/nv/ray_tracing.rs +++ b/ash/src/extensions/nv/ray_tracing.rs @@ -173,7 +173,27 @@ impl RayTracing { } } - // get_ray_tracing_shader_group_handles_nv + pub unsafe fn get_ray_tracing_shader_group_handles( + &self, + device: vk::Device, + pipeline: vk::Pipeline, + first_group: u32, + group_count: u32, + data: &mut [u8], + ) -> VkResult<()> { + let err_code = self.ray_tracing_fn.get_ray_tracing_shader_group_handles_nv( + device, + pipeline, + first_group, + group_count, + data.len(), + data.as_mut_ptr() as *mut std::ffi::c_void, + ); + match err_code { + vk::Result::SUCCESS => Ok(()), + _ => Err(err_code), + } + } // get_acceleration_structure_handle_nv