Skip to content

Commit

Permalink
Set length of buffer after filling
Browse files Browse the repository at this point in the history
  • Loading branch information
djkoloski committed Sep 21, 2022
1 parent 02a60bd commit 55cd838
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions ash/src/extensions/khr/ray_tracing_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl RayTracingPipeline {
) -> 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,
Expand All @@ -122,8 +122,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>
Expand Down

0 comments on commit 55cd838

Please sign in to comment.