extensions/khr/ray_tracing_pipeline: Set length of capture-replay shader handle buffer after filling (#658)
This commit is contained in:
parent
6a7303271a
commit
cc3d65a486
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue