Skip to content

Commit a1515b1

Browse files
mmereckisys_zuul
authored andcommitted
Skip simd32 compilation for per-pixel dispatch with x16 samples.
Change-Id: I5f94ba2ab8703ceb3d31dac7813cc43cd41101a9
1 parent 53c6d7b commit a1515b1

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

IGC/Compiler/CISACodeGen/PixelShaderCodeGen.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,15 @@ bool CPixelShader::CompileSIMDSize(SIMDMode simdMode, EmitPass& EP, llvm::Functi
12701270

12711271
const PixelShaderInfo& psInfo = ctx->getModuleMetaData()->psInfo;
12721272

1273+
// Disable simd32 compilation on platforms that do not support per-pixel
1274+
// dispatch with num samples == 16.
1275+
if (psInfo.NumSamples == 16 &&
1276+
!ctx->platform.supportSimd32PerPixelPSWithNumSamples16() &&
1277+
!IsPerSample())
1278+
{
1279+
return false;
1280+
}
1281+
12731282
if (psInfo.ForceEnableSimd32) // UMD forced compilation of simd32.
12741283
{
12751284
return true;

IGC/Compiler/CISACodeGen/Platform.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ bool SupportHDCUnormFormats() const { return m_platformInfo.eRenderCoreFamily >=
113113
}
114114
bool psSimd32SkipStallHeuristic() const { return m_caps.KernelHwCaps.EUThreadsPerEU == 6; }
115115
bool enablePSsimd32() const { return m_platformInfo.eRenderCoreFamily >= IGFX_GEN9_CORE; }
116+
117+
bool supportSimd32PerPixelPSWithNumSamples16() const
118+
{
119+
return false;
120+
}
121+
116122
bool supportDisableMidThreadPreemptionSwitch() const { return m_platformInfo.eRenderCoreFamily >= IGFX_GEN10_CORE; }
117123

118124
bool needSWStencil() const

IGC/common/MDFrameWork.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ namespace IGC
248248
bool blendToFillEnabled = false;
249249
bool forceEarlyZ = false; // force earlyz test
250250
bool hasVersionedLoop = false; // if versioned by customloopversioning
251+
// Number of samples for this pixel shader if known.
252+
// Valid values 0, 1, 2, 4, 8 and 16.
253+
// 0 means unknown or not set.
254+
unsigned char NumSamples = 0;
251255
std::vector<int> blendOptimizationMode;
252256
std::vector<int> colorOutputMask;
253257
};

0 commit comments

Comments
 (0)