Skip to content

Commit c9ffeec

Browse files
SPV: Add NonUniform decoration for constructors.
This is missing in particular for OpSampledImage, which can be a direct argument for texture operations.
1 parent 5806431 commit c9ffeec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SPIRV/GlslangToSpv.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2613,6 +2613,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
26132613
else
26142614
constructed = builder.createConstructor(precision, arguments, resultType());
26152615

2616+
if (node->getType().getQualifier().isNonUniform()) {
2617+
builder.addDecoration(constructed, spv::DecorationNonUniformEXT);
2618+
}
2619+
26162620
builder.clearAccessChain();
26172621
builder.setAccessChainRValue(constructed);
26182622

0 commit comments

Comments
 (0)