Skip to content

Commit 62b534b

Browse files
ichenkaiigcbot
authored andcommitted
Use DriverInfo to control lsc sampler routing usage
Use DriverInfo to control lsc sampler routing usage.
1 parent 7e261c9 commit 62b534b

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

IGC/AdaptorOCL/DriverInfoOCL.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ namespace TC
6969
bool EnableLSCForLdRawAndStoreRawOnDG2() const override { return true; }
7070

7171
bool supportsLogicalSSIDInHWTID() const override { return true; }
72+
73+
bool supportLscSamplerRouting() const override { return false; }
7274
};
7375

7476
// In case some cpas are specific to NEO

IGC/Compiler/CISACodeGen/DriverInfo.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ namespace IGC
379379
// Informs if it supports to use a logical SSID from msg0.0 instead of a physical ID from sr0
380380
virtual bool supportsLogicalSSIDInHWTID() const { return false; }
381381

382+
virtual bool supportLscSamplerRouting() const { return true; }
382383
protected:
383384
bool autoGRFSelection = false;
384385
};

IGC/Compiler/SamplerPerfOptPass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ bool SamplerPerfOptPass::runOnFunction(Function& F)
404404
// DisableLscSamplerRouting is from UMD AIL to turn off per shader
405405
if (ctx->platform.hasLSCSamplerRouting() &&
406406
IGC_IS_FLAG_ENABLED(EnableLscSamplerRouting) &&
407+
ctx->m_DriverInfo.supportLscSamplerRouting() &&
407408
!ctx->getModuleMetaData()->compOpt.DisableLscSamplerRouting &&
408409
loadInst->getIntrinsicID() == GenISAIntrinsic::GenISA_ldptr)
409410
{

0 commit comments

Comments
 (0)