-
Notifications
You must be signed in to change notification settings - Fork 661
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
SPIR-V: Emit RayTmaxKHR builtin for RayTCurrent IOP #3320
Conversation
HitTKHR was [removed] from the spec as it merely shadows RayTmaxKHR. Emitting it results in invalid SPIR-V: generated SPIR-V is invalid: Operand 3 of Decorate requires one of these capabilities: RayTracingNV OpDecorate %6 BuiltIn HitTNV Replace the builtin by RayTmaxKHR if NV_ray_tracing enabled to resolve this. [removed]: KhronosGroup/SPIRV-Headers@bdd2aa3
yeah I think it should cover everything |
More context: |
@MarijnS95 would you be able to share a shader that reproduces the issue, so we can add it as a unit test? Or add a unit test to this PR? (adding a unit test is easy. See https://github.com/microsoft/DirectXShaderCompiler/pull/2512/files as an example). You can just have a |
@ehsannas Already in the main PR description as well as the topmost commit, including the link to that SPIRV-Headers change :)
Done, writing tests is the easy part but realising disassembly prints these as |
Sounds good. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'll merge once the bots are green.
Fixes #3322
HitTKHR
was removed from the spec as it merely shadowsRayTmaxKHR
. Emitting it results in invalid SPIR-V:Replace the builtin by
RayTmaxKHR
ifNV_ray_tracing
is not enabled to resolve this.Is this valid in all of the cases outlined here? I assume - given that that commit says it shadows
RayTmax
anyway, likely also on NV - that the max is updated upon hit?