Skip to content

Commit 718b5b0

Browse files
itsimbalsys_zuul
authored andcommitted
Generate bindless access for image.
Change-Id: Id2a276504d15784cb2d33b2610ca57c56cd266a6
1 parent 1b0e95a commit 718b5b0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

IGC/Compiler/Optimizer/OCLBIUtils.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,15 @@ namespace IGC
125125
switch (type)
126126
{
127127
case IGC::UAVResourceType:
128-
case IGC::BindlessUAVResourceType:
129128
return UAV;
129+
case IGC::BindlessUAVResourceType:
130+
return BINDLESS;
130131
case IGC::SRVResourceType:
131132
return RESOURCE;
132133
case IGC::SamplerResourceType:
133-
case IGC::BindlessSamplerResourceType:
134134
return SAMPLER;
135+
case IGC::BindlessSamplerResourceType:
136+
return BINDLESS_SAMPLER;
135137
case IGC::OtherResourceType:
136138
return BUFFER_TYPE_UNKNOWN;
137139
default:

visa/Gen4_IR.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6648,6 +6648,10 @@ unsigned G4_RegVar::getByteAddr() const
66486648
return reg.phyReg->asGreg()->getRegNum() * GENX_GRF_REG_SIZ +
66496649
reg.subRegOff * (G4_Type_Table[decl->getElemType()].byteSize);
66506650
}
6651+
if (reg.phyReg->isA0())
6652+
{
6653+
return reg.subRegOff * (G4_Type_Table[Type_UW].byteSize);
6654+
}
66516655

66526656
MUST_BE_TRUE(false, ERROR_UNKNOWN);
66536657
return 0;

0 commit comments

Comments
 (0)