Repository navigation
[SPIR-V]Support KHR_Ray_tracing terminate Ops - #3295
Conversation
Add OpIgnoreIntersectionKHR/OpTerminateRayKHR related microsoft#3285
730d15f to
50760b2
Compare
|
JiaoluAMD (@jiaolu) Marijn Suijten (@MarijnS95) Jaebaek Seo (@jaebaek) Please review. |
Marijn Suijten (MarijnS95)
left a comment
There was a problem hiding this comment.
Thanks Ehsan (@ehsannas)! Unfortunately this still seems to run into failed to optimize SPIR-V: OpLabel inside basic block
| SourceLocation loc) | ||
| : SpirvTerminator(IK_RayTracingTerminate, opcode, loc) { | ||
| assert(opcode == spv::Op::OpTerminateRayKHR || | ||
| spv::Op::OpIgnoreIntersectionKHR); |
There was a problem hiding this comment.
| spv::Op::OpIgnoreIntersectionKHR); | |
| opcode == spv::Op::OpIgnoreIntersectionKHR); |
Praise clang for catching this one:
../tools/clang/lib/SPIRV/SpirvInstruction.cpp:994:47: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
assert(opcode == spv::Op::OpTerminateRayKHR ||
^
../tools/clang/lib/SPIRV/SpirvInstruction.cpp:995:10: error: value of type 'spv::Op' is not contextually convertible to 'bool'
spv::Op::OpIgnoreIntersectionKHR);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~There was a problem hiding this comment.
ouch. Sad that MSVC didn't catch this. Also not sure why Appveyor bot is passing.
There was a problem hiding this comment.
I know why appveyor is passing... MSVC doesn't catch the build warning and the FileCheck tests run without optimizations.
There was a problem hiding this comment.
Ok, we need to update SPIRV-Tools to recognize these instructions as terminator as well :) Will do so soon
There was a problem hiding this comment.
Another explanation would be Clang version. There are a few new warnings on Clang 11 but Appveyor is still at 10.0.1.
There was a problem hiding this comment.
We should land this PR, and we will separately make fixes to SPIRV-Tools for recognizing these instructions as termination instructions.
|
Look good to me. |
Marijn Suijten (MarijnS95)
left a comment
There was a problem hiding this comment.
Clang 11 build is green now, thanks!
Add OpIgnoreIntersectionKHR/OpTerminateRayKHR related
#3285