Skip to content

Commit 0661ccd

Browse files
pkwasnie-inteligcbot
authored andcommitted
fix detection if get_global_id must be int64
Fixes detection if get_global_id must be int64.
1 parent fff4b09 commit 0661ccd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

IGC/Compiler/Builtins/BIFFlagCtrl/BIFFlagCtrlResolution.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ void BIFFlagCtrlResolution::FillFlagCtrl() {
9797
// This assume interferes with instcombine pass, so it is skipped unless really needed, that is:
9898
// 1) StatelessToStateful pass is enabled, AND
9999
// 2) Buffers don't use implicit bufferOffsetArg.
100-
bool useAssumeInGetGlobalId = PtrCGC->m_DriverInfo.SupportsStatelessToStatefulBufferTransformation() &&
100+
BIF_FLAG_CTRL_SET(UseAssumeInGetGlobalId,
101+
PtrCGC->m_DriverInfo.SupportsStatelessToStatefulBufferTransformation() &&
101102
!PtrCGC->getModuleMetaData()->compOpt.GreaterThan4GBBufferRequired &&
102103
IGC_IS_FLAG_ENABLED(EnableStatelessToStateful) &&
103104
!((IGC_IS_FLAG_ENABLED(EnableSupportBufferOffset) || PtrCGC->getModuleMetaData()->compOpt.HasBufferOffsetArg)) &&
104-
!PtrCGC->getModuleMetaData()->compOpt.OptDisable;
105-
BIF_FLAG_CTRL_SET(UseAssumeInGetGlobalId, useAssumeInGetGlobalId);
105+
!PtrCGC->getModuleMetaData()->compOpt.OptDisable);
106106

107107
BIF_FLAG_CTRL_SET(EnableSWSrgbWrites,
108108
IGC_GET_FLAG_VALUE(cl_khr_srgb_image_writes));

IGC/Compiler/Builtins/BIFFlagCtrl/BIFFlagCtrlResolution.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ SPDX-License-Identifier: MIT
2222
BIF_FLAG_CTRL_N_S(BIF_FLAG_NAME),
2323

2424
#define BIF_FLAG_CTRL_SET(BIF_FLAG_NAME, BIF_FLAG_VALUE) \
25-
ListDelegates.emplace(BIF_FLAG_CTRL_N_S(BIF_FLAG_NAME), [&]() -> bool { \
25+
ListDelegates.emplace(BIF_FLAG_CTRL_N_S(BIF_FLAG_NAME), [this]() -> bool { \
2626
return replace(BIF_FLAG_VALUE, \
2727
pModule->getGlobalVariable(BIF_FLAG_CTRL_N_S(BIF_FLAG_NAME))); \
2828
})

0 commit comments

Comments
 (0)