Skip to content

Commit f022912

Browse files
committed
Another fix.
1 parent 779d976 commit f022912

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

source/slang/slang-emit.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ void calcRequiredLoweringPassSet(RequiredLoweringPassSet& result, CodeGenContext
327327
break;
328328
case kIROp_ByteAddressBufferLoad:
329329
case kIROp_ByteAddressBufferStore:
330+
case kIROp_HLSLRWByteAddressBufferType:
331+
case kIROp_HLSLByteAddressBufferType:
330332
result.byteAddressBuffer = true;
331333
break;
332334
}

source/slang/slang-ir-specialize.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,7 @@ struct SpecializationContext
12421242
}
12431243

12441244
// Test if a type is compile time constant.
1245+
HashSet<IRInst*> seenTypeSet;
12451246
bool isCompileTimeConstantType(IRInst* inst)
12461247
{
12471248
// TODO: We probably need/want a more robust test here.
@@ -1251,8 +1252,10 @@ struct SpecializationContext
12511252
return false;
12521253

12531254
ShortList<IRInst*> localWorkList;
1255+
seenTypeSet.clear();
12541256

12551257
localWorkList.add(inst);
1258+
seenTypeSet.add(inst);
12561259

12571260
while (localWorkList.getCount() != 0)
12581261
{
@@ -1275,7 +1278,8 @@ struct SpecializationContext
12751278
for (UInt i = 0; i < curInst->getOperandCount(); ++i)
12761279
{
12771280
auto operand = curInst->getOperand(i);
1278-
localWorkList.add(operand);
1281+
if (seenTypeSet.add(operand))
1282+
localWorkList.add(operand);
12791283
}
12801284
}
12811285
return true;

0 commit comments

Comments
 (0)