extensions/khr/ray_tracing_pipeline: Set length of capture-replay shader handle buffer after filling (#658)
This commit is contained in:
parent
02a60bd9cb
commit
5f4b1bbf07
2 changed files with 8 additions and 4 deletions
|
@ -29,6 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- Removed experimental AMD extensions (#607)
|
- 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
|
## [0.37.0] - 2022-03-23
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -112,8 +112,7 @@ impl RayTracingPipeline {
|
||||||
data_size: usize,
|
data_size: usize,
|
||||||
) -> VkResult<Vec<u8>> {
|
) -> VkResult<Vec<u8>> {
|
||||||
let mut data: Vec<u8> = Vec::with_capacity(data_size);
|
let mut data: Vec<u8> = Vec::with_capacity(data_size);
|
||||||
|
let err_code = (self
|
||||||
(self
|
|
||||||
.fp
|
.fp
|
||||||
.get_ray_tracing_capture_replay_shader_group_handles_khr)(
|
.get_ray_tracing_capture_replay_shader_group_handles_khr)(
|
||||||
self.handle,
|
self.handle,
|
||||||
|
@ -122,8 +121,9 @@ impl RayTracingPipeline {
|
||||||
group_count,
|
group_count,
|
||||||
data_size,
|
data_size,
|
||||||
data.as_mut_ptr() as *mut _,
|
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>
|
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysIndirectKHR.html>
|
||||||
|
|
Loading…
Add table
Reference in a new issue