Skip to content

Commit 714f220

Browse files
lstalmirigcbot
authored andcommitted
Refactor dual-SIMD8 pixel shader support check.
Refactor dual-SIMD8 pixel shader support check.
1 parent 6a13fa9 commit 714f220

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,9 @@ static void PSCodeGen(
11781178
bool earlyExit =
11791179
ctx->getCompilerOption().pixelShaderDoNotAbortOnSpill ? false : true;
11801180

1181+
bool enableDualSIMD8 =
1182+
ctx->platform.supportDualSimd8PS();
1183+
11811184
// for versioned loop, in general SIMD16 with spill has better perf
11821185
bool earlyExit16 = psInfo.hasVersionedLoop ? false : earlyExit;
11831186
bool enableHigherSimd = false;
@@ -1209,7 +1212,7 @@ static void PSCodeGen(
12091212
// don't retry SIMD16 for ForcePSBestSIMD
12101213
if (enableHigherSimd || IGC_GET_FLAG_VALUE(SkipTREarlyExitCheck))
12111214
{
1212-
if (ctx->platform.supportDualSimd8PS())
1215+
if (enableDualSIMD8)
12131216
{
12141217
AddCodeGenPasses(*ctx, shaders, PassMgr, SIMDMode::SIMD16, true, ShaderDispatchMode::DUAL_SIMD8, pSignature);
12151218
}
@@ -1262,7 +1265,7 @@ static void PSCodeGen(
12621265

12631266
if (!useRegKeySimd)
12641267
{
1265-
if (ctx->platform.supportDualSimd8PS())
1268+
if (enableDualSIMD8)
12661269
{
12671270
// the condition for dualsimd8 should be the same as SIMD16, since they are very similar
12681271
if (enableHigherSimd || IGC_GET_FLAG_VALUE(SkipTREarlyExitCheck)) {

0 commit comments

Comments
 (0)