Skip to content

Commit 41499bc

Browse files
LihaczewskiVigcbot
authored andcommitted
Added ForceUniform compiler options for RT pipeline
_OS_DESCRIPTION
1 parent 31b4170 commit 41499bc

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -969,16 +969,17 @@ void AddLegalizationPasses(CodeGenContext& ctx, IGCPassManager& mpm, PSSignature
969969
mpm.add(createVectorBitCastOptPass());
970970
}
971971

972-
bool csForceUniformSurfaceSampler = ( ctx.type == ShaderType::COMPUTE_SHADER && ctx.getModuleMetaData()->csInfo.forceUniformSurfaceSampler );
973-
bool csForceUniformBuffer = ( ctx.type == ShaderType::COMPUTE_SHADER && ctx.getModuleMetaData()->csInfo.forceUniformBuffer );
972+
bool forceUniformSurfaceSampler = ctx.getModuleMetaData()->compOpt.ForceUniformSurfaceSampler;
973+
bool forceUniformBuffer = ctx.getModuleMetaData()->compOpt.ForceUniformBuffer;
974+
974975
if (ctx.m_instrTypes.hasUniformAssumptions ||
975976
IGC_IS_FLAG_ENABLED(ForceUniformSurfaceSampler) ||
976-
csForceUniformSurfaceSampler ||
977+
forceUniformSurfaceSampler ||
977978
IGC_IS_FLAG_ENABLED(ForceUniformBuffer) ||
978-
csForceUniformBuffer ) {
979+
forceUniformBuffer ) {
979980
mpm.add(new UniformAssumptions(
980-
IGC_IS_FLAG_ENABLED(ForceUniformSurfaceSampler) || csForceUniformSurfaceSampler,
981-
IGC_IS_FLAG_ENABLED(ForceUniformBuffer) || csForceUniformBuffer )
981+
IGC_IS_FLAG_ENABLED(ForceUniformSurfaceSampler) || forceUniformSurfaceSampler,
982+
IGC_IS_FLAG_ENABLED(ForceUniformBuffer) || forceUniformBuffer )
982983
);
983984
}
984985

IGC/common/MDFrameWork.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ enum class ShaderTypeMD
470470
bool WaEnableALTModeVisaWA = false;
471471
bool EnableLdStCombineforLoad = false;
472472
bool EnableLdStCombinewithDummyLoad = false;
473+
bool ForceUniformBuffer = false;
474+
bool ForceUniformSurfaceSampler = false;
473475
bool EnableIndependentSharedMemoryFenceFunctionality = false;
474476
bool NewSpillCostFunction = false;
475477
bool EnableVRT = false;
@@ -516,8 +518,6 @@ enum class ShaderTypeMD
516518
bool disableSplitOnSpill = false;
517519
bool enableNewSpillCostFunction = false;
518520
bool forceVISAPreSched = false;
519-
bool forceUniformBuffer = false;
520-
bool forceUniformSurfaceSampler = false;
521521
// disables dispatch along y and tiled order optimizations
522522
bool disableLocalIdOrderOptimizations = false;
523523
// force disables dispatch along y optimization

0 commit comments

Comments
 (0)