Skip to content

Commit db40ce4

Browse files
ksliwinsigcbot
authored andcommitted
Changes in code.
1 parent a079931 commit db40ce4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

IGC/Compiler/CISACodeGen/PullConstantHeuristics.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ class PullConstantHeuristics : public llvm::ModulePass {
4545
}
4646

4747
DWORD pushConstantGRFThreshold = IGC_GET_FLAG_VALUE(BlockPushConstantGRFThreshold);
48+
CompOptions compOpt;
49+
// If the regkey is set (pushConstantGRFThreshold != 0xFFFFFFFF) then we should use the regkey value, use the compOptions otherwise
50+
if ((pushConstantGRFThreshold == 0xFFFFFFFF) && (compOpt.PushConstantGRFThreshold != UINT32_MAX)) {
51+
pushConstantGRFThreshold = compOpt.PushConstantGRFThreshold;
52+
}
4853
if (pushConstantGRFThreshold != 0xFFFFFFFF) {
4954
return pushConstantGRFThreshold * ctx->platform.getGRFSize() /
5055
(ctx->platform.getMinPushConstantBufferAlignment() * sizeof(DWORD));

IGC/common/MDFrameWork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ enum class ShaderTypeMD
424424
unsigned VISAPreSchedRPThreshold = 0;
425425
unsigned VISAPreSchedCtrl = 0;
426426
unsigned SetLoopUnrollThreshold = 0;
427+
unsigned PushConstantGRFThreshold = UINT32_MAX;
427428
bool UnsafeMathOptimizations = false;
428429
bool disableCustomUnsafeOpts = false;
429430
bool disableReducePow = false;

0 commit comments

Comments
 (0)