From 24da3bb44661121a465303cb7b4467d9482134a0 Mon Sep 17 00:00:00 2001 From: Graham Wihlidal Date: Sun, 10 Feb 2019 03:03:25 +0100 Subject: [PATCH] Implemented get_acceleration_structure_memory_requirements --- ash/src/extensions/nv/ray_tracing.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ash/src/extensions/nv/ray_tracing.rs b/ash/src/extensions/nv/ray_tracing.rs index 76c400e..4e99b78 100644 --- a/ash/src/extensions/nv/ray_tracing.rs +++ b/ash/src/extensions/nv/ray_tracing.rs @@ -47,6 +47,16 @@ impl RayTracing { self.ray_tracing_fn.destroy_acceleration_structure_nv(device, accel_struct, allocation_callbacks.as_raw_ptr()); } + pub unsafe fn get_acceleration_structure_memory_requirements( + &self, + device: vk::Device, + info: &vk::AccelerationStructureMemoryRequirementsInfoNV, + ) -> vk::MemoryRequirements2KHR { + let mut requirements = mem::uninitialized(); + self.ray_tracing_fn.get_acceleration_structure_memory_requirements_nv(device, info, &mut requirements); + requirements + } + pub fn name() -> &'static CStr { CStr::from_bytes_with_nul(b"VK_NV_ray_tracing\0").expect("Wrong extension string") }