KhronosGroup / KhronosGroup/Vulkan-Samples
Fix (non) alignment of shader group handles as returned in calls to `vkGetRayTracing*ShaderGroupHandles*`
- Dominant language
- C++
- Stars
- 5.4k
- Forks
- 835
- Avg merge
- 2h 16m
- Merged PRs (30d)
- 1
Description
It will soon be clarified in the spec that the shader group handles returned in a call to the `vkGetRayTracing*ShaderGroupHandles*` functions are tightly packed/not aligned.
Corresponding Gitlab merge request: https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6490
I think the only thing that needs to be changed in the ray tracing samples are `sbt_size` computation, it should use `handle_size` instead of `handle_size_aligned`, and the following memory copies that compute offsets using `handle_size_aligned`.
https://github.com/KhronosGroup/Vulkan-Samples/blob/8ba37b44a693d165c2ab8b9cfdcf1c8774efd407/samples/extensions/ray_tracing_basic/ray_tracing_basic.cpp#L471
https://github.com/KhronosGroup/Vulkan-Samples/blob/8ba37b44a693d165c2ab8b9cfdcf1c8774efd407/samples/extensions/ray_tracing_reflection/ray_tracing_reflection.cpp#L583
https://github.com/KhronosGroup/Vulkan-Samples/blob/8ba37b44a693d165c2ab8b9cfdcf1c8774efd407/samples/extensions/ray_tracing_extended/ray_tracing_extended.cpp#L852
Contributor guide
Assessment
This issue has not been assessed yet.