Skip to content

Commit f65a269

Browse files
fftzengsys_zuul
authored andcommitted
Changes in code.
Change-Id: Id7c88f7c9314c2b7dc6da6c4a4fe8bb58d9a4338
1 parent adcbc20 commit f65a269

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,8 +1012,7 @@ void CodeGen(ComputeShaderContext* ctx, CShaderProgram::KernelShaderMap& shaders
10121012
else
10131013
ctx->SetSIMDInfo(SIMD_SKIP_THGRPSIZE, SIMDMode::SIMD16, ShaderDispatchMode::NOT_APPLICABLE);
10141014

1015-
// if this is a retry already, don't bother trying simd32
1016-
if (cgSimd32 && !ctx->m_retryManager.IsLastTry())
1015+
if (cgSimd32)
10171016
AddCodeGenPasses(*ctx, shaders, PassMgr, SIMDMode::SIMD32, true);
10181017
else
10191018
ctx->SetSIMDInfo(SIMD_SKIP_THGRPSIZE, SIMDMode::SIMD16, ShaderDispatchMode::NOT_APPLICABLE);
@@ -1028,9 +1027,7 @@ void CodeGen(ComputeShaderContext* ctx, CShaderProgram::KernelShaderMap& shaders
10281027
{
10291028
AddCodeGenPasses(*ctx, shaders, PassMgr, SIMDMode::SIMD16,
10301029
!ctx->m_retryManager.IsLastTry());
1031-
1032-
// if this is a retry already, don't bother trying simd32
1033-
if (!ctx->m_enableSubroutine && !ctx->m_retryManager.IsLastTry() && maxSimdMode == SIMDMode::SIMD32)
1030+
if (!ctx->m_enableSubroutine && maxSimdMode == SIMDMode::SIMD32)
10341031
{
10351032
AddCodeGenPasses(*ctx, shaders, PassMgr, SIMDMode::SIMD32, true);
10361033
}

IGC/Compiler/CodeGenContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ namespace IGC
279279
{
280280
if (simd32NoSpill)
281281
{
282-
if (occu32 >= occu16)
282+
if (occu32 >= occu16 && occu32 >= occu8)
283283
{
284284
simdMode = SIMDMode::SIMD32;
285285
return m_simdEntries[2];
@@ -291,7 +291,7 @@ namespace IGC
291291

292292
if (simd16NoSpill)
293293
{
294-
if (occu16 >= occu32)
294+
if (occu16 >= occu8 && occu16 >= occu32)
295295
{
296296
simdMode = SIMDMode::SIMD16;
297297
return m_simdEntries[1];

0 commit comments

Comments
 (0)