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)
115115
116116    bool  changed = false ;
117117
118+     bool  hasDiscard = llvm::any_of (
119+         instructions (F),
120+         [](auto & I) {
121+             return  isDiscardInstruction (&I);
122+         }
123+     );
124+ 
118125    //  Dot not process further if:
119126    //  1. RayTracing is not supported on this platform.
120127    //  2. Shader does not use RayQuery at all.
121128    //  3. There are more than 1 exit block.
122129    //  4. RayQuery needs splitting due to forced SIMD32
130+     //  5. Shader has discards
123131    if  ((m_CGCtx->platform .supportRayTracing () == false ) ||
124132        (!m_CGCtx->hasSyncRTCalls ()) ||
125133        (getNumberOfExitBlocks (F) > 1 ) ||
126-         m_CGCtx->syncRTCallsNeedSplitting ())
134+         m_CGCtx->syncRTCallsNeedSplitting () ||
135+         hasDiscard)
127136    {
128137        return  false ;
129138    }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments