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.
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/6490I think the only thing that needs to be changed in the ray tracing samples are
sbt_size
computation, it should usehandle_size
instead ofhandle_size_aligned
, and the following memory copies that compute offsets usinghandle_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