You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SPIR-V] Support KHR Ray tracing's OpTerminateRayKHR and OpIgnoreIntersectionKHR #3285
These instructions have a different opcode than their NV counterpart, apparently for a reason: both are now terminal instructions.
There is already code in place to emit returns after the NV variant and reorder writes before it, would that be enough to support these functions normally without enforcing AcceptHitAndEndSearch/IgnoreHit to be placed at the end of a shader?
changed the title [-]Support KHR Ray tracing's OpTerminateRayKHR and OpIgnoreIntersectionKHR[/-][+][SPIR-V] Support KHR Ray tracing's OpTerminateRayKHR and OpIgnoreIntersectionKHR[/+]on Nov 30, 2020
JiaoluAMD (@jiaolu) Correct. I attempted to make a head-start with a test and adding a new "group" for these two terminals, but am still missing a TerminatorInst. Better if someone else looks into it, I'm not familiar with this codebase at all.
made a quick pull-request, though the internal spirv validator would mis-report one validation error "OpLabel inside basic block"
though the generated spv can pass the tool spirv-val check.
jiolu Thanks! The code is pretty much identical to my attempt, goes to show that I ended up understanding it after all, but also ran into the same OpLabel inside basic block error which I assume is the internal validator not knowing that the block ends with that ray tracing terminal?
Thanks Ehsan (@ehsannas) and JiaoluAMD (@jiaolu) for quickly picking this up and resolving this issue! We've immediately applied the SPIRV-Tools fixes to our Rust equivalents as well 👍
Did KhronosGroup/SPIRV-Tools#4049 make it in as well? The same DCE fix but for SPV_KHR_shader_clock which was recently introduced to DXC.
EDIT: Looks like it does not, the PR was merged barely after the update here. Can we get that in as well?
Activity
[-]Support KHR Ray tracing's OpTerminateRayKHR and OpIgnoreIntersectionKHR[/-][+][SPIR-V] Support KHR Ray tracing's OpTerminateRayKHR and OpIgnoreIntersectionKHR[/+]jiaolu commentedon Dec 1, 2020
okay. i will take a look.
jiaolu commentedon Dec 3, 2020
a quick look here. new OpIgnoreIntersectionKHR/OpTerminateRayKHR are block terminator. so it is little more complicated than inserting a instruction.
MarijnS95 commentedon Dec 3, 2020
JiaoluAMD (@jiaolu) Correct. I attempted to make a head-start with a test and adding a new "group" for these two terminals, but am still missing a
TerminatorInst. Better if someone else looks into it, I'm not familiar with this codebase at all.jiaolu commentedon Dec 3, 2020
made a quick pull-request, though the internal spirv validator would mis-report one validation error "OpLabel inside basic block"
though the generated spv can pass the tool spirv-val check.
MarijnS95 commentedon Dec 3, 2020
jiolu Thanks! The code is pretty much identical to my attempt, goes to show that I ended up understanding it after all, but also ran into the same
OpLabel inside basic blockerror which I assume is the internal validator not knowing that the block ends with that ray tracing terminal?[SPIR-V]Support KHR_Ray_tracing terminate Ops
[SPIR-V]Support KHR_Ray_tracing terminate Ops (#3295)
ehsannas commentedon Dec 9, 2020
The SPIRV-Tools fix has been picked up by DXC, and that should fix the issue
MarijnS95 commentedon Dec 9, 2020
Thanks Ehsan (@ehsannas) and JiaoluAMD (@jiaolu) for quickly picking this up and resolving this issue! We've immediately applied the SPIRV-Tools fixes to our Rust equivalents as well 👍
Did KhronosGroup/SPIRV-Tools#4049 make it in as well? The same DCE fix but for
SPV_KHR_shader_clockwhich was recently introduced to DXC.EDIT: Looks like it does not, the PR was merged barely after the update here. Can we get that in as well?