From cc3d65a486edb6ceae9aeeb56de5752e0ec33a4f Mon Sep 17 00:00:00 2001 From: David Koloski Date: Wed, 21 Sep 2022 18:57:45 -0400 Subject: [PATCH] extensions/khr/ray_tracing_pipeline: Set length of capture-replay shader handle buffer after filling (#658) --- Changelog.md | 5 +++++ ash/src/extensions/khr/ray_tracing_pipeline.rs | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Changelog.md b/Changelog.md index c3cf8fd..c21bfea 100644 --- a/Changelog.md +++ b/Changelog.md @@ -24,6 +24,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `VK_KHR_device_group_creation` instance extension (#630) - Added `VK_KHR_device_group` device extension (#631) + +### Fixed + +- `khr::RayTracingPipeline`: Set the buffer length in `get_ray_tracing_capture_replay_shader_group_handles` so it no longer always returns an empty `Vec` (#658) + ## [0.37.0] - 2022-03-23 ### Changed diff --git a/ash/src/extensions/khr/ray_tracing_pipeline.rs b/ash/src/extensions/khr/ray_tracing_pipeline.rs index be7df1a..61c52a6 100644 --- a/ash/src/extensions/khr/ray_tracing_pipeline.rs +++ b/ash/src/extensions/khr/ray_tracing_pipeline.rs @@ -112,8 +112,7 @@ impl RayTracingPipeline { data_size: usize, ) -> VkResult> { let mut data: Vec = Vec::with_capacity(data_size); - - (self + let err_code = (self .fp .get_ray_tracing_capture_replay_shader_group_handles_khr)( self.handle, @@ -122,8 +121,9 @@ impl RayTracingPipeline { group_count, data_size, data.as_mut_ptr() as *mut _, - ) - .result_with_success(data) + ); + data.set_len(data_size); + err_code.result_with_success(data) } ///