Skip to content

Commit 1d4d0be

Browse files
committed
Fix.
1 parent 29a6a8d commit 1d4d0be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/slang/slang-emit-spirv.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -4344,8 +4344,11 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex
43444344
continue;
43454345
}
43464346
}
4347-
paramsSet.add(spvGlobalInst);
43484347
referencedBuiltinIRVars.add(globalInst);
4348+
// Don't add duplicate vars to the interface list.
4349+
bool paramAdded = paramsSet.add(spvGlobalInst);
4350+
if (!paramAdded)
4351+
continue;
43494352

43504353
// Don't add a global param to the interface if it is a
43514354
// specialization constant.

0 commit comments

Comments
 (0)