extensions/khr/ray_tracing_pipeline: Set length of capture-replay shader handle buffer after filling (#658)

This commit is contained in:
David Koloski 2022-09-21 18:57:45 -04:00 committed by GitHub
parent 02a60bd9cb
commit 5f4b1bbf07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -29,6 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed experimental AMD extensions (#607)
### 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

View file

@ -112,8 +112,7 @@ impl RayTracingPipeline {
data_size: usize,
) -> VkResult<Vec<u8>> {
let mut data: Vec<u8> = 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)
}
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysIndirectKHR.html>