File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -8820,6 +8820,7 @@ void EmitPass::emitLdmsInstruction(llvm::Instruction* inst)
88208820{
88218821 uint numOperands = inst->getNumOperands();
88228822 EOPCODE opCode = GetOpCode(inst);
8823+ m_currShader->m_State.SetHasLoadInst();
88238824 //Subtract the offsets, and texture resource, lod to get
88248825 //the number of texture coordinates and index to texture source
88258826 uint numSources = numOperands - 5;
Original file line number Diff line number Diff line change @@ -50,9 +50,11 @@ namespace IGC
5050 void SetBarrierNumber (int BarrierNumber) { m_BarrierNumber = BarrierNumber; }
5151 int GetBarrierNumber () const { return m_BarrierNumber; }
5252
53- bool GetHasSample () const { return m_HasSample; }
54- void SetHasSampleInst () { m_HasSampleInst = true ; m_HasSample = true ; }
55- void SetHasGather4Inst () { m_HasGather4Inst = true ; m_HasSample = true ; }
53+ bool GetHasSampleGather4Load () const { return (m_HasSampleInst || m_HasGather4Inst || m_HasLoadInst); }
54+ bool GetHasSampleGather4 () const { return (m_HasSampleInst || m_HasGather4Inst); }
55+ void SetHasSampleInst () { m_HasSampleInst = true ; }
56+ void SetHasGather4Inst () { m_HasGather4Inst = true ; }
57+ void SetHasLoadInst () { m_HasLoadInst = true ; }
5658
5759 bool GetHasDPAS () const { return m_HasDPAS; }
5860 void SetHasDPAS () { m_HasDPAS = true ; }
@@ -115,9 +117,9 @@ namespace IGC
115117 (NumInst < IGC_GET_FLAG_VALUE (MidThreadPreemptionDisableThreshold)));
116118 }
117119 private:
118- bool m_HasSample = false ;
119120 bool m_HasSampleInst = false ;
120121 bool m_HasGather4Inst = false ;
122+ bool m_HasLoadInst = false ;
121123 int m_BarrierNumber = 0 ;
122124 bool m_HasDPAS = false ;
123125 // Shader has LSC store messages with non-default L1 cache control
Original file line number Diff line number Diff line change @@ -2873,7 +2873,7 @@ namespace IGC
28732873
28742874 // TODO: need to change misleading HasBarriers to NumberofBarriers
28752875 m_kernelInfo.m_executionEnvironment .HasBarriers = m_State.GetBarrierNumber ();
2876- m_kernelInfo.m_executionEnvironment .HasSample = m_State.GetHasSample ();
2876+ m_kernelInfo.m_executionEnvironment .HasSample = m_State.GetHasSampleGather4 ();
28772877 m_kernelInfo.m_executionEnvironment .DisableMidThreadPreemption = GetDisableMidThreadPreemption ();
28782878 m_kernelInfo.m_executionEnvironment .SubgroupIndependentForwardProgressRequired =
28792879 m_Context->getModuleMetaData ()->compOpt .SubgroupIndependentForwardProgressRequired ;
You can’t perform that action at this time.
0 commit comments