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 50fb2a6
Showing 1 changed file with 4 additions and 3 deletions.
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 50fb2a6

Please sign in to comment.