diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 04ad55c1f..f9118bb45 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -429,7 +429,14 @@ void calcRequiredLoweringPassSet( { // If any instruction has an interface type, we need to run // the generics lowering pass. - auto type = inst->getDataType(); + auto type = as<IRType>(inst) ? inst : inst->getDataType(); + for (;;) + { + if (auto ptrType = as<IRPtrTypeBase>(type)) + type = ptrType->getValueType(); + else + break; + } if (type && type->getOp() == kIROp_InterfaceType) { result.generics = true; |
