Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix (non) alignment of shader group handles as returned in calls to vkGetRayTracing*ShaderGroupHandles* #964

Open
arno-lunarg opened this issue Mar 8, 2024 · 0 comments

Comments

@arno-lunarg
Copy link

arno-lunarg commented Mar 8, 2024

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.

const uint32_t sbt_size = group_count * handle_size_aligned;

const auto sbt_size = group_count * handle_size_aligned;

const uint32_t sbt_size = group_count * handle_size_aligned;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant