@@ -131,7 +131,7 @@ namespace IGC
131131 uint offset = 0 ;
132132 // R0 is always allocated as a predefined variable. Increase offset for R0
133133 IGC_ASSERT (m_R0);
134- offset += 32 ; // R0 is always 32 byte regardless of register size
134+ offset += getGRFSize ();
135135
136136 IGC_ASSERT (m_R1);
137137 if (m_Signature)
@@ -141,7 +141,7 @@ namespace IGC
141141 for (uint i = 0 ; i < m_R1->GetNumberInstance (); i++)
142142 {
143143 AllocateInput (m_R1, offset, i);
144- offset += (i == 0 && m_R1-> GetNumberInstance () > 1 ) ? getGRFSize () : 32 ;
144+ offset += getGRFSize ();
145145 }
146146
147147 for (uint i = 0 ; i < m_numberInstance; i++)
@@ -814,7 +814,7 @@ namespace IGC
814814 void CPixelShader::PreCompile ()
815815 {
816816 CreateImplicitArgs ();
817- m_R1 = GetNewVariable (8 , ISA_TYPE_D, EALIGN_HWORD, false , m_numberInstance);
817+ m_R1 = GetNewVariable (getGRFSize () / SIZE_DWORD , ISA_TYPE_D, EALIGN_HWORD, false , m_numberInstance);
818818 CodeGenContext* ctx = GetContext ();
819819
820820 // make sure the return block is properly set
@@ -998,7 +998,7 @@ namespace IGC
998998 m_PixelPhasePayload = GetNewVariable (responseLength * (getGRFSize () >> 2 ), ISA_TYPE_D, EALIGN_GRF);
999999 m_PixelPhaseCounter = GetNewAlias (m_PixelPhasePayload, ISA_TYPE_UW, 0 , 1 );
10001000 m_CoarseParentIndex = GetNewAlias (m_PixelPhasePayload, ISA_TYPE_UW, getGRFSize (), numLanes (m_SIMDSize));
1001- m_R1 = GetNewAlias (m_PixelPhasePayload, ISA_TYPE_D, 0 , 8 );
1001+ m_R1 = GetNewAlias (m_PixelPhasePayload, ISA_TYPE_D, 0 , getGRFSize () / SIZE_DWORD );
10021002 encoder.SetNoMask ();
10031003 encoder.SetSimdSize (SIMDMode::SIMD1);
10041004 encoder.Copy (m_PixelPhaseCounter, ImmToVariable (0 , ISA_TYPE_UW));
0 commit comments