Skip to content

Commit af39469

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: f330cc5: Setting correct pushed inputs limit and use right max num GRFs
Basing on HW and vISA limitations
1 parent 390c40b commit af39469

File tree

3 files changed

+4
-23
lines changed

3 files changed

+4
-23
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5967,11 +5967,8 @@ namespace IGC
59675967
void CEncoder::DeclareInput(CVariable* var, uint offset, uint instance)
59685968
{
59695969
// Avoid declaring more inputs/outputs than available registers
5970-
if (offset + var->GetSize() >= m_program->m_Platform->getMaxNumGRF(m_program->GetShaderType()) * getGRFSize())
5971-
{
5972-
IGC_ASSERT(0);
5970+
if (offset + var->GetSize() >= vKernel->getNumRegTotal() * getGRFSize())
59735971
return;
5974-
}
59755972
V(vKernel->CreateVISAInputVar(
59765973
var->visaGenVariable[instance],
59775974
int_cast<unsigned short>(offset),
@@ -5981,11 +5978,8 @@ namespace IGC
59815978
void CEncoder::DeclarePred(CVariable * var, uint offset)
59825979
{
59835980
// Avoid declaring more inputs/outputs than available registers
5984-
if (offset + var->GetSize() >= m_program->m_Platform->getMaxNumGRF(m_program->GetShaderType()) * getGRFSize())
5985-
{
5986-
IGC_ASSERT(0);
5981+
if (offset + var->GetSize() >= vKernel->getNumRegTotal() * getGRFSize())
59875982
return;
5988-
}
59895983
V(vKernel->CreateVISAPredVar(
59905984
var->visaPredVariable,
59915985
"",

IGC/Compiler/CISACodeGen/Platform.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,18 +1213,6 @@ uint32_t getGRFSize() const
12131213
return isCoreChildOf(IGFX_XE_HPC_CORE) ? 64 : 32;
12141214
}
12151215

1216-
uint32_t getMaxNumGRF(ShaderType type) const
1217-
{
1218-
if (supportsVRT())
1219-
{
1220-
return 256;
1221-
}
1222-
else
1223-
{
1224-
return 128;
1225-
}
1226-
}
1227-
12281216
uint32_t getInlineDataSize() const
12291217
{
12301218
if (!supportInlineData()) return 0;

IGC/Compiler/CISACodeGen/PushAnalysis.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,10 +1610,9 @@ namespace IGC
16101610

16111611
if (m_context->platform.isCoreChildOf(IGFX_XE3_CORE))
16121612
{
1613-
// VRT allows us to have 256GRFs, so we can double the number of pushed inputs
16141613
MaxNumOfPushedInputs = 24 * 2;
1615-
m_pMaxNumOfVSPushedInputs = 30;
1616-
m_pMaxNumOfDSPushedInputs = 24 * 2; // 48 * vec4 == 192 GRF == 3/4 256 GRF
1614+
m_pMaxNumOfVSPushedInputs = 24 * 2;
1615+
m_pMaxNumOfDSPushedInputs = 24 * 2;
16171616
}
16181617
else
16191618
{

0 commit comments

Comments
 (0)