Skip to content

Commit ca8d616

Browse files
ichenkaiigcbot
authored andcommitted
Set EnableLscSamplerRouting as default true
Set EnableLscSamplerRouting as default true.
1 parent 480f8b6 commit ca8d616

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

IGC/Compiler/CISACodeGen/WIAnalysis.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,6 +1546,7 @@ WIAnalysis::WIDependancy WIAnalysisRunner::calculate_dep(const CallInst* inst)
15461546
intrinsic_name == llvm_waveAll ||
15471547
intrinsic_name == llvm_waveClustered ||
15481548
intrinsic_name == llvm_ld_ptr ||
1549+
intrinsic_name == llvm_ldlptr ||
15491550
(IGC_IS_FLAG_DISABLED(DisableUniformTypedAccess) && intrinsic_name == llvm_typed_read) ||
15501551
intrinsic_name == llvm_add_pair ||
15511552
intrinsic_name == llvm_sub_pair ||

IGC/Compiler/SamplerPerfOptPass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,11 @@ bool SamplerPerfOptPass::runOnFunction(Function& F)
400400
}
401401
if (SamplerLoadIntrinsic* loadInst = dyn_cast<SamplerLoadIntrinsic>(II))
402402
{
403+
// EnableLscSamplerRouting key is true (default)
404+
// DisableLscSamplerRouting is from UMD AIL to turn off per shader
403405
if (ctx->platform.hasLSCSamplerRouting() &&
404406
IGC_IS_FLAG_ENABLED(EnableLscSamplerRouting) &&
407+
!ctx->getModuleMetaData()->compOpt.DisableLscSamplerRouting &&
405408
loadInst->getIntrinsicID() == GenISAIntrinsic::GenISA_ldptr)
406409
{
407410
changed = ConvertLdToLdl(loadInst);

IGC/Compiler/TranslateToProgrammableOffsetsPass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,7 @@ bool TranslateToProgrammableOffsetsPass::runOnFunction(Function& F)
10281028
switch (loadInst->getIntrinsicID())
10291029
{
10301030
case GenISAIntrinsic::GenISA_ldptr:
1031+
case GenISAIntrinsic::GenISA_ldlptr:
10311032
newInst = TranslateIntrinsic<GenISAIntrinsic::GenISA_ldptr>::Translate(loadInst);
10321033
break;
10331034
default:

IGC/common/MDFrameWork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ namespace IGC
453453
unsigned FastestS1Options = 0; // FCEXP_NO_EXPRIMENT. Can't access the enum here for some reason.
454454
bool DisableFastestForWaveIntrinsicsCS = false;
455455
bool ForceLinearWalkOnLinearUAV = false;
456+
bool DisableLscSamplerRouting = false;
456457
};
457458

458459
enum class ThreadIDLayout

IGC/common/igc_flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ DECLARE_IGC_REGKEY(bool, EnableInsertingPairedResourcePointer, true, "Enable to
566566
DECLARE_IGC_REGKEY(bool, EnablePromotionToSampleMlod, true,
567567
"Enables promotion of sample and sample_c to sample_mlod and sample_c_mlod instructions when min lod is present", false)
568568
DECLARE_IGC_REGKEY(bool, DisableCorrectlyRoundedMacros, false, "Tmp flag to disable correcly rounded macros for BMG+. This flag will be removed in the future.", false)
569-
DECLARE_IGC_REGKEY(bool, EnableLscSamplerRouting, false, "Enables conversion of LD to LD_L instructions.", false)
569+
DECLARE_IGC_REGKEY(bool, EnableLscSamplerRouting, true, "Enables conversion of LD to LD_L instructions.", false)
570570
DECLARE_IGC_REGKEY(bool, EnableSIMD16ForXe2, false, "Enable SIMD16 for Xe2", false)
571571
DECLARE_IGC_REGKEY(bool, EnableSIMD16ForNonWaveXe2, true, "Enable SIMD16 for Xe2 if the shader doesn't have wave", false)
572572
DECLARE_IGC_REGKEY(DWORD, CheckCSSLMLimit, 2, "Check SLM or threads limit on compute shader to turn on Enable2xGRF on DG2+"\

0 commit comments

Comments
 (0)