Skip to content

Commit 6a16031

Browse files
dlei6gsys_zuul
authored andcommitted
Disable bindful promotion for library compilations
Change-Id: Iba7ff5402d2c12d732d59fd6133d358cf80b303c
1 parent ba1ad9b commit 6a16031

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ namespace IGC
438438

439439
mpm.add(new ReplaceUnsupportedIntrinsics());
440440

441-
if (IGC_IS_FLAG_DISABLED(DisablePromoteToDirectAS))
441+
if (IGC_IS_FLAG_DISABLED(DisablePromoteToDirectAS) &&
442+
!ctx.getModuleMetaData()->compOpt.IsLibraryCompilation)
442443
{
443444
// Promotes indirect resource access to direct
444445
mpm.add(new BreakConstantExpr());

IGC/common/MDFrameWork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ namespace IGC
215215
bool PreferBindlessImages = false;
216216
bool disableMathRefactoring = false;
217217
bool EnableTakeGlobalAddress = false;
218+
bool IsLibraryCompilation = false;
218219
};
219220

220221
struct ComputeShaderInfo

0 commit comments

Comments
 (0)