Skip to content

Commit

Permalink
SPV: Add NonUniform decoration for constructors.
Browse files Browse the repository at this point in the history
This is missing in particular for OpSampledImage, which can be
a direct argument for texture operations.
  • Loading branch information
BNieuwenhuizen committed Sep 10, 2020
1 parent 5806431 commit c9ffeec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SPIRV/GlslangToSpv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2613,6 +2613,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
else
constructed = builder.createConstructor(precision, arguments, resultType());

if (node->getType().getQualifier().isNonUniform()) {
builder.addDecoration(constructed, spv::DecorationNonUniformEXT);
}

builder.clearAccessChain();
builder.setAccessChainRValue(constructed);

Expand Down

0 comments on commit c9ffeec

Please sign in to comment.