File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
IGC/AdaptorCommon/RayTracing Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -115,15 +115,24 @@ bool DynamicRayManagementPass::runOnFunction(Function& F)
115
115
116
116
bool changed = false ;
117
117
118
+ bool hasDiscard = llvm::any_of (
119
+ instructions (F),
120
+ [](auto & I) {
121
+ return isDiscardInstruction (&I);
122
+ }
123
+ );
124
+
118
125
// Dot not process further if:
119
126
// 1. RayTracing is not supported on this platform.
120
127
// 2. Shader does not use RayQuery at all.
121
128
// 3. There are more than 1 exit block.
122
129
// 4. RayQuery needs splitting due to forced SIMD32
130
+ // 5. Shader has discards
123
131
if ((m_CGCtx->platform .supportRayTracing () == false ) ||
124
132
(!m_CGCtx->hasSyncRTCalls ()) ||
125
133
(getNumberOfExitBlocks (F) > 1 ) ||
126
- m_CGCtx->syncRTCallsNeedSplitting ())
134
+ m_CGCtx->syncRTCallsNeedSplitting () ||
135
+ hasDiscard)
127
136
{
128
137
return false ;
129
138
}
You can’t perform that action at this time.
0 commit comments