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

add legalise step for ray payloads #6418

Closed
wants to merge 1 commit into from

Conversation

mkeshavaNV
Copy link
Contributor

Fixes #5121

SPV expects at most one IncomingRayPayloadKHR variable for one entry point - as described by VUID: VUID-StandaloneSpirv-IncomingRayPayloadKHR-04700

However, slang has a bug currently, where if an entry point has more than one out parameter, it generates multiple IncomingRayPayloadKHR variables in the generated SPV.

This fails spv validation. This patch adds a new legalize step for all RT shaders that consolidates all out parameters into one block, thereby adhereing to the spv rule

@mkeshavaNV mkeshavaNV added the pr: non-breaking PRs without breaking changes label Feb 21, 2025
Fixes shader-slang#5121

SPV expects at most one IncomingRayPayloadKHR variable for one entry
point - as described by VUID:
VUID-StandaloneSpirv-IncomingRayPayloadKHR-04700

However, slang has a bug currently, where if an entry point has more
than one out parameter, it generates multiple IncomingRayPayloadKHR
variables in the generated SPV.

This fails spv validation. This patch adds a new legalize step for all
RT shaders that consolidates all out parameters into one block, thereby
adhereing to the spv rule
@mkeshavaNV mkeshavaNV closed this Feb 21, 2025
@mkeshavaNV mkeshavaNV deleted the bugfix/gh-5121 branch February 21, 2025 11:49
@mkeshavaNV mkeshavaNV restored the bugfix/gh-5121 branch February 24, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid spirv code generation for vulkan ray tracing
1 participant