Skip to content

Commit 0ee9c25

Browse files
fftzengsys_zuul
authored andcommitted
Add WA to set noMask for all sampler
Change-Id: I9aa813b80e2489e5ba67f55e4577e881f67f1722
1 parent a867443 commit 0ee9c25

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6546,7 +6546,15 @@ void EmitPass::emitSampleInstruction(SampleIntrinsic* inst)
65466546
CVariable* flag = nullptr;
65476547
bool zeroLOD = m_currShader->m_Platform->supportSampleAndLd_lz() && inst->ZeroLOD();
65486548
bool needLoop = ResourceLoopHeader(resource, sampler, flag, label);
6549-
m_encoder->SetPredicate(flag);
6549+
6550+
if (m_currShader->m_Platform->getWATable().Wa_22011157800 && !IGC_IS_FLAG_DISABLED(DiableWaSamplerNoMask))
6551+
{
6552+
m_encoder->SetNoMask();
6553+
}
6554+
else
6555+
{
6556+
m_encoder->SetPredicate(flag);
6557+
}
65506558
m_encoder->Sample(
65516559
opCode, writeMask, immOffset, resource, sampler,
65526560
numSources, dst, payload,

IGC/common/igc_flags.def

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,9 @@ DECLARE_IGC_REGKEY(bool, ForceNonCoherentStatelessBTI, false, "Enable gneeratio
323323
DECLARE_IGC_REGKEY(bool, ForceSendsSupportOnSKLA0, false, "Allow sends on SKL A0, may be unsafe", false)
324324
DECLARE_IGC_REGKEY(bool, DisableWaSendSEnableIndirectMsgDesc, false, "Disable a C0 WA WaSendSEnableIndirectMsgDesc, may be unsafe", false)
325325
DECLARE_IGC_REGKEY(bool, DisableWaDisableSIMD16On3SrcInstr, false, "Disable C0 WA WaDisableSIMD16On3SrcInstr, may be unsafe", false)
326+
DECLARE_IGC_REGKEY(bool, DiableWaSamplerNoMask, false, "Disable WA DiableWaSamplerNoMask", false)
326327
DECLARE_IGC_REGKEY(bool, DisableDualBlendSource, false, "Force the compiler to never use dual blend source messages", false)
327-
DECLARE_IGC_REGKEY(bool, ForceDisableSrc0Alpha, false, "Force the compiler to skip sending src0 alpha. Only works if we are sure alpha to coverage and alpha test is off", false)
328+
DECLARE_IGC_REGKEY(bool, ForceDisableSrc0Alpha, false, "Force the compiler to skip sending src0 alpha. Only works if we are sure alpha to coverage and alpha test is off", false)
328329
DECLARE_IGC_REGKEY(bool, EnableLTO, true, "Enable link time optimization", false)
329330
DECLARE_IGC_REGKEY(bool, EnableLTODebug, false, "Enable debug information for LTO", true)
330331
DECLARE_IGC_REGKEY(DWORD, FunctionControl, 0, "Control function inlining/subroutine/stackcall. See value defs in igc_flags.hpp.", false)

inc/common/sku_wa.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8480,6 +8480,11 @@ typedef struct _WA_TABLE
84808480
WA_BUG_TYPE_UNKNOWN,
84818481
WA_BUG_PERF_IMPACT_UNKNOWN, WA_COMPONENT_UNKNOWN)
84828482

8483+
WA_DECLARE(
8484+
Wa_22011157800,
8485+
"Workaround",
8486+
WA_BUG_TYPE_UNKNOWN,
8487+
WA_BUG_PERF_IMPACT_UNKNOWN, WA_COMPONENT_UNKNOWN)
84838488
} WA_TABLE, *PWA_TABLE;
84848489

84858490
#ifdef _USC_

0 commit comments

Comments
 (0)