Skip to content

Commit 5436b5b

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: ae0b4a8: Unused bindless image args treated as bindless fix.
When emitting zeinfo IGC tags addr mode of images with no users as stateful even if the module is compiled to use bindless images. This caused NEO to throw an error as it disallows the use of both bindless and bindful mode in the same module. This commit sets the default addr mode to bindless for modules that have UseBindlessImage set to true.
1 parent a82c091 commit 5436b5b

File tree

2 files changed

+2
-36
lines changed

2 files changed

+2
-36
lines changed

IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,9 +1151,7 @@ namespace IGC
11511151
// the image arg is either bindless or stateful. check from "kernelArg->needsAllocation()"
11521152
// For stateful image argument, the arg has 0 offset and 0 size
11531153
zebin::PreDefinedAttrGetter::ArgAddrMode arg_addrmode =
1154-
m_ModuleMetadata->UseBindlessImage ?
1155-
zebin::PreDefinedAttrGetter::ArgAddrMode::bindless :
1156-
zebin::PreDefinedAttrGetter::ArgAddrMode::stateful;
1154+
zebin::PreDefinedAttrGetter::ArgAddrMode::stateful;
11571155
uint arg_off = 0;
11581156
uint arg_size = 0;
11591157

@@ -1304,9 +1302,7 @@ namespace IGC
13041302
// For stateful image argument, the arg has 0 offset and 0 size
13051303
// NOTE: we only have stateful sampler now
13061304
zebin::PreDefinedAttrGetter::ArgAddrMode arg_addrmode =
1307-
m_ModuleMetadata->UseBindlessImage ?
1308-
zebin::PreDefinedAttrGetter::ArgAddrMode::bindless :
1309-
zebin::PreDefinedAttrGetter::ArgAddrMode::stateful;
1305+
zebin::PreDefinedAttrGetter::ArgAddrMode::stateful;
13101306
uint arg_off = 0;
13111307
uint arg_size = 0;
13121308
if (kernelArg->needsAllocation()) {

IGC/ocloc_tests/ZEBinary/unused-image-zeinfo.cl

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)