From c9ffeec6e313dee62ad76ee1993d35a0f7625c1b Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Thu, 3 Sep 2020 03:09:39 +0200 Subject: [PATCH] SPV: Add NonUniform decoration for constructors. This is missing in particular for OpSampledImage, which can be a direct argument for texture operations. --- SPIRV/GlslangToSpv.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index dd19e77d..9670c72d 100644 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -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);