Branimir Karadžić 7 роки тому
батько
коміт
3a6a6c059d
45 змінених файлів з 3021 додано та 867 видалено
  1. 4 2
      3rdparty/glslang/CMakeLists.txt
  2. 2 1
      3rdparty/glslang/README.md
  3. 97 9
      3rdparty/glslang/SPIRV/GlslangToSpv.cpp
  4. 3 1
      3rdparty/glslang/SPIRV/SpvBuilder.cpp
  5. 1 1
      3rdparty/glslang/SPIRV/SpvBuilder.h
  6. 14 0
      3rdparty/glslang/SPIRV/doc.cpp
  7. 13 0
      3rdparty/glslang/SPIRV/spirv.hpp
  8. 3 0
      3rdparty/glslang/StandAlone/StandAlone.cpp
  9. 18 0
      3rdparty/glslang/Test/310runtimeArray.vert
  10. 0 2
      3rdparty/glslang/Test/baseResults/150.tesc.out
  11. 145 0
      3rdparty/glslang/Test/baseResults/310runtimeArray.vert.out
  12. 1 1
      3rdparty/glslang/Test/baseResults/420.vert.out
  13. 1 1
      3rdparty/glslang/Test/baseResults/array.frag.out
  14. 63 0
      3rdparty/glslang/Test/baseResults/hlsl.noSemantic.functionality1.comp.out
  15. 292 33
      3rdparty/glslang/Test/baseResults/link1.vk.frag.out
  16. 92 0
      3rdparty/glslang/Test/baseResults/nonuniform.frag.out
  17. 632 0
      3rdparty/glslang/Test/baseResults/runtimeArray.vert.out
  18. 359 0
      3rdparty/glslang/Test/baseResults/spv.nonuniform.frag.out
  19. 7 0
      3rdparty/glslang/Test/hlsl.noSemantic.functionality1.comp
  20. 15 1
      3rdparty/glslang/Test/link1.vk.frag
  21. 16 1
      3rdparty/glslang/Test/link2.vk.frag
  22. 33 0
      3rdparty/glslang/Test/nonuniform.frag
  23. 3 0
      3rdparty/glslang/Test/runtests
  24. 108 0
      3rdparty/glslang/Test/runtimeArray.vert
  25. 55 0
      3rdparty/glslang/Test/spv.nonuniform.frag
  26. 11 1
      3rdparty/glslang/glslang/Include/Types.h
  27. 1 0
      3rdparty/glslang/glslang/Include/intermediate.h
  28. 1 1
      3rdparty/glslang/glslang/Include/revision.h
  29. 70 0
      3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
  30. 76 7
      3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
  31. 2 0
      3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h
  32. 7 0
      3rdparty/glslang/glslang/MachineIndependent/Scan.cpp
  33. 2 0
      3rdparty/glslang/glslang/MachineIndependent/Versions.cpp
  34. 1 0
      3rdparty/glslang/glslang/MachineIndependent/Versions.h
  35. 17 1
      3rdparty/glslang/glslang/MachineIndependent/glslang.y
  36. 486 483
      3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
  37. 310 309
      3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
  38. 14 8
      3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
  39. 2 1
      3rdparty/glslang/glslang/MachineIndependent/localintermediate.h
  40. 1 1
      3rdparty/glslang/glslang/Public/ShaderLang.h
  41. 3 0
      3rdparty/glslang/gtests/AST.FromFile.cpp
  42. 18 2
      3rdparty/glslang/gtests/Link.FromFile.Vk.cpp
  43. 1 0
      3rdparty/glslang/gtests/Spv.FromFile.cpp
  44. 3 0
      3rdparty/glslang/hlsl/hlslParseHelper.cpp
  45. 18 0
      3rdparty/glslang/known_good_khr.json

+ 4 - 2
3rdparty/glslang/CMakeLists.txt

@@ -95,8 +95,10 @@ endif()
 if(ENABLE_OPT)
     message(STATUS "optimizer enabled")
     add_definitions(-DENABLE_OPT=1)
-elseif(ENABLE_HLSL)
-    message(STATUS "spirv-tools not linked - illegal SPIRV may be generated for HLSL")
+else()
+    if(ENABLE_HLSL)
+        message(STATUS "spirv-tools not linked - illegal SPIRV may be generated for HLSL")
+    endif()
     add_definitions(-DENABLE_OPT=0)
 endif()
 

+ 2 - 1
3rdparty/glslang/README.md

@@ -57,7 +57,8 @@ branch.
 
 ### Dependencies
 
-* A C++11 compiler
+* A C++11 compiler.
+  (For MSVS: 2015 is recommended, 2013 is fully supported/tested, and 2010 support is attempted, but not tested.)
 * [CMake][cmake]: for generating compilation targets.
 * make: _Linux_, ninja is an alternative, if configured.
 * [Python 2.7][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools.)

+ 97 - 9
3rdparty/glslang/SPIRV/GlslangToSpv.cpp

@@ -102,6 +102,7 @@ private:
 struct OpDecorations {
     spv::Decoration precision;
     spv::Decoration noContraction;
+    spv::Decoration nonUniform;
 };
 
 } // namespace
@@ -136,12 +137,14 @@ protected:
 
     spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier);
     spv::Decoration TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier);
+    spv::Decoration TranslateNonUniformDecoration(const glslang::TQualifier& qualifier);
     spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable, bool memberDeclaration);
     spv::ImageFormat TranslateImageFormat(const glslang::TType& type);
     spv::SelectionControlMask TranslateSelectionControl(const glslang::TIntermSelection&) const;
     spv::SelectionControlMask TranslateSwitchControl(const glslang::TIntermSwitch&) const;
     spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, unsigned int& dependencyLength) const;
     spv::StorageClass TranslateStorageClass(const glslang::TType&);
+    void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType);
     spv::Id createSpvVariable(const glslang::TIntermSymbol*);
     spv::Id getSampledType(const glslang::TSampler&);
     spv::Id getInvertedSwizzleType(const glslang::TIntermTyped&);
@@ -443,6 +446,17 @@ spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qual
         return spv::DecorationMax;
 }
 
+// If glslang type is nonUniform, return SPIR-V NonUniform decoration.
+spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glslang::TQualifier& qualifier)
+{
+    if (qualifier.isNonUniform()) {
+        builder.addExtension("SPV_EXT_descriptor_indexing");
+        builder.addCapability(spv::CapabilityShaderNonUniformEXT);
+        return spv::DecorationNonUniformEXT;
+    } else
+        return spv::DecorationMax;
+}
+
 // Translate a glslang built-in variable to a SPIR-V built in decoration.  Also generate
 // associated capabilities when required.  For some built-in variables, a capability
 // is generated only when using the variable in an executable instruction, but not when
@@ -889,6 +903,42 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
     return spv::StorageClassFunction;
 }
 
+// Add capabilities pertaining to how an array is indexed.
+void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TType& baseType,
+                                                             const glslang::TType& indexType)
+{
+    if (indexType.getQualifier().isNonUniform()) {
+        // deal with an asserted non-uniform index
+        if (baseType.getBasicType() == glslang::EbtSampler) {
+            if (baseType.getQualifier().hasAttachment())
+                builder.addCapability(spv::CapabilityInputAttachmentArrayNonUniformIndexingEXT);
+            else if (baseType.isImage() && baseType.getSampler().dim == glslang::EsdBuffer)
+                builder.addCapability(spv::CapabilityStorageTexelBufferArrayNonUniformIndexingEXT);
+            else if (baseType.isTexture() && baseType.getSampler().dim == glslang::EsdBuffer)
+                builder.addCapability(spv::CapabilityUniformTexelBufferArrayNonUniformIndexingEXT);
+            else if (baseType.isImage())
+                builder.addCapability(spv::CapabilityStorageImageArrayNonUniformIndexingEXT);
+            else if (baseType.isTexture())
+                builder.addCapability(spv::CapabilitySampledImageArrayNonUniformIndexingEXT);
+        } else if (baseType.getBasicType() == glslang::EbtBlock) {
+            if (baseType.getQualifier().storage == glslang::EvqBuffer)
+                builder.addCapability(spv::CapabilityStorageBufferArrayNonUniformIndexingEXT);
+            else if (baseType.getQualifier().storage == glslang::EvqUniform)
+                builder.addCapability(spv::CapabilityUniformBufferArrayNonUniformIndexingEXT);
+        }
+    } else {
+        // assume a dynamically uniform index
+        if (baseType.getBasicType() == glslang::EbtSampler) {
+            if (baseType.getQualifier().hasAttachment())
+                builder.addCapability(spv::CapabilityInputAttachmentArrayDynamicIndexingEXT);
+            else if (baseType.isImage() && baseType.getSampler().dim == glslang::EsdBuffer)
+                builder.addCapability(spv::CapabilityStorageTexelBufferArrayDynamicIndexingEXT);
+            else if (baseType.isTexture() && baseType.getSampler().dim == glslang::EsdBuffer)
+                builder.addCapability(spv::CapabilityUniformTexelBufferArrayDynamicIndexingEXT);
+        }
+    }
+}
+
 // Return whether or not the given type is something that should be tied to a
 // descriptor set.
 bool IsDescriptorResource(const glslang::TType& type)
@@ -1229,8 +1279,10 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
                         id = getSymbolId(it->second);
                         if (id != spv::NoResult) {
                             spv::Id counterId = getSymbolId(symbol);
-                            if (counterId != spv::NoResult)
+                            if (counterId != spv::NoResult) {
+                                builder.addExtension("SPV_GOOGLE_hlsl_functionality1");
                                 builder.addDecorationId(id, spv::DecorationHlslCounterBufferGOOGLE, counterId);
+                            }
                         }
                     }
                 }
@@ -1286,7 +1338,8 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
 
                 // do the operation
                 OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()),
-                                              TranslateNoContractionDecoration(node->getType().getQualifier()) };
+                                              TranslateNoContractionDecoration(node->getType().getQualifier()),
+                                              TranslateNonUniformDecoration(node->getType().getQualifier()) };
                 rValue = createBinaryOperation(node->getOp(), decorations,
                                                convertGlslangToSpvType(node->getType()), leftRValue, rValue,
                                                node->getType().getBasicType());
@@ -1362,6 +1415,8 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
             node->getRight()->traverse(this);
             spv::Id index = accessChainLoad(node->getRight()->getType());
 
+            addIndirectionIndexCapabilities(node->getLeft()->getType(), node->getRight()->getType());
+
             // restore the saved access chain
             builder.setAccessChain(partial);
 
@@ -1415,7 +1470,8 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
 
     // get result
     OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()),
-                                  TranslateNoContractionDecoration(node->getType().getQualifier()) };
+                                  TranslateNoContractionDecoration(node->getType().getQualifier()),
+                                  TranslateNonUniformDecoration(node->getType().getQualifier()) };
     spv::Id result = createBinaryOperation(node->getOp(), decorations,
                                            convertGlslangToSpvType(node->getType()), left, right,
                                            node->getLeft()->getType().getBasicType());
@@ -1454,6 +1510,11 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
     if (node->getOp() == glslang::EOpArrayLength) {
         // Quite special; won't want to evaluate the operand.
 
+        // Currently, the front-end does not allow .length() on an array until it is sized,
+        // except for the last block membeor of an SSBO.
+        // TODO: If this changes, link-time sized arrays might show up here, and need their
+        // size extracted.
+
         // Normal .length() would have been constant folded by the front-end.
         // So, this has to be block.lastMember.length().
         // SPV wants "block" and member number as the operands, go get them.
@@ -1495,7 +1556,8 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
         operand = accessChainLoad(node->getOperand()->getType());
 
     OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()),
-                                  TranslateNoContractionDecoration(node->getType().getQualifier()) };
+                                  TranslateNoContractionDecoration(node->getType().getQualifier()),
+                                  TranslateNonUniformDecoration(node->getType().getQualifier()) };
 
     // it could be a conversion
     if (! result)
@@ -1506,8 +1568,10 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
         result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType());
 
     if (result) {
-        if (invertedType)
+        if (invertedType) {
             result = createInvertedSwizzle(decorations.precision, *node->getOperand(), result);
+            builder.addDecoration(result, decorations.nonUniform);
+        }
 
         builder.clearAccessChain();
         builder.setAccessChainRValue(result);
@@ -1934,7 +1998,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
 
         builder.setLine(node->getLoc().line);
         OpDecorations decorations = { precision,
-                                      TranslateNoContractionDecoration(node->getType().getQualifier()) };
+                                      TranslateNoContractionDecoration(node->getType().getQualifier()),
+                                      TranslateNonUniformDecoration(node->getType().getQualifier()) };
         result = createBinaryOperation(binOp, decorations,
                                        resultType(), leftId, rightId,
                                        left->getType().getBasicType(), reduceComparison);
@@ -2035,7 +2100,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
         case 1:
             {
                 OpDecorations decorations = { precision, 
-                                              TranslateNoContractionDecoration(node->getType().getQualifier()) };
+                                              TranslateNoContractionDecoration(node->getType().getQualifier()),
+                                              TranslateNonUniformDecoration(node->getType().getQualifier()) };
                 result = createUnaryOperation(
                     node->getOp(), decorations,
                     resultType(), operands.front(),
@@ -2651,8 +2717,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
         // (Unsized arrays that survive through linking will be runtime-sized arrays)
         if (type.isSizedArray())
             spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), 0), stride);
-        else
+        else {
+            if (!lastBufferBlockMember) {
+                builder.addExtension("SPV_EXT_descriptor_indexing");
+                builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT);
+            }
             spvType = builder.makeRuntimeArray(spvType);
+        }
         if (stride > 0)
             builder.addDecoration(spvType, spv::DecorationArrayStride, stride);
     }
@@ -2824,6 +2895,9 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
         if (builtIn != spv::BuiltInMax)
             builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn);
 
+        // nonuniform
+        builder.addMemberDecoration(spvType, member, TranslateNonUniformDecoration(glslangMember.getQualifier()));
+
         if (glslangIntermediate->getHlslFunctionality1() && memberQualifier.semanticName != nullptr) {
             builder.addExtension("SPV_GOOGLE_hlsl_functionality1");
             builder.addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationHlslSemanticGOOGLE,
@@ -2891,7 +2965,8 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra
 spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type)
 {
     spv::Id nominalTypeId = builder.accessChainGetInferredType();
-    spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type), nominalTypeId);
+    spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type),
+                                               TranslateNonUniformDecoration(type.getQualifier()), nominalTypeId);
 
     // Need to convert to abstract types when necessary
     if (type.getBasicType() == glslang::EbtBool) {
@@ -4102,6 +4177,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
 
         spv::Id result = builder.createBinOp(binOp, typeId, left, right);
         builder.addDecoration(result, decorations.noContraction);
+        builder.addDecoration(result, decorations.nonUniform);
         return builder.setPrecision(result, decorations.precision);
     }
 
@@ -4113,6 +4189,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
     if (reduceComparison && (op == glslang::EOpEqual || op == glslang::EOpNotEqual)
                          && (builder.isVector(left) || builder.isMatrix(left) || builder.isAggregate(left))) {
         spv::Id result = builder.createCompositeCompare(decorations.precision, left, right, op == glslang::EOpEqual);
+        builder.addDecoration(result, decorations.nonUniform);
         return result;
     }
 
@@ -4174,6 +4251,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
     if (binOp != spv::OpNop) {
         spv::Id result = builder.createBinOp(binOp, typeId, left, right);
         builder.addDecoration(result, decorations.noContraction);
+        builder.addDecoration(result, decorations.nonUniform);
         return builder.setPrecision(result, decorations.precision);
     }
 
@@ -4235,6 +4313,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecora
     if (firstClass) {
         spv::Id result = builder.createBinOp(op, typeId, left, right);
         builder.addDecoration(result, decorations.noContraction);
+        builder.addDecoration(result, decorations.nonUniform);
         return builder.setPrecision(result, decorations.precision);
     }
 
@@ -4274,11 +4353,13 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecora
             spv::Id rightVec = rightMat ? builder.createCompositeExtract(right, vecType, indexes) : smearVec;
             spv::Id result = builder.createBinOp(op, vecType, leftVec, rightVec);
             builder.addDecoration(result, decorations.noContraction);
+            builder.addDecoration(result, decorations.nonUniform);
             results.push_back(builder.setPrecision(result, decorations.precision));
         }
 
         // put the pieces together
         spv::Id result = builder.setPrecision(builder.createCompositeConstruct(typeId, results), decorations.precision);
+        builder.addDecoration(result, decorations.nonUniform);
         return result;
     }
     default:
@@ -4687,6 +4768,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
     }
 
     builder.addDecoration(id, decorations.noContraction);
+    builder.addDecoration(id, decorations.nonUniform);
     return builder.setPrecision(id, decorations.precision);
 }
 
@@ -4715,11 +4797,13 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorat
         spv::Id srcVec  = builder.createCompositeExtract(operand, srcVecType, indexes);
         spv::Id destVec = builder.createUnaryOp(op, destVecType, srcVec);
         builder.addDecoration(destVec, decorations.noContraction);
+        builder.addDecoration(destVec, decorations.nonUniform);
         results.push_back(builder.setPrecision(destVec, decorations.precision));
     }
 
     // put the pieces together
     spv::Id result = builder.setPrecision(builder.createCompositeConstruct(typeId, results), decorations.precision);
+    builder.addDecoration(result, decorations.nonUniform);
     return result;
 }
 
@@ -5177,6 +5261,7 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
         result = builder.createUnaryOp(convOp, destType, operand);
 
     result = builder.setPrecision(result, decorations.precision);
+    builder.addDecoration(result, decorations.nonUniform);
     return result;
 }
 
@@ -6396,6 +6481,9 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
     if (builtIn != spv::BuiltInMax)
         builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
 
+    // nonuniform
+    builder.addDecoration(id, TranslateNonUniformDecoration(symbol->getType().getQualifier()));
+
 #ifdef NV_EXTENSIONS
     if (builtIn == spv::BuiltInSampleMask) {
           spv::Decoration decoration;

+ 3 - 1
3rdparty/glslang/SPIRV/SpvBuilder.cpp

@@ -2331,7 +2331,7 @@ void Builder::accessChainStore(Id rvalue)
 }
 
 // Comments in header
-Id Builder::accessChainLoad(Decoration precision, Id resultType)
+Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resultType)
 {
     Id id;
 
@@ -2377,6 +2377,7 @@ Id Builder::accessChainLoad(Decoration precision, Id resultType)
         // load through the access chain
         id = createLoad(collapseAccessChain());
         setPrecision(id, precision);
+        addDecoration(id, nonUniform);
     }
 
     // Done, unless there are swizzles to do
@@ -2397,6 +2398,7 @@ Id Builder::accessChainLoad(Decoration precision, Id resultType)
     if (accessChain.component != NoResult)
         id = setPrecision(createVectorExtractDynamic(id, resultType, accessChain.component), precision);
 
+    addDecoration(id, nonUniform);
     return id;
 }
 

+ 1 - 1
3rdparty/glslang/SPIRV/SpvBuilder.h

@@ -554,7 +554,7 @@ public:
     void accessChainStore(Id rvalue);
 
     // use accessChain and swizzle to load an r-value
-    Id accessChainLoad(Decoration precision, Id ResultType);
+    Id accessChainLoad(Decoration precision, Decoration nonUniform, Id ResultType);
 
     // get the direct pointer for an l-value
     Id accessChainGetLValue();

+ 14 - 0
3rdparty/glslang/SPIRV/doc.cpp

@@ -255,6 +255,7 @@ const char* DecorationString(int decoration)
     case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV";
 #endif
 
+    case DecorationNonUniformEXT:           return "DecorationNonUniformEXT";
     case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE";
     case DecorationHlslSemanticGOOGLE:      return "DecorationHlslSemanticGOOGLE";
     }
@@ -815,6 +816,19 @@ const char* CapabilityString(int info)
 
     case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT";
 
+    case CapabilityShaderNonUniformEXT:                          return "CapabilityShaderNonUniformEXT";
+    case CapabilityRuntimeDescriptorArrayEXT:                    return "CapabilityRuntimeDescriptorArrayEXT";
+    case CapabilityInputAttachmentArrayDynamicIndexingEXT:       return "CapabilityInputAttachmentArrayDynamicIndexingEXT";
+    case CapabilityUniformTexelBufferArrayDynamicIndexingEXT:    return "CapabilityUniformTexelBufferArrayDynamicIndexingEXT";
+    case CapabilityStorageTexelBufferArrayDynamicIndexingEXT:    return "CapabilityStorageTexelBufferArrayDynamicIndexingEXT";
+    case CapabilityUniformBufferArrayNonUniformIndexingEXT:      return "CapabilityUniformBufferArrayNonUniformIndexingEXT";
+    case CapabilitySampledImageArrayNonUniformIndexingEXT:       return "CapabilitySampledImageArrayNonUniformIndexingEXT";
+    case CapabilityStorageBufferArrayNonUniformIndexingEXT:      return "CapabilityStorageBufferArrayNonUniformIndexingEXT";
+    case CapabilityStorageImageArrayNonUniformIndexingEXT:       return "CapabilityStorageImageArrayNonUniformIndexingEXT";
+    case CapabilityInputAttachmentArrayNonUniformIndexingEXT:    return "CapabilityInputAttachmentArrayNonUniformIndexingEXT";
+    case CapabilityUniformTexelBufferArrayNonUniformIndexingEXT: return "CapabilityUniformTexelBufferArrayNonUniformIndexingEXT";
+    case CapabilityStorageTexelBufferArrayNonUniformIndexingEXT: return "CapabilityStorageTexelBufferArrayNonUniformIndexingEXT";
+
     default: return "Bad";
     }
 }

+ 13 - 0
3rdparty/glslang/SPIRV/spirv.hpp

@@ -393,6 +393,7 @@ enum Decoration {
     DecorationPassthroughNV = 5250,
     DecorationViewportRelativeNV = 5252,
     DecorationSecondaryViewportRelativeNV = 5256,
+    DecorationNonUniformEXT = 5300,
     DecorationHlslCounterBufferGOOGLE = 5634,
     DecorationHlslSemanticGOOGLE = 5635,
     DecorationMax = 0x7fffffff,
@@ -692,6 +693,18 @@ enum Capability {
     CapabilityPerViewAttributesNV = 5260,
     CapabilityFragmentFullyCoveredEXT = 5265,
     CapabilityGroupNonUniformPartitionedNV = 5297,
+    CapabilityShaderNonUniformEXT = 5301,
+    CapabilityRuntimeDescriptorArrayEXT = 5302,
+    CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
+    CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
+    CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
+    CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
+    CapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
+    CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
+    CapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
+    CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
+    CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
+    CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
     CapabilitySubgroupShuffleINTEL = 5568,
     CapabilitySubgroupBufferBlockIOINTEL = 5569,
     CapabilitySubgroupImageBlockIOINTEL = 5570,

+ 3 - 0
3rdparty/glslang/StandAlone/StandAlone.cpp

@@ -729,6 +729,9 @@ void SetMessageOptions(EShMessages& messages)
 //
 void CompileShaders(glslang::TWorklist& worklist)
 {
+    if (Options & EOptionDebug)
+        Error("cannot generate debug information unless linking to generate code");
+
     glslang::TWorkItem* workItem;
     if (Options & EOptionStdin) {
         worklist.remove(workItem);

+ 18 - 0
3rdparty/glslang/Test/310runtimeArray.vert

@@ -0,0 +1,18 @@
+#version 310 es
+
+precision highp float;
+layout(location=0) out float o;
+
+struct S  { float f; };
+buffer b1 { S s[]; };
+buffer b2 { S s[]; } b2name;
+buffer b3 { S s[]; } b3name[];
+buffer b4 { S s[]; } b4name[4];
+
+void main()
+{
+  o = s[5].f;
+  o += b2name.s[6].f;
+  o += b3name[3].s[7].f;
+  o += b4name[2].s[8].f;
+}

+ 0 - 2
3rdparty/glslang/Test/baseResults/150.tesc.out

@@ -942,8 +942,6 @@ ERROR: Linking tessellation control stage: Multiple function bodies in multiple
     main(
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
-ERROR: Linking tessellation control stage: Types must match:
-    gl_out: " out 4-element array of block{ out 4-component vector of float Position gl_Position,  out float PointSize gl_PointSize,  out unsized 2-element array of float ClipDistance gl_ClipDistance}" versus " out unsized 1-element array of block{ out 4-component vector of float Position gl_Position,  out float PointSize gl_PointSize,  out unsized 1-element array of float ClipDistance gl_ClipDistance}"
 ERROR: Linking tessellation control stage: Types must match:
     outa: " global 4-element array of int" versus " global 1-element array of int"
 ERROR: Linking tessellation control stage: can't handle multiple entry points per stage

+ 145 - 0
3rdparty/glslang/Test/baseResults/310runtimeArray.vert.out

@@ -0,0 +1,145 @@
+310runtimeArray.vert
+ERROR: 0:9: '' : array size required 
+ERROR: 1 compilation errors.  No code generated.
+
+
+Shader version: 310
+ERROR: node is still EOpNull!
+0:12  Function Definition: main( ( global void)
+0:12    Function Parameters: 
+0:14    Sequence
+0:14      move second child to first child ( temp highp float)
+0:14        'o' (layout( location=0) smooth out highp float)
+0:14        f: direct index for structure ( global highp float)
+0:14          direct index (layout( column_major shared) temp structure{ global highp float f})
+0:14            s: direct index for structure (layout( column_major shared) buffer unsized 6-element array of structure{ global highp float f})
+0:14              'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer unsized 6-element array of structure{ global highp float f} s})
+0:14              Constant:
+0:14                0 (const uint)
+0:14            Constant:
+0:14              5 (const int)
+0:14          Constant:
+0:14            0 (const int)
+0:15      add second child into first child ( temp highp float)
+0:15        'o' (layout( location=0) smooth out highp float)
+0:15        f: direct index for structure ( global highp float)
+0:15          direct index (layout( column_major shared) temp structure{ global highp float f})
+0:15            s: direct index for structure (layout( column_major shared) buffer unsized 7-element array of structure{ global highp float f})
+0:15              'b2name' (layout( column_major shared) buffer block{layout( column_major shared) buffer unsized 7-element array of structure{ global highp float f} s})
+0:15              Constant:
+0:15                0 (const int)
+0:15            Constant:
+0:15              6 (const int)
+0:15          Constant:
+0:15            0 (const int)
+0:16      add second child into first child ( temp highp float)
+0:16        'o' (layout( location=0) smooth out highp float)
+0:16        f: direct index for structure ( global highp float)
+0:16          direct index (layout( column_major shared) temp structure{ global highp float f})
+0:16            s: direct index for structure (layout( column_major shared) buffer unsized 8-element array of structure{ global highp float f})
+0:16              direct index (layout( column_major shared) temp block{layout( column_major shared) buffer unsized 8-element array of structure{ global highp float f} s})
+0:16                'b3name' (layout( column_major shared) buffer unsized 4-element array of block{layout( column_major shared) buffer unsized 8-element array of structure{ global highp float f} s})
+0:16                Constant:
+0:16                  3 (const int)
+0:16              Constant:
+0:16                0 (const int)
+0:16            Constant:
+0:16              7 (const int)
+0:16          Constant:
+0:16            0 (const int)
+0:17      add second child into first child ( temp highp float)
+0:17        'o' (layout( location=0) smooth out highp float)
+0:17        f: direct index for structure ( global highp float)
+0:17          direct index (layout( column_major shared) temp structure{ global highp float f})
+0:17            s: direct index for structure (layout( column_major shared) buffer unsized 9-element array of structure{ global highp float f})
+0:17              direct index (layout( column_major shared) temp block{layout( column_major shared) buffer unsized 9-element array of structure{ global highp float f} s})
+0:17                'b4name' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer unsized 9-element array of structure{ global highp float f} s})
+0:17                Constant:
+0:17                  2 (const int)
+0:17              Constant:
+0:17                0 (const int)
+0:17            Constant:
+0:17              8 (const int)
+0:17          Constant:
+0:17            0 (const int)
+0:?   Linker Objects
+0:?     'o' (layout( location=0) smooth out highp float)
+0:?     'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer unsized 6-element array of structure{ global highp float f} s})
+0:?     'b2name' (layout( column_major shared) buffer block{layout( column_major shared) buffer unsized 7-element array of structure{ global highp float f} s})
+0:?     'b3name' (layout( column_major shared) buffer unsized 4-element array of block{layout( column_major shared) buffer unsized 8-element array of structure{ global highp float f} s})
+0:?     'b4name' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer unsized 9-element array of structure{ global highp float f} s})
+0:?     'gl_VertexID' ( gl_VertexId highp int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 310
+ERROR: node is still EOpNull!
+0:12  Function Definition: main( ( global void)
+0:12    Function Parameters: 
+0:14    Sequence
+0:14      move second child to first child ( temp highp float)
+0:14        'o' (layout( location=0) smooth out highp float)
+0:14        f: direct index for structure ( global highp float)
+0:14          direct index (layout( column_major shared) temp structure{ global highp float f})
+0:14            s: direct index for structure (layout( column_major shared) buffer unsized 6-element array of structure{ global highp float f})
+0:14              'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer unsized 6-element array of structure{ global highp float f} s})
+0:14              Constant:
+0:14                0 (const uint)
+0:14            Constant:
+0:14              5 (const int)
+0:14          Constant:
+0:14            0 (const int)
+0:15      add second child into first child ( temp highp float)
+0:15        'o' (layout( location=0) smooth out highp float)
+0:15        f: direct index for structure ( global highp float)
+0:15          direct index (layout( column_major shared) temp structure{ global highp float f})
+0:15            s: direct index for structure (layout( column_major shared) buffer unsized 7-element array of structure{ global highp float f})
+0:15              'b2name' (layout( column_major shared) buffer block{layout( column_major shared) buffer unsized 7-element array of structure{ global highp float f} s})
+0:15              Constant:
+0:15                0 (const int)
+0:15            Constant:
+0:15              6 (const int)
+0:15          Constant:
+0:15            0 (const int)
+0:16      add second child into first child ( temp highp float)
+0:16        'o' (layout( location=0) smooth out highp float)
+0:16        f: direct index for structure ( global highp float)
+0:16          direct index (layout( column_major shared) temp structure{ global highp float f})
+0:16            s: direct index for structure (layout( column_major shared) buffer unsized 8-element array of structure{ global highp float f})
+0:16              direct index (layout( column_major shared) temp block{layout( column_major shared) buffer unsized 8-element array of structure{ global highp float f} s})
+0:16                'b3name' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer unsized 8-element array of structure{ global highp float f} s})
+0:16                Constant:
+0:16                  3 (const int)
+0:16              Constant:
+0:16                0 (const int)
+0:16            Constant:
+0:16              7 (const int)
+0:16          Constant:
+0:16            0 (const int)
+0:17      add second child into first child ( temp highp float)
+0:17        'o' (layout( location=0) smooth out highp float)
+0:17        f: direct index for structure ( global highp float)
+0:17          direct index (layout( column_major shared) temp structure{ global highp float f})
+0:17            s: direct index for structure (layout( column_major shared) buffer unsized 9-element array of structure{ global highp float f})
+0:17              direct index (layout( column_major shared) temp block{layout( column_major shared) buffer unsized 9-element array of structure{ global highp float f} s})
+0:17                'b4name' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer unsized 9-element array of structure{ global highp float f} s})
+0:17                Constant:
+0:17                  2 (const int)
+0:17              Constant:
+0:17                0 (const int)
+0:17            Constant:
+0:17              8 (const int)
+0:17          Constant:
+0:17            0 (const int)
+0:?   Linker Objects
+0:?     'o' (layout( location=0) smooth out highp float)
+0:?     'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer unsized 6-element array of structure{ global highp float f} s})
+0:?     'b2name' (layout( column_major shared) buffer block{layout( column_major shared) buffer unsized 7-element array of structure{ global highp float f} s})
+0:?     'b3name' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer unsized 8-element array of structure{ global highp float f} s})
+0:?     'b4name' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer unsized 9-element array of structure{ global highp float f} s})
+0:?     'gl_VertexID' ( gl_VertexId highp int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
+

+ 1 - 1
3rdparty/glslang/Test/baseResults/420.vert.out

@@ -51,7 +51,7 @@ ERROR: 0:157: 'textureQueryLevels' : no matching overloaded function found
 ERROR: 0:157: 'assign' :  cannot convert from ' const float' to ' temp int'
 ERROR: 0:158: 'textureQueryLevels' : no matching overloaded function found 
 ERROR: 0:158: 'assign' :  cannot convert from ' const float' to ' temp int'
-WARNING: 0:161: '[]' : assuming array size of one for compile-time checking of binding numbers for unsized array 
+WARNING: 0:161: '[]' : assuming binding count of one for compile-time checking of binding numbers for unsized array 
 ERROR: 51 compilation errors.  No code generated.
 
 

+ 1 - 1
3rdparty/glslang/Test/baseResults/array.frag.out

@@ -25,7 +25,7 @@ ERROR: 0:101: '[' :  array index out of range '5'
 ERROR: 0:104: 'constructor' : array constructor must have at least one argument 
 ERROR: 0:104: '=' :  cannot convert from ' const float' to ' global unsized 1-element array of int'
 ERROR: 0:106: 'constructor' : array argument must be sized 
-ERROR: 0:111: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:111: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
 ERROR: 0:111: 'variable indexing sampler array' : not supported with this profile: none
 ERROR: 28 compilation errors.  No code generated.
 

+ 63 - 0
3rdparty/glslang/Test/baseResults/hlsl.noSemantic.functionality1.comp.out

@@ -0,0 +1,63 @@
+hlsl.noSemantic.functionality1.comp
+// Module Version 10000
+// Generated by (magic number): 80006
+// Id's are bound by 31
+
+                              Capability Shader
+                              Extension  "SPV_GOOGLE_hlsl_functionality1"
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint GLCompute 4  "main"
+                              ExecutionMode 4 LocalSize 1 1 1
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 6  "@main("
+                              Name 11  "Buf"
+                              MemberName 11(Buf) 0  "@data"
+                              Name 13  "Buf"
+                              Name 16  "Buf@count"
+                              MemberName 16(Buf@count) 0  "@count"
+                              Name 18  "Buf@count"
+                              Decorate 10 ArrayStride 16
+                              MemberDecorate 11(Buf) 0 Offset 0
+                              Decorate 11(Buf) BufferBlock
+                              Decorate 13(Buf) DescriptorSet 0
+                              Decorate 13(Buf) Binding 0
+                              MemberDecorate 16(Buf@count) 0 Offset 0
+                              Decorate 16(Buf@count) BufferBlock
+                              Decorate 18(Buf@count) DescriptorSet 0
+                              DecorateId 13(Buf) DecorationHlslCounterBufferGOOGLE 18(Buf@count)
+               2:             TypeVoid
+               3:             TypeFunction 2
+               8:             TypeFloat 32
+               9:             TypeVector 8(float) 4
+              10:             TypeRuntimeArray 9(fvec4)
+         11(Buf):             TypeStruct 10
+              12:             TypePointer Uniform 11(Buf)
+         13(Buf):     12(ptr) Variable Uniform
+              14:             TypeInt 32 1
+              15:     14(int) Constant 0
+   16(Buf@count):             TypeStruct 14(int)
+              17:             TypePointer Uniform 16(Buf@count)
+   18(Buf@count):     17(ptr) Variable Uniform
+              19:             TypePointer Uniform 14(int)
+              21:     14(int) Constant 1
+              22:             TypeInt 32 0
+              23:     22(int) Constant 1
+              24:     22(int) Constant 0
+              26:    8(float) Constant 1065353216
+              27:    9(fvec4) ConstantComposite 26 26 26 26
+              28:             TypePointer Uniform 9(fvec4)
+         4(main):           2 Function None 3
+               5:             Label
+              30:           2 FunctionCall 6(@main()
+                              Return
+                              FunctionEnd
+       6(@main():           2 Function None 3
+               7:             Label
+              20:     19(ptr) AccessChain 18(Buf@count) 15
+              25:     22(int) AtomicIAdd 20 23 24 21
+              29:     28(ptr) AccessChain 13(Buf) 15 25
+                              Store 29 27
+                              Return
+                              FunctionEnd

+ 292 - 33
3rdparty/glslang/Test/baseResults/link1.vk.frag.out

@@ -2,30 +2,105 @@ link1.vk.frag
 Shader version: 450
 gl_FragCoord origin is upper left
 0:? Sequence
-0:7  Function Definition: main( ( global void)
-0:7    Function Parameters: 
-0:9    Sequence
-0:9      move second child to first child ( temp highp 4-component vector of float)
-0:9        'color' ( out highp 4-component vector of float)
-0:9        Function Call: getColor( ( global highp 4-component vector of float)
+0:16  Function Definition: main( ( global void)
+0:16    Function Parameters: 
+0:18    Sequence
+0:18      move second child to first child ( temp highp 4-component vector of float)
+0:18        'color' (layout( location=0) out highp 4-component vector of float)
+0:18        Function Call: getColor( ( global highp 4-component vector of float)
+0:20      move second child to first child ( temp highp int)
+0:20        direct index ( temp highp int)
+0:20          'a1' ( global unsized 9-element array of highp int)
+0:20          Constant:
+0:20            8 (const int)
+0:20        Constant:
+0:20          1 (const int)
+0:21      move second child to first child ( temp highp int)
+0:21        direct index ( temp highp int)
+0:21          'a2' ( global unsized 2-element array of highp int)
+0:21          Constant:
+0:21            1 (const int)
+0:21        Constant:
+0:21          1 (const int)
+0:22      move second child to first child ( temp highp int)
+0:22        indirect index ( temp highp int)
+0:22          'b' ( global 5-element array of highp int)
+0:22          'i' ( global highp int)
+0:22        Constant:
+0:22          1 (const int)
+0:23      move second child to first child ( temp highp int)
+0:23        direct index ( temp highp int)
+0:23          'c' ( global unsized 4-element array of highp int)
+0:23          Constant:
+0:23            3 (const int)
+0:23        Constant:
+0:23          1 (const int)
 0:?   Linker Objects
-0:?     'color' ( out highp 4-component vector of float)
+0:?     'color' (layout( location=0) out highp 4-component vector of float)
+0:?     'a1' ( global unsized 9-element array of highp int)
+0:?     'a2' ( global unsized 2-element array of highp int)
+0:?     'b' ( global 5-element array of highp int)
+0:?     'c' ( global unsized 4-element array of highp int)
+0:?     'i' ( global highp int)
+0:?     'anon@0' (layout( column_major std430) buffer block{layout( column_major std430) buffer unsized 1-element array of highp float r})
+0:?     'anon@1' (layout( column_major std430) buffer block{layout( column_major std430) buffer unsized 1-element array of highp float m})
 
 link2.vk.frag
 Shader version: 450
 gl_FragCoord origin is upper left
 0:? Sequence
-0:5  Function Definition: getColor( ( global highp 4-component vector of float)
-0:5    Function Parameters: 
-0:7    Sequence
-0:7      Branch: Return with expression
-0:7        texture ( global highp 4-component vector of float)
-0:7          's2D' (layout( binding=1) uniform highp sampler2D)
-0:7          Constant:
-0:7            0.500000
-0:7            0.500000
+0:14  Function Definition: getColor( ( global highp 4-component vector of float)
+0:14    Function Parameters: 
+0:16    Sequence
+0:16      move second child to first child ( temp highp int)
+0:16        direct index ( temp highp int)
+0:16          'a1' ( global unsized 3-element array of highp int)
+0:16          Constant:
+0:16            2 (const int)
+0:16        Constant:
+0:16          1 (const int)
+0:17      move second child to first child ( temp highp int)
+0:17        direct index ( temp highp int)
+0:17          'a2' ( global unsized 10-element array of highp int)
+0:17          Constant:
+0:17            9 (const int)
+0:17        Constant:
+0:17          1 (const int)
+0:18      move second child to first child ( temp highp int)
+0:18        direct index ( temp highp int)
+0:18          'b' ( global unsized 3-element array of highp int)
+0:18          Constant:
+0:18            2 (const int)
+0:18        Constant:
+0:18          1 (const int)
+0:19      move second child to first child ( temp highp int)
+0:19        direct index ( temp highp int)
+0:19          'c' ( global 7-element array of highp int)
+0:19          Constant:
+0:19            3 (const int)
+0:19        Constant:
+0:19          1 (const int)
+0:20      move second child to first child ( temp highp int)
+0:20        indirect index ( temp highp int)
+0:20          'c' ( global 7-element array of highp int)
+0:20          'i' ( global highp int)
+0:20        Constant:
+0:20          1 (const int)
+0:22      Branch: Return with expression
+0:22        texture ( global highp 4-component vector of float)
+0:22          's2D' (layout( binding=1) uniform highp sampler2D)
+0:22          Constant:
+0:22            0.500000
+0:22            0.500000
 0:?   Linker Objects
 0:?     's2D' (layout( binding=1) uniform highp sampler2D)
+0:?     'a1' ( global unsized 3-element array of highp int)
+0:?     'a2' ( global unsized 10-element array of highp int)
+0:?     'b' ( global unsized 3-element array of highp int)
+0:?     'c' ( global 7-element array of highp int)
+0:?     'i' ( global highp int)
+0:?     'anon@0' (layout( column_major std430) buffer block{layout( column_major std430) buffer unsized 1-element array of highp float r})
+0:?     'anon@1' (layout( column_major std430) buffer block{layout( column_major std430) buffer 4-element array of highp float m})
 
 
 Linked fragment stage:
@@ -34,23 +109,207 @@ Linked fragment stage:
 Shader version: 450
 gl_FragCoord origin is upper left
 0:? Sequence
-0:7  Function Definition: main( ( global void)
-0:7    Function Parameters: 
-0:9    Sequence
-0:9      move second child to first child ( temp highp 4-component vector of float)
-0:9        'color' ( out highp 4-component vector of float)
-0:9        Function Call: getColor( ( global highp 4-component vector of float)
-0:5  Function Definition: getColor( ( global highp 4-component vector of float)
-0:5    Function Parameters: 
-0:7    Sequence
-0:7      Branch: Return with expression
-0:7        texture ( global highp 4-component vector of float)
-0:7          's2D' (layout( binding=1) uniform highp sampler2D)
-0:7          Constant:
-0:7            0.500000
-0:7            0.500000
+0:16  Function Definition: main( ( global void)
+0:16    Function Parameters: 
+0:18    Sequence
+0:18      move second child to first child ( temp highp 4-component vector of float)
+0:18        'color' (layout( location=0) out highp 4-component vector of float)
+0:18        Function Call: getColor( ( global highp 4-component vector of float)
+0:20      move second child to first child ( temp highp int)
+0:20        direct index ( temp highp int)
+0:20          'a1' ( global 9-element array of highp int)
+0:20          Constant:
+0:20            8 (const int)
+0:20        Constant:
+0:20          1 (const int)
+0:21      move second child to first child ( temp highp int)
+0:21        direct index ( temp highp int)
+0:21          'a2' ( global 10-element array of highp int)
+0:21          Constant:
+0:21            1 (const int)
+0:21        Constant:
+0:21          1 (const int)
+0:22      move second child to first child ( temp highp int)
+0:22        indirect index ( temp highp int)
+0:22          'b' ( global 5-element array of highp int)
+0:22          'i' ( global highp int)
+0:22        Constant:
+0:22          1 (const int)
+0:23      move second child to first child ( temp highp int)
+0:23        direct index ( temp highp int)
+0:23          'c' ( global 7-element array of highp int)
+0:23          Constant:
+0:23            3 (const int)
+0:23        Constant:
+0:23          1 (const int)
+0:14  Function Definition: getColor( ( global highp 4-component vector of float)
+0:14    Function Parameters: 
+0:16    Sequence
+0:16      move second child to first child ( temp highp int)
+0:16        direct index ( temp highp int)
+0:16          'a1' ( global 3-element array of highp int)
+0:16          Constant:
+0:16            2 (const int)
+0:16        Constant:
+0:16          1 (const int)
+0:17      move second child to first child ( temp highp int)
+0:17        direct index ( temp highp int)
+0:17          'a2' ( global 10-element array of highp int)
+0:17          Constant:
+0:17            9 (const int)
+0:17        Constant:
+0:17          1 (const int)
+0:18      move second child to first child ( temp highp int)
+0:18        direct index ( temp highp int)
+0:18          'b' ( global 3-element array of highp int)
+0:18          Constant:
+0:18            2 (const int)
+0:18        Constant:
+0:18          1 (const int)
+0:19      move second child to first child ( temp highp int)
+0:19        direct index ( temp highp int)
+0:19          'c' ( global 7-element array of highp int)
+0:19          Constant:
+0:19            3 (const int)
+0:19        Constant:
+0:19          1 (const int)
+0:20      move second child to first child ( temp highp int)
+0:20        indirect index ( temp highp int)
+0:20          'c' ( global 7-element array of highp int)
+0:20          'i' ( global highp int)
+0:20        Constant:
+0:20          1 (const int)
+0:22      Branch: Return with expression
+0:22        texture ( global highp 4-component vector of float)
+0:22          's2D' (layout( binding=1) uniform highp sampler2D)
+0:22          Constant:
+0:22            0.500000
+0:22            0.500000
 0:?   Linker Objects
-0:?     'color' ( out highp 4-component vector of float)
+0:?     'color' (layout( location=0) out highp 4-component vector of float)
+0:?     'a1' ( global 9-element array of highp int)
+0:?     'a2' ( global 10-element array of highp int)
+0:?     'b' ( global 5-element array of highp int)
+0:?     'c' ( global 7-element array of highp int)
+0:?     'i' ( global highp int)
+0:?     'anon@0' (layout( column_major std430) buffer block{layout( column_major std430) buffer unsized 1-element array of highp float r})
+0:?     'anon@1' (layout( column_major std430) buffer block{layout( column_major std430) buffer 4-element array of highp float m})
 0:?     's2D' (layout( binding=1) uniform highp sampler2D)
 
-SPIR-V is not generated for failed compile or link
+// Module Version 10000
+// Generated by (magic number): 80006
+// Id's are bound by 71
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 12
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 450
+                              Name 4  "main"
+                              Name 9  "getColor("
+                              Name 12  "color"
+                              Name 19  "a1"
+                              Name 27  "a2"
+                              Name 32  "b"
+                              Name 33  "i"
+                              Name 39  "c"
+                              Name 54  "s2D"
+                              Name 63  "bnameRuntime"
+                              MemberName 63(bnameRuntime) 0  "r"
+                              Name 65  ""
+                              Name 68  "bnameImplicit"
+                              MemberName 68(bnameImplicit) 0  "m"
+                              Name 70  ""
+                              Decorate 12(color) Location 0
+                              Decorate 54(s2D) DescriptorSet 0
+                              Decorate 54(s2D) Binding 1
+                              Decorate 62 ArrayStride 4
+                              MemberDecorate 63(bnameRuntime) 0 Offset 0
+                              Decorate 63(bnameRuntime) BufferBlock
+                              Decorate 65 DescriptorSet 0
+                              Decorate 67 ArrayStride 4
+                              MemberDecorate 68(bnameImplicit) 0 Offset 0
+                              Decorate 68(bnameImplicit) BufferBlock
+                              Decorate 70 DescriptorSet 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeFunction 7(fvec4)
+              11:             TypePointer Output 7(fvec4)
+       12(color):     11(ptr) Variable Output
+              14:             TypeInt 32 1
+              15:             TypeInt 32 0
+              16:     15(int) Constant 9
+              17:             TypeArray 14(int) 16
+              18:             TypePointer Private 17
+          19(a1):     18(ptr) Variable Private
+              20:     14(int) Constant 8
+              21:     14(int) Constant 1
+              22:             TypePointer Private 14(int)
+              24:     15(int) Constant 10
+              25:             TypeArray 14(int) 24
+              26:             TypePointer Private 25
+          27(a2):     26(ptr) Variable Private
+              29:     15(int) Constant 5
+              30:             TypeArray 14(int) 29
+              31:             TypePointer Private 30
+           32(b):     31(ptr) Variable Private
+           33(i):     22(ptr) Variable Private
+              36:     15(int) Constant 7
+              37:             TypeArray 14(int) 36
+              38:             TypePointer Private 37
+           39(c):     38(ptr) Variable Private
+              40:     14(int) Constant 3
+              42:     14(int) Constant 2
+              43:             TypePointer Output 6(float)
+              45:     14(int) Constant 9
+              51:             TypeImage 6(float) 2D sampled format:Unknown
+              52:             TypeSampledImage 51
+              53:             TypePointer UniformConstant 52
+         54(s2D):     53(ptr) Variable UniformConstant
+              56:             TypeVector 6(float) 2
+              57:    6(float) Constant 1056964608
+              58:   56(fvec2) ConstantComposite 57 57
+              62:             TypeRuntimeArray 6(float)
+63(bnameRuntime):             TypeStruct 62
+              64:             TypePointer Uniform 63(bnameRuntime)
+              65:     64(ptr) Variable Uniform
+              66:     15(int) Constant 4
+              67:             TypeArray 6(float) 66
+68(bnameImplicit):             TypeStruct 67
+              69:             TypePointer Uniform 68(bnameImplicit)
+              70:     69(ptr) Variable Uniform
+         4(main):           2 Function None 3
+               5:             Label
+              13:    7(fvec4) FunctionCall 9(getColor()
+                              Store 12(color) 13
+              23:     22(ptr) AccessChain 19(a1) 20
+                              Store 23 21
+              28:     22(ptr) AccessChain 27(a2) 21
+                              Store 28 21
+              34:     14(int) Load 33(i)
+              35:     22(ptr) AccessChain 32(b) 34
+                              Store 35 21
+              41:     22(ptr) AccessChain 39(c) 40
+                              Store 41 21
+                              Return
+                              FunctionEnd
+    9(getColor():    7(fvec4) Function None 8
+              10:             Label
+              44:     43(ptr) AccessChain 12(color) 42
+                              Store 44 21
+              46:     22(ptr) AccessChain 19(a1) 45
+                              Store 46 21
+              47:     22(ptr) AccessChain 27(a2) 42
+                              Store 47 21
+              48:     22(ptr) AccessChain 32(b) 40
+                              Store 48 21
+              49:          37 Load 39(c)
+              50:     22(ptr) AccessChain 32(b) 49
+                              Store 50 21
+              55:          52 Load 54(s2D)
+              59:    7(fvec4) ImageSampleImplicitLod 55 58
+                              ReturnValue 59
+                              FunctionEnd

+ 92 - 0
3rdparty/glslang/Test/baseResults/nonuniform.frag.out

@@ -0,0 +1,92 @@
+nonuniform.frag
+ERROR: 0:10: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier 
+ERROR: 0:11: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier 
+ERROR: 0:12: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier 
+ERROR: 0:22: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier 
+ERROR: 0:28: 'constructor' : too many arguments 
+ERROR: 0:28: 'assign' :  cannot convert from ' const float' to ' nonuniform temp int'
+ERROR: 0:29: 'constructor' : not enough data provided for construction 
+ERROR: 0:29: 'assign' :  cannot convert from ' const float' to ' nonuniform temp int'
+ERROR: 0:32: 'nonuniformEXT' : not allowed on block or structure members 
+ERROR: 0:33: 'nonuniformEXT' : not allowed on block or structure members 
+ERROR: 10 compilation errors.  No code generated.
+
+
+Shader version: 450
+Requested GL_EXT_nonuniform_qualifier
+ERROR: node is still EOpNull!
+0:14  Function Definition: foo(i1;i1; ( nonuniform temp int)
+0:14    Function Parameters: 
+0:14      'nupi' ( nonuniform in int)
+0:14      'f' ( nonuniform out int)
+0:16    Sequence
+0:16      Branch: Return with expression
+0:16        'nupi' ( nonuniform in int)
+0:19  Function Definition: main( ( global void)
+0:19    Function Parameters: 
+0:?     Sequence
+0:24      Function Call: foo(i1;i1; ( nonuniform temp int)
+0:24        'nu_li' ( nonuniform temp int)
+0:24        'nu_li' ( nonuniform temp int)
+0:27      move second child to first child ( temp int)
+0:27        'nu_li' ( nonuniform temp int)
+0:27        add ( nonuniform temp int)
+0:27          'a' ( nonuniform temp int)
+0:27          component-wise multiply ( nonuniform temp int)
+0:27            'a' ( temp int)
+0:27            Constant:
+0:27              2 (const int)
+0:28      'nu_li' ( nonuniform temp int)
+0:29      'nu_li' ( nonuniform temp int)
+0:?   Linker Objects
+0:?     'nonuniformEXT' ( global int)
+0:?     'nu_inv4' ( smooth nonuniform in 4-component vector of float)
+0:?     'nu_gf' ( nonuniform temp float)
+0:?     'nu_outv4' ( nonuniform out 4-component vector of float)
+0:?     'nu_uv4' ( nonuniform uniform 4-component vector of float)
+0:?     'nu_constf' ( nonuniform const float)
+0:?       1.000000
+0:?     'ins' (layout( location=1) smooth in structure{ global float a,  temp float b})
+0:?     'inb' (layout( location=3) in block{ in float a,  in float b})
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+Requested GL_EXT_nonuniform_qualifier
+ERROR: node is still EOpNull!
+0:14  Function Definition: foo(i1;i1; ( nonuniform temp int)
+0:14    Function Parameters: 
+0:14      'nupi' ( nonuniform in int)
+0:14      'f' ( nonuniform out int)
+0:16    Sequence
+0:16      Branch: Return with expression
+0:16        'nupi' ( nonuniform in int)
+0:19  Function Definition: main( ( global void)
+0:19    Function Parameters: 
+0:?     Sequence
+0:24      Function Call: foo(i1;i1; ( nonuniform temp int)
+0:24        'nu_li' ( nonuniform temp int)
+0:24        'nu_li' ( nonuniform temp int)
+0:27      move second child to first child ( temp int)
+0:27        'nu_li' ( nonuniform temp int)
+0:27        add ( nonuniform temp int)
+0:27          'a' ( nonuniform temp int)
+0:27          component-wise multiply ( nonuniform temp int)
+0:27            'a' ( temp int)
+0:27            Constant:
+0:27              2 (const int)
+0:28      'nu_li' ( nonuniform temp int)
+0:29      'nu_li' ( nonuniform temp int)
+0:?   Linker Objects
+0:?     'nonuniformEXT' ( global int)
+0:?     'nu_inv4' ( smooth nonuniform in 4-component vector of float)
+0:?     'nu_gf' ( nonuniform temp float)
+0:?     'nu_outv4' ( nonuniform out 4-component vector of float)
+0:?     'nu_uv4' ( nonuniform uniform 4-component vector of float)
+0:?     'nu_constf' ( nonuniform const float)
+0:?       1.000000
+0:?     'ins' (layout( location=1) smooth in structure{ global float a,  temp float b})
+0:?     'inb' (layout( location=3) in block{ in float a,  in float b})
+

+ 632 - 0
3rdparty/glslang/Test/baseResults/runtimeArray.vert.out

@@ -0,0 +1,632 @@
+runtimeArray.vert
+WARNING: 0:33: '[]' : assuming binding count of one for compile-time checking of binding numbers for unsized array 
+WARNING: 0:34: '[]' : assuming binding count of one for compile-time checking of binding numbers for unsized array 
+WARNING: 0:37: '[]' : assuming binding count of one for compile-time checking of binding numbers for unsized array 
+WARNING: 0:38: '[]' : assuming binding count of one for compile-time checking of binding numbers for unsized array 
+WARNING: 0:39: '[]' : assuming binding count of one for compile-time checking of binding numbers for unsized array 
+WARNING: 0:40: '[]' : assuming binding count of one for compile-time checking of binding numbers for unsized array 
+ERROR: 0:61: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:62: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:63: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:66: 'length' :  array must be declared with a size before using this method
+ERROR: 0:67: 'length' :  array must be declared with a size before using this method
+ERROR: 0:68: 'length' :  array must be declared with a size before using this method
+ERROR: 0:71: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:72: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:73: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:76: 'length' :  array must be declared with a size before using this method
+ERROR: 0:77: 'length' :  array must be declared with a size before using this method
+ERROR: 0:78: 'length' :  array must be declared with a size before using this method
+ERROR: 0:81: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:82: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:83: '[' :  array must be redeclared with a size before being indexed with a variable
+ERROR: 0:86: 'length' :  array must be declared with a size before using this method
+ERROR: 0:87: 'length' :  array must be declared with a size before using this method
+ERROR: 0:88: 'length' :  array must be declared with a size before using this method
+ERROR: 0:100: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
+ERROR: 0:101: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
+ERROR: 0:102: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
+ERROR: 0:103: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
+ERROR: 0:104: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
+ERROR: 0:105: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
+ERROR: 0:106: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
+ERROR: 0:107: 'variable index' : required extension not requested: GL_EXT_nonuniform_qualifier
+ERROR: 26 compilation errors.  No code generated.
+
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:44  Function Definition: main( ( global void)
+0:44    Function Parameters: 
+0:46    Sequence
+0:46      direct index (layout( column_major shared) temp int)
+0:46        a: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:46          'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:46          Constant:
+0:46            0 (const int)
+0:46        Constant:
+0:46          3 (const int)
+0:47      direct index (layout( column_major shared) temp float)
+0:47        b: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:47          'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:47          Constant:
+0:47            1 (const int)
+0:47        Constant:
+0:47          3 (const int)
+0:48      direct index (layout( column_major shared) temp int)
+0:48        a: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:48          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:48          Constant:
+0:48            0 (const int)
+0:48        Constant:
+0:48          3 (const int)
+0:49      direct index (layout( column_major shared) temp float)
+0:49        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:49          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:49          Constant:
+0:49            1 (const int)
+0:49        Constant:
+0:49          3 (const int)
+0:51      direct index (layout( column_major shared) temp int)
+0:51        a: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:51          direct index (layout( column_major shared) temp block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:51            'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:51            Constant:
+0:51              3 (const int)
+0:51          Constant:
+0:51            0 (const int)
+0:51        Constant:
+0:51          3 (const int)
+0:52      direct index (layout( column_major shared) temp float)
+0:52        b: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:52          direct index (layout( column_major shared) temp block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:52            'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:52            Constant:
+0:52              3 (const int)
+0:52          Constant:
+0:52            1 (const int)
+0:52        Constant:
+0:52          3 (const int)
+0:53      direct index (layout( column_major shared) temp int)
+0:53        a: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:53          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:53            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:53            Constant:
+0:53              3 (const int)
+0:53          Constant:
+0:53            0 (const int)
+0:53        Constant:
+0:53          3 (const int)
+0:54      direct index (layout( column_major shared) temp float)
+0:54        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:54          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:54            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:54            Constant:
+0:54              3 (const int)
+0:54          Constant:
+0:54            1 (const int)
+0:54        Constant:
+0:54          3 (const int)
+0:56      direct index (layout( column_major shared) temp int)
+0:56        aua: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:56          'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:56          Constant:
+0:56            0 (const uint)
+0:56        Constant:
+0:56          3 (const int)
+0:57      direct index (layout( column_major shared) temp float)
+0:57        aub: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:57          'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:57          Constant:
+0:57            1 (const uint)
+0:57        Constant:
+0:57          3 (const int)
+0:58      direct index (layout( column_major shared) temp int)
+0:58        aba: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:58          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:58          Constant:
+0:58            0 (const uint)
+0:58        Constant:
+0:58          3 (const int)
+0:59      direct index (layout( column_major shared) temp float)
+0:59        abb: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:59          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:59          Constant:
+0:59            1 (const uint)
+0:59        Constant:
+0:59          3 (const int)
+0:61      indirect index (layout( column_major shared) temp int)
+0:61        a: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:61          'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:61          Constant:
+0:61            0 (const int)
+0:61        'i' ( global int)
+0:62      indirect index (layout( column_major shared) temp float)
+0:62        b: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:62          'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:62          Constant:
+0:62            1 (const int)
+0:62        'i' ( global int)
+0:63      indirect index (layout( column_major shared) temp int)
+0:63        a: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:63          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:63          Constant:
+0:63            0 (const int)
+0:63        'i' ( global int)
+0:64      indirect index (layout( column_major shared) temp float)
+0:64        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:64          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:64          Constant:
+0:64            1 (const int)
+0:64        'i' ( global int)
+0:66      Constant:
+0:66        1 (const int)
+0:67      Constant:
+0:67        1 (const int)
+0:68      Constant:
+0:68        1 (const int)
+0:69      array length ( temp int)
+0:69        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:69          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:69          Constant:
+0:69            1 (const int)
+0:71      indirect index (layout( column_major shared) temp int)
+0:71        a: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:71          direct index (layout( column_major shared) temp block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:71            'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:71            Constant:
+0:71              1 (const int)
+0:71          Constant:
+0:71            0 (const int)
+0:71        'i' ( global int)
+0:72      indirect index (layout( column_major shared) temp float)
+0:72        b: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:72          direct index (layout( column_major shared) temp block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:72            'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:72            Constant:
+0:72              1 (const int)
+0:72          Constant:
+0:72            1 (const int)
+0:72        'i' ( global int)
+0:73      indirect index (layout( column_major shared) temp int)
+0:73        a: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:73          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:73            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:73            Constant:
+0:73              1 (const int)
+0:73          Constant:
+0:73            0 (const int)
+0:73        'i' ( global int)
+0:74      indirect index (layout( column_major shared) temp float)
+0:74        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:74          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:74            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:74            Constant:
+0:74              1 (const int)
+0:74          Constant:
+0:74            1 (const int)
+0:74        'i' ( global int)
+0:76      Constant:
+0:76        1 (const int)
+0:77      Constant:
+0:77        1 (const int)
+0:78      Constant:
+0:78        1 (const int)
+0:79      array length ( temp int)
+0:79        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:79          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:79            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:79            Constant:
+0:79              1 (const int)
+0:79          Constant:
+0:79            1 (const int)
+0:81      indirect index (layout( column_major shared) temp int)
+0:81        aua: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:81          'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:81          Constant:
+0:81            0 (const uint)
+0:81        'i' ( global int)
+0:82      indirect index (layout( column_major shared) temp float)
+0:82        aub: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:82          'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:82          Constant:
+0:82            1 (const uint)
+0:82        'i' ( global int)
+0:83      indirect index (layout( column_major shared) temp int)
+0:83        aba: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:83          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:83          Constant:
+0:83            0 (const uint)
+0:83        'i' ( global int)
+0:84      indirect index (layout( column_major shared) temp float)
+0:84        abb: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:84          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:84          Constant:
+0:84            1 (const uint)
+0:84        'i' ( global int)
+0:86      Constant:
+0:86        1 (const int)
+0:87      Constant:
+0:87        1 (const int)
+0:88      Constant:
+0:88        1 (const int)
+0:89      array length ( temp int)
+0:89        abb: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:89          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:89          Constant:
+0:89            1 (const uint)
+0:91      direct index (layout( binding=1) temp samplerBuffer)
+0:91        'uniformTexelBufferDyn' (layout( binding=1) uniform runtime-sized array of samplerBuffer)
+0:91        Constant:
+0:91          1 (const int)
+0:92      direct index (layout( binding=2 r32f) temp imageBuffer)
+0:92        'storageTexelBufferDyn' (layout( binding=2 r32f) uniform runtime-sized array of imageBuffer)
+0:92        Constant:
+0:92          1 (const int)
+0:93      direct index (layout( binding=3 column_major shared) temp block{layout( column_major shared) uniform float a})
+0:93        'uniformBuffer' (layout( binding=3 column_major shared) uniform runtime-sized array of block{layout( column_major shared) uniform float a})
+0:93        Constant:
+0:93          1 (const int)
+0:94      direct index (layout( binding=4 column_major shared) temp block{layout( column_major shared) buffer float b})
+0:94        'storageBuffer' (layout( binding=4 column_major shared) buffer runtime-sized array of block{layout( column_major shared) buffer float b})
+0:94        Constant:
+0:94          1 (const int)
+0:95      direct index (layout( binding=5) temp sampler2D)
+0:95        'sampledImage' (layout( binding=5) uniform runtime-sized array of sampler2D)
+0:95        Constant:
+0:95          1 (const int)
+0:96      direct index (layout( binding=6 r32f) temp image2D)
+0:96        'storageImage' (layout( binding=6 r32f) uniform runtime-sized array of image2D)
+0:96        Constant:
+0:96          1 (const int)
+0:97      direct index (layout( binding=8) temp samplerBuffer)
+0:97        'uniformTexelBuffer' (layout( binding=8) uniform runtime-sized array of samplerBuffer)
+0:97        Constant:
+0:97          1 (const int)
+0:98      direct index (layout( binding=9 r32f) temp imageBuffer)
+0:98        'storageTexelBuffer' (layout( binding=9 r32f) uniform runtime-sized array of imageBuffer)
+0:98        Constant:
+0:98          1 (const int)
+0:100      indirect index (layout( binding=1) temp samplerBuffer)
+0:100        'uniformTexelBufferDyn' (layout( binding=1) uniform runtime-sized array of samplerBuffer)
+0:100        'i' ( global int)
+0:101      indirect index (layout( binding=2 r32f) temp imageBuffer)
+0:101        'storageTexelBufferDyn' (layout( binding=2 r32f) uniform runtime-sized array of imageBuffer)
+0:101        'i' ( global int)
+0:102      indirect index (layout( binding=3 column_major shared) temp block{layout( column_major shared) uniform float a})
+0:102        'uniformBuffer' (layout( binding=3 column_major shared) uniform runtime-sized array of block{layout( column_major shared) uniform float a})
+0:102        'i' ( global int)
+0:103      indirect index (layout( binding=4 column_major shared) temp block{layout( column_major shared) buffer float b})
+0:103        'storageBuffer' (layout( binding=4 column_major shared) buffer runtime-sized array of block{layout( column_major shared) buffer float b})
+0:103        'i' ( global int)
+0:104      indirect index (layout( binding=5) temp sampler2D)
+0:104        'sampledImage' (layout( binding=5) uniform runtime-sized array of sampler2D)
+0:104        'i' ( global int)
+0:105      indirect index (layout( binding=6 r32f) temp image2D)
+0:105        'storageImage' (layout( binding=6 r32f) uniform runtime-sized array of image2D)
+0:105        'i' ( global int)
+0:106      indirect index (layout( binding=8) temp samplerBuffer)
+0:106        'uniformTexelBuffer' (layout( binding=8) uniform runtime-sized array of samplerBuffer)
+0:106        'i' ( global int)
+0:107      indirect index (layout( binding=9 r32f) temp imageBuffer)
+0:107        'storageTexelBuffer' (layout( binding=9 r32f) uniform runtime-sized array of imageBuffer)
+0:107        'i' ( global int)
+0:?   Linker Objects
+0:?     'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:?     'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:?     'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:?     'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:?     'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:?     'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:?     'uniformTexelBufferDyn' (layout( binding=1) uniform runtime-sized array of samplerBuffer)
+0:?     'storageTexelBufferDyn' (layout( binding=2 r32f) uniform runtime-sized array of imageBuffer)
+0:?     'uniformBuffer' (layout( binding=3 column_major shared) uniform runtime-sized array of block{layout( column_major shared) uniform float a})
+0:?     'storageBuffer' (layout( binding=4 column_major shared) buffer runtime-sized array of block{layout( column_major shared) buffer float b})
+0:?     'sampledImage' (layout( binding=5) uniform runtime-sized array of sampler2D)
+0:?     'storageImage' (layout( binding=6 r32f) uniform runtime-sized array of image2D)
+0:?     'uniformTexelBuffer' (layout( binding=8) uniform runtime-sized array of samplerBuffer)
+0:?     'storageTexelBuffer' (layout( binding=9 r32f) uniform runtime-sized array of imageBuffer)
+0:?     'i' ( global int)
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:44  Function Definition: main( ( global void)
+0:44    Function Parameters: 
+0:46    Sequence
+0:46      direct index (layout( column_major shared) temp int)
+0:46        a: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:46          'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:46          Constant:
+0:46            0 (const int)
+0:46        Constant:
+0:46          3 (const int)
+0:47      direct index (layout( column_major shared) temp float)
+0:47        b: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:47          'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:47          Constant:
+0:47            1 (const int)
+0:47        Constant:
+0:47          3 (const int)
+0:48      direct index (layout( column_major shared) temp int)
+0:48        a: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:48          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:48          Constant:
+0:48            0 (const int)
+0:48        Constant:
+0:48          3 (const int)
+0:49      direct index (layout( column_major shared) temp float)
+0:49        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:49          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:49          Constant:
+0:49            1 (const int)
+0:49        Constant:
+0:49          3 (const int)
+0:51      direct index (layout( column_major shared) temp int)
+0:51        a: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:51          direct index (layout( column_major shared) temp block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:51            'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:51            Constant:
+0:51              3 (const int)
+0:51          Constant:
+0:51            0 (const int)
+0:51        Constant:
+0:51          3 (const int)
+0:52      direct index (layout( column_major shared) temp float)
+0:52        b: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:52          direct index (layout( column_major shared) temp block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:52            'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:52            Constant:
+0:52              3 (const int)
+0:52          Constant:
+0:52            1 (const int)
+0:52        Constant:
+0:52          3 (const int)
+0:53      direct index (layout( column_major shared) temp int)
+0:53        a: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:53          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:53            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:53            Constant:
+0:53              3 (const int)
+0:53          Constant:
+0:53            0 (const int)
+0:53        Constant:
+0:53          3 (const int)
+0:54      direct index (layout( column_major shared) temp float)
+0:54        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:54          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:54            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:54            Constant:
+0:54              3 (const int)
+0:54          Constant:
+0:54            1 (const int)
+0:54        Constant:
+0:54          3 (const int)
+0:56      direct index (layout( column_major shared) temp int)
+0:56        aua: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:56          'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:56          Constant:
+0:56            0 (const uint)
+0:56        Constant:
+0:56          3 (const int)
+0:57      direct index (layout( column_major shared) temp float)
+0:57        aub: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:57          'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:57          Constant:
+0:57            1 (const uint)
+0:57        Constant:
+0:57          3 (const int)
+0:58      direct index (layout( column_major shared) temp int)
+0:58        aba: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:58          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:58          Constant:
+0:58            0 (const uint)
+0:58        Constant:
+0:58          3 (const int)
+0:59      direct index (layout( column_major shared) temp float)
+0:59        abb: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:59          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:59          Constant:
+0:59            1 (const uint)
+0:59        Constant:
+0:59          3 (const int)
+0:61      indirect index (layout( column_major shared) temp int)
+0:61        a: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:61          'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:61          Constant:
+0:61            0 (const int)
+0:61        'i' ( global int)
+0:62      indirect index (layout( column_major shared) temp float)
+0:62        b: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:62          'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:62          Constant:
+0:62            1 (const int)
+0:62        'i' ( global int)
+0:63      indirect index (layout( column_major shared) temp int)
+0:63        a: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:63          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:63          Constant:
+0:63            0 (const int)
+0:63        'i' ( global int)
+0:64      indirect index (layout( column_major shared) temp float)
+0:64        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:64          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:64          Constant:
+0:64            1 (const int)
+0:64        'i' ( global int)
+0:66      Constant:
+0:66        1 (const int)
+0:67      Constant:
+0:67        1 (const int)
+0:68      Constant:
+0:68        1 (const int)
+0:69      array length ( temp int)
+0:69        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:69          'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:69          Constant:
+0:69            1 (const int)
+0:71      indirect index (layout( column_major shared) temp int)
+0:71        a: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:71          direct index (layout( column_major shared) temp block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:71            'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:71            Constant:
+0:71              1 (const int)
+0:71          Constant:
+0:71            0 (const int)
+0:71        'i' ( global int)
+0:72      indirect index (layout( column_major shared) temp float)
+0:72        b: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:72          direct index (layout( column_major shared) temp block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:72            'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:72            Constant:
+0:72              1 (const int)
+0:72          Constant:
+0:72            1 (const int)
+0:72        'i' ( global int)
+0:73      indirect index (layout( column_major shared) temp int)
+0:73        a: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:73          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:73            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:73            Constant:
+0:73              1 (const int)
+0:73          Constant:
+0:73            0 (const int)
+0:73        'i' ( global int)
+0:74      indirect index (layout( column_major shared) temp float)
+0:74        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:74          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:74            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:74            Constant:
+0:74              1 (const int)
+0:74          Constant:
+0:74            1 (const int)
+0:74        'i' ( global int)
+0:76      Constant:
+0:76        1 (const int)
+0:77      Constant:
+0:77        1 (const int)
+0:78      Constant:
+0:78        1 (const int)
+0:79      array length ( temp int)
+0:79        b: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:79          direct index (layout( column_major shared) temp block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:79            'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:79            Constant:
+0:79              1 (const int)
+0:79          Constant:
+0:79            1 (const int)
+0:81      indirect index (layout( column_major shared) temp int)
+0:81        aua: direct index for structure (layout( column_major shared) uniform runtime-sized array of int)
+0:81          'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:81          Constant:
+0:81            0 (const uint)
+0:81        'i' ( global int)
+0:82      indirect index (layout( column_major shared) temp float)
+0:82        aub: direct index for structure (layout( column_major shared) uniform runtime-sized array of float)
+0:82          'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:82          Constant:
+0:82            1 (const uint)
+0:82        'i' ( global int)
+0:83      indirect index (layout( column_major shared) temp int)
+0:83        aba: direct index for structure (layout( column_major shared) buffer runtime-sized array of int)
+0:83          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:83          Constant:
+0:83            0 (const uint)
+0:83        'i' ( global int)
+0:84      indirect index (layout( column_major shared) temp float)
+0:84        abb: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:84          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:84          Constant:
+0:84            1 (const uint)
+0:84        'i' ( global int)
+0:86      Constant:
+0:86        1 (const int)
+0:87      Constant:
+0:87        1 (const int)
+0:88      Constant:
+0:88        1 (const int)
+0:89      array length ( temp int)
+0:89        abb: direct index for structure (layout( column_major shared) buffer runtime-sized array of float)
+0:89          'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:89          Constant:
+0:89            1 (const uint)
+0:91      direct index (layout( binding=1) temp samplerBuffer)
+0:91        'uniformTexelBufferDyn' (layout( binding=1) uniform runtime-sized array of samplerBuffer)
+0:91        Constant:
+0:91          1 (const int)
+0:92      direct index (layout( binding=2 r32f) temp imageBuffer)
+0:92        'storageTexelBufferDyn' (layout( binding=2 r32f) uniform runtime-sized array of imageBuffer)
+0:92        Constant:
+0:92          1 (const int)
+0:93      direct index (layout( binding=3 column_major shared) temp block{layout( column_major shared) uniform float a})
+0:93        'uniformBuffer' (layout( binding=3 column_major shared) uniform runtime-sized array of block{layout( column_major shared) uniform float a})
+0:93        Constant:
+0:93          1 (const int)
+0:94      direct index (layout( binding=4 column_major shared) temp block{layout( column_major shared) buffer float b})
+0:94        'storageBuffer' (layout( binding=4 column_major shared) buffer runtime-sized array of block{layout( column_major shared) buffer float b})
+0:94        Constant:
+0:94          1 (const int)
+0:95      direct index (layout( binding=5) temp sampler2D)
+0:95        'sampledImage' (layout( binding=5) uniform runtime-sized array of sampler2D)
+0:95        Constant:
+0:95          1 (const int)
+0:96      direct index (layout( binding=6 r32f) temp image2D)
+0:96        'storageImage' (layout( binding=6 r32f) uniform runtime-sized array of image2D)
+0:96        Constant:
+0:96          1 (const int)
+0:97      direct index (layout( binding=8) temp samplerBuffer)
+0:97        'uniformTexelBuffer' (layout( binding=8) uniform runtime-sized array of samplerBuffer)
+0:97        Constant:
+0:97          1 (const int)
+0:98      direct index (layout( binding=9 r32f) temp imageBuffer)
+0:98        'storageTexelBuffer' (layout( binding=9 r32f) uniform runtime-sized array of imageBuffer)
+0:98        Constant:
+0:98          1 (const int)
+0:100      indirect index (layout( binding=1) temp samplerBuffer)
+0:100        'uniformTexelBufferDyn' (layout( binding=1) uniform runtime-sized array of samplerBuffer)
+0:100        'i' ( global int)
+0:101      indirect index (layout( binding=2 r32f) temp imageBuffer)
+0:101        'storageTexelBufferDyn' (layout( binding=2 r32f) uniform runtime-sized array of imageBuffer)
+0:101        'i' ( global int)
+0:102      indirect index (layout( binding=3 column_major shared) temp block{layout( column_major shared) uniform float a})
+0:102        'uniformBuffer' (layout( binding=3 column_major shared) uniform runtime-sized array of block{layout( column_major shared) uniform float a})
+0:102        'i' ( global int)
+0:103      indirect index (layout( binding=4 column_major shared) temp block{layout( column_major shared) buffer float b})
+0:103        'storageBuffer' (layout( binding=4 column_major shared) buffer runtime-sized array of block{layout( column_major shared) buffer float b})
+0:103        'i' ( global int)
+0:104      indirect index (layout( binding=5) temp sampler2D)
+0:104        'sampledImage' (layout( binding=5) uniform runtime-sized array of sampler2D)
+0:104        'i' ( global int)
+0:105      indirect index (layout( binding=6 r32f) temp image2D)
+0:105        'storageImage' (layout( binding=6 r32f) uniform runtime-sized array of image2D)
+0:105        'i' ( global int)
+0:106      indirect index (layout( binding=8) temp samplerBuffer)
+0:106        'uniformTexelBuffer' (layout( binding=8) uniform runtime-sized array of samplerBuffer)
+0:106        'i' ( global int)
+0:107      indirect index (layout( binding=9 r32f) temp imageBuffer)
+0:107        'storageTexelBuffer' (layout( binding=9 r32f) uniform runtime-sized array of imageBuffer)
+0:107        'i' ( global int)
+0:?   Linker Objects
+0:?     'buf' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:?     'ubuf' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:?     'bufa' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer runtime-sized array of int a, layout( column_major shared) buffer runtime-sized array of float b})
+0:?     'ubufa' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform runtime-sized array of int a, layout( column_major shared) uniform runtime-sized array of float b})
+0:?     'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer runtime-sized array of int aba, layout( column_major shared) buffer runtime-sized array of float abb})
+0:?     'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform runtime-sized array of int aua, layout( column_major shared) uniform runtime-sized array of float aub})
+0:?     'uniformTexelBufferDyn' (layout( binding=1) uniform runtime-sized array of samplerBuffer)
+0:?     'storageTexelBufferDyn' (layout( binding=2 r32f) uniform runtime-sized array of imageBuffer)
+0:?     'uniformBuffer' (layout( binding=3 column_major shared) uniform runtime-sized array of block{layout( column_major shared) uniform float a})
+0:?     'storageBuffer' (layout( binding=4 column_major shared) buffer runtime-sized array of block{layout( column_major shared) buffer float b})
+0:?     'sampledImage' (layout( binding=5) uniform runtime-sized array of sampler2D)
+0:?     'storageImage' (layout( binding=6 r32f) uniform runtime-sized array of image2D)
+0:?     'uniformTexelBuffer' (layout( binding=8) uniform runtime-sized array of samplerBuffer)
+0:?     'storageTexelBuffer' (layout( binding=9 r32f) uniform runtime-sized array of imageBuffer)
+0:?     'i' ( global int)
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+

+ 359 - 0
3rdparty/glslang/Test/baseResults/spv.nonuniform.frag.out

@@ -0,0 +1,359 @@
+spv.nonuniform.frag
+// Module Version 10000
+// Generated by (magic number): 80006
+// Id's are bound by 210
+
+                              Capability Shader
+                              Capability InputAttachment
+                              Capability SampledBuffer
+                              Capability ImageBuffer
+                              Capability CapabilityShaderNonUniformEXT
+                              Capability CapabilityRuntimeDescriptorArrayEXT
+                              Capability CapabilityInputAttachmentArrayDynamicIndexingEXT
+                              Capability CapabilityUniformTexelBufferArrayDynamicIndexingEXT
+                              Capability CapabilityStorageTexelBufferArrayDynamicIndexingEXT
+                              Capability CapabilityUniformBufferArrayNonUniformIndexingEXT
+                              Capability CapabilitySampledImageArrayNonUniformIndexingEXT
+                              Capability CapabilityStorageBufferArrayNonUniformIndexingEXT
+                              Capability CapabilityStorageImageArrayNonUniformIndexingEXT
+                              Capability CapabilityInputAttachmentArrayNonUniformIndexingEXT
+                              Capability CapabilityUniformTexelBufferArrayNonUniformIndexingEXT
+                              Capability CapabilityStorageTexelBufferArrayNonUniformIndexingEXT
+                              Extension  "SPV_EXT_descriptor_indexing"
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 33 90
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 450
+                              SourceExtension  "GL_EXT_nonuniform_qualifier"
+                              Name 4  "main"
+                              Name 11  "foo(i1;i1;"
+                              Name 9  "nupi"
+                              Name 10  "f"
+                              Name 16  "a"
+                              Name 17  "nu_li"
+                              Name 18  "param"
+                              Name 20  "param"
+                              Name 30  "b"
+                              Name 33  "nu_inv4"
+                              Name 39  "nu_gf"
+                              Name 45  "inputAttachmentDyn"
+                              Name 46  "dyn_i"
+                              Name 62  "uniformTexelBufferDyn"
+                              Name 76  "storageTexelBufferDyn"
+                              Name 85  "uname"
+                              MemberName 85(uname) 0  "a"
+                              Name 88  "uniformBuffer"
+                              Name 90  "nu_ii"
+                              Name 97  "bname"
+                              MemberName 97(bname) 0  "b"
+                              Name 100  "storageBuffer"
+                              Name 110  "sampledImage"
+                              Name 125  "storageImage"
+                              Name 137  "inputAttachment"
+                              Name 147  "uniformTexelBuffer"
+                              Name 158  "storageTexelBuffer"
+                              Name 168  "v"
+                              Name 183  "uv"
+                              Name 193  "m"
+                              Name 201  "S"
+                              MemberName 201(S) 0  "a"
+                              Name 203  "s"
+                              Decorate 13 DecorationNonUniformEXT
+                              Decorate 17(nu_li) DecorationNonUniformEXT
+                              Decorate 19 DecorationNonUniformEXT
+                              Decorate 23 DecorationNonUniformEXT
+                              Decorate 26 DecorationNonUniformEXT
+                              Decorate 27 DecorationNonUniformEXT
+                              Decorate 33(nu_inv4) Location 0
+                              Decorate 33(nu_inv4) DecorationNonUniformEXT
+                              Decorate 38 DecorationNonUniformEXT
+                              Decorate 39(nu_gf) DecorationNonUniformEXT
+                              Decorate 40 DecorationNonUniformEXT
+                              Decorate 41 DecorationNonUniformEXT
+                              Decorate 45(inputAttachmentDyn) DescriptorSet 0
+                              Decorate 45(inputAttachmentDyn) Binding 0
+                              Decorate 45(inputAttachmentDyn) InputAttachmentIndex 0
+                              Decorate 62(uniformTexelBufferDyn) DescriptorSet 0
+                              Decorate 62(uniformTexelBufferDyn) Binding 1
+                              Decorate 76(storageTexelBufferDyn) DescriptorSet 0
+                              Decorate 76(storageTexelBufferDyn) Binding 2
+                              MemberDecorate 85(uname) 0 Offset 0
+                              Decorate 85(uname) Block
+                              Decorate 88(uniformBuffer) DescriptorSet 0
+                              Decorate 88(uniformBuffer) Binding 3
+                              Decorate 90(nu_ii) Flat
+                              Decorate 90(nu_ii) Location 1
+                              Decorate 90(nu_ii) DecorationNonUniformEXT
+                              Decorate 91 DecorationNonUniformEXT
+                              Decorate 94 DecorationNonUniformEXT
+                              MemberDecorate 97(bname) 0 Offset 0
+                              Decorate 97(bname) BufferBlock
+                              Decorate 100(storageBuffer) DescriptorSet 0
+                              Decorate 100(storageBuffer) Binding 4
+                              Decorate 101 DecorationNonUniformEXT
+                              Decorate 103 DecorationNonUniformEXT
+                              Decorate 110(sampledImage) DescriptorSet 0
+                              Decorate 110(sampledImage) Binding 5
+                              Decorate 111 DecorationNonUniformEXT
+                              Decorate 114 DecorationNonUniformEXT
+                              Decorate 125(storageImage) DescriptorSet 0
+                              Decorate 125(storageImage) Binding 6
+                              Decorate 126 DecorationNonUniformEXT
+                              Decorate 129 DecorationNonUniformEXT
+                              Decorate 137(inputAttachment) DescriptorSet 0
+                              Decorate 137(inputAttachment) Binding 7
+                              Decorate 137(inputAttachment) InputAttachmentIndex 1
+                              Decorate 138 DecorationNonUniformEXT
+                              Decorate 140 DecorationNonUniformEXT
+                              Decorate 147(uniformTexelBuffer) DescriptorSet 0
+                              Decorate 147(uniformTexelBuffer) Binding 8
+                              Decorate 148 DecorationNonUniformEXT
+                              Decorate 150 DecorationNonUniformEXT
+                              Decorate 158(storageTexelBuffer) DescriptorSet 0
+                              Decorate 158(storageTexelBuffer) Binding 9
+                              Decorate 159 DecorationNonUniformEXT
+                              Decorate 161 DecorationNonUniformEXT
+                              Decorate 168(v) DecorationNonUniformEXT
+                              Decorate 171 DecorationNonUniformEXT
+                              Decorate 173 DecorationNonUniformEXT
+                              Decorate 178 DecorationNonUniformEXT
+                              Decorate 180 DecorationNonUniformEXT
+                              Decorate 184 DecorationNonUniformEXT
+                              Decorate 186 DecorationNonUniformEXT
+                              Decorate 188 DecorationNonUniformEXT
+                              Decorate 193(m) DecorationNonUniformEXT
+                              Decorate 195 DecorationNonUniformEXT
+                              Decorate 203(s) DecorationNonUniformEXT
+                              Decorate 205 DecorationNonUniformEXT
+                              Decorate 207 DecorationNonUniformEXT
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 32 1
+               7:             TypePointer Function 6(int)
+               8:             TypeFunction 6(int) 7(ptr) 7(ptr)
+              25:      6(int) Constant 2
+              28:             TypeFloat 32
+              29:             TypePointer Function 28(float)
+              31:             TypeVector 28(float) 4
+              32:             TypePointer Input 31(fvec4)
+     33(nu_inv4):     32(ptr) Variable Input
+              34:             TypeInt 32 0
+              35:     34(int) Constant 0
+              36:             TypePointer Input 28(float)
+              42:             TypeImage 28(float) SubpassData nonsampled format:Unknown
+              43:             TypeRuntimeArray 42
+              44:             TypePointer UniformConstant 43
+45(inputAttachmentDyn):     44(ptr) Variable UniformConstant
+              48:             TypePointer UniformConstant 42
+              51:      6(int) Constant 0
+              52:             TypeVector 6(int) 2
+              53:   52(ivec2) ConstantComposite 51 51
+              58:             TypeImage 28(float) Buffer sampled format:Unknown
+              59:             TypeSampledImage 58
+              60:             TypeRuntimeArray 59
+              61:             TypePointer UniformConstant 60
+62(uniformTexelBufferDyn):     61(ptr) Variable UniformConstant
+              64:             TypePointer UniformConstant 59
+              67:      6(int) Constant 1
+              73:             TypeImage 28(float) Buffer nonsampled format:R32f
+              74:             TypeRuntimeArray 73
+              75:             TypePointer UniformConstant 74
+76(storageTexelBufferDyn):     75(ptr) Variable UniformConstant
+              78:             TypePointer UniformConstant 73
+       85(uname):             TypeStruct 28(float)
+              86:             TypeRuntimeArray 85(uname)
+              87:             TypePointer Uniform 86
+88(uniformBuffer):     87(ptr) Variable Uniform
+              89:             TypePointer Input 6(int)
+       90(nu_ii):     89(ptr) Variable Input
+              92:             TypePointer Uniform 28(float)
+       97(bname):             TypeStruct 28(float)
+              98:             TypeRuntimeArray 97(bname)
+              99:             TypePointer Uniform 98
+100(storageBuffer):     99(ptr) Variable Uniform
+             106:             TypeImage 28(float) 2D sampled format:Unknown
+             107:             TypeSampledImage 106
+             108:             TypeRuntimeArray 107
+             109:             TypePointer UniformConstant 108
+110(sampledImage):    109(ptr) Variable UniformConstant
+             112:             TypePointer UniformConstant 107
+             115:             TypeVector 28(float) 2
+             116:   28(float) Constant 1056964608
+             117:  115(fvec2) ConstantComposite 116 116
+             122:             TypeImage 28(float) 2D nonsampled format:R32f
+             123:             TypeRuntimeArray 122
+             124:             TypePointer UniformConstant 123
+125(storageImage):    124(ptr) Variable UniformConstant
+             127:             TypePointer UniformConstant 122
+             130:   52(ivec2) ConstantComposite 67 67
+             135:             TypeRuntimeArray 42
+             136:             TypePointer UniformConstant 135
+137(inputAttachment):    136(ptr) Variable UniformConstant
+             145:             TypeRuntimeArray 59
+             146:             TypePointer UniformConstant 145
+147(uniformTexelBuffer):    146(ptr) Variable UniformConstant
+             156:             TypeRuntimeArray 73
+             157:             TypePointer UniformConstant 156
+158(storageTexelBuffer):    157(ptr) Variable UniformConstant
+             166:             TypeVector 6(int) 4
+             167:             TypePointer Function 166(ivec4)
+             169:     34(int) Constant 1
+             176:     34(int) Constant 2
+             191:             TypeMatrix 31(fvec4) 4
+             192:             TypePointer Function 191
+          201(S):             TypeStruct 6(int)
+             202:             TypePointer Function 201(S)
+         4(main):           2 Function None 3
+               5:             Label
+           16(a):      7(ptr) Variable Function
+       17(nu_li):      7(ptr) Variable Function
+       18(param):      7(ptr) Variable Function
+       20(param):      7(ptr) Variable Function
+           30(b):     29(ptr) Variable Function
+       39(nu_gf):     29(ptr) Variable Function
+       46(dyn_i):      7(ptr) Variable Function
+          168(v):    167(ptr) Variable Function
+         183(uv):    167(ptr) Variable Function
+          193(m):    192(ptr) Variable Function
+          203(s):    202(ptr) Variable Function
+              19:      6(int) Load 17(nu_li)
+                              Store 18(param) 19
+              21:      6(int) FunctionCall 11(foo(i1;i1;) 18(param) 20(param)
+              22:      6(int) Load 20(param)
+                              Store 17(nu_li) 22
+                              Store 16(a) 21
+              23:      6(int) Load 16(a)
+              24:      6(int) Load 16(a)
+              26:      6(int) IMul 24 25
+              27:      6(int) IAdd 23 26
+                              Store 17(nu_li) 27
+              37:     36(ptr) AccessChain 33(nu_inv4) 35
+              38:   28(float) Load 37
+              40:   28(float) Load 39(nu_gf)
+              41:   28(float) FMul 38 40
+                              Store 30(b) 41
+              47:      6(int) Load 46(dyn_i)
+              49:     48(ptr) AccessChain 45(inputAttachmentDyn) 47
+              50:          42 Load 49
+              54:   31(fvec4) ImageRead 50 53
+              55:   28(float) CompositeExtract 54 0
+              56:   28(float) Load 30(b)
+              57:   28(float) FAdd 56 55
+                              Store 30(b) 57
+              63:      6(int) Load 46(dyn_i)
+              65:     64(ptr) AccessChain 62(uniformTexelBufferDyn) 63
+              66:          59 Load 65
+              68:          58 Image 66
+              69:   31(fvec4) ImageFetch 68 67
+              70:   28(float) CompositeExtract 69 0
+              71:   28(float) Load 30(b)
+              72:   28(float) FAdd 71 70
+                              Store 30(b) 72
+              77:      6(int) Load 46(dyn_i)
+              79:     78(ptr) AccessChain 76(storageTexelBufferDyn) 77
+              80:          73 Load 79
+              81:   31(fvec4) ImageRead 80 67
+              82:   28(float) CompositeExtract 81 0
+              83:   28(float) Load 30(b)
+              84:   28(float) FAdd 83 82
+                              Store 30(b) 84
+              91:      6(int) Load 90(nu_ii)
+              93:     92(ptr) AccessChain 88(uniformBuffer) 91 51
+              94:   28(float) Load 93
+              95:   28(float) Load 30(b)
+              96:   28(float) FAdd 95 94
+                              Store 30(b) 96
+             101:      6(int) Load 90(nu_ii)
+             102:     92(ptr) AccessChain 100(storageBuffer) 101 51
+             103:   28(float) Load 102
+             104:   28(float) Load 30(b)
+             105:   28(float) FAdd 104 103
+                              Store 30(b) 105
+             111:      6(int) Load 90(nu_ii)
+             113:    112(ptr) AccessChain 110(sampledImage) 111
+             114:         107 Load 113
+             118:   31(fvec4) ImageSampleImplicitLod 114 117
+             119:   28(float) CompositeExtract 118 0
+             120:   28(float) Load 30(b)
+             121:   28(float) FAdd 120 119
+                              Store 30(b) 121
+             126:      6(int) Load 90(nu_ii)
+             128:    127(ptr) AccessChain 125(storageImage) 126
+             129:         122 Load 128
+             131:   31(fvec4) ImageRead 129 130
+             132:   28(float) CompositeExtract 131 0
+             133:   28(float) Load 30(b)
+             134:   28(float) FAdd 133 132
+                              Store 30(b) 134
+             138:      6(int) Load 90(nu_ii)
+             139:     48(ptr) AccessChain 137(inputAttachment) 138
+             140:          42 Load 139
+             141:   31(fvec4) ImageRead 140 53
+             142:   28(float) CompositeExtract 141 0
+             143:   28(float) Load 30(b)
+             144:   28(float) FAdd 143 142
+                              Store 30(b) 144
+             148:      6(int) Load 90(nu_ii)
+             149:     64(ptr) AccessChain 147(uniformTexelBuffer) 148
+             150:          59 Load 149
+             151:          58 Image 150
+             152:   31(fvec4) ImageFetch 151 67
+             153:   28(float) CompositeExtract 152 0
+             154:   28(float) Load 30(b)
+             155:   28(float) FAdd 154 153
+                              Store 30(b) 155
+             159:      6(int) Load 90(nu_ii)
+             160:     78(ptr) AccessChain 158(storageTexelBuffer) 159
+             161:          73 Load 160
+             162:   31(fvec4) ImageRead 161 67
+             163:   28(float) CompositeExtract 162 0
+             164:   28(float) Load 30(b)
+             165:   28(float) FAdd 164 163
+                              Store 30(b) 165
+             170:      7(ptr) AccessChain 168(v) 169
+             171:      6(int) Load 170
+             172:     92(ptr) AccessChain 88(uniformBuffer) 171 51
+             173:   28(float) Load 172
+             174:   28(float) Load 30(b)
+             175:   28(float) FAdd 174 173
+                              Store 30(b) 175
+             177:      7(ptr) AccessChain 168(v) 176
+             178:      6(int) Load 177
+             179:     92(ptr) AccessChain 88(uniformBuffer) 178 51
+             180:   28(float) Load 179
+             181:   28(float) Load 30(b)
+             182:   28(float) FAdd 181 180
+                              Store 30(b) 182
+             184:      6(int) Load 90(nu_ii)
+             185:      7(ptr) AccessChain 183(uv) 184
+             186:      6(int) Load 185
+             187:     92(ptr) AccessChain 88(uniformBuffer) 186 51
+             188:   28(float) Load 187
+             189:   28(float) Load 30(b)
+             190:   28(float) FAdd 189 188
+                              Store 30(b) 190
+             194:     29(ptr) AccessChain 193(m) 25 176
+             195:   28(float) Load 194
+             196:      6(int) ConvertFToS 195
+             197:     92(ptr) AccessChain 88(uniformBuffer) 196 51
+             198:   28(float) Load 197
+             199:   28(float) Load 30(b)
+             200:   28(float) FAdd 199 198
+                              Store 30(b) 200
+             204:      7(ptr) AccessChain 203(s) 51
+             205:      6(int) Load 204
+             206:     92(ptr) AccessChain 88(uniformBuffer) 205 51
+             207:   28(float) Load 206
+             208:   28(float) Load 30(b)
+             209:   28(float) FAdd 208 207
+                              Store 30(b) 209
+                              Return
+                              FunctionEnd
+  11(foo(i1;i1;):      6(int) Function None 8
+         9(nupi):      7(ptr) FunctionParameter
+           10(f):      7(ptr) FunctionParameter
+              12:             Label
+              13:      6(int) Load 9(nupi)
+                              ReturnValue 13
+                              FunctionEnd

+ 7 - 0
3rdparty/glslang/Test/hlsl.noSemantic.functionality1.comp

@@ -0,0 +1,7 @@
+AppendStructuredBuffer<float4> Buf : register(u0);
+
+[numthreads(1, 1, 1)]
+void main()
+{
+	Buf.Append(1.0f.xxxx);
+}

+ 15 - 1
3rdparty/glslang/Test/link1.vk.frag

@@ -2,9 +2,23 @@
 
 vec4 getColor();
 
-out vec4 color;
+layout(location=0) out vec4 color;
+
+int a1[];  // max size from link1
+int a2[];  // max size from link2
+int b[5];
+int c[];
+int i;
+
+buffer bnameRuntime  { float r[]; };
+buffer bnameImplicit { float m[]; };
 
 void main()
 {
     color = getColor();
+
+    a1[8] = 1;
+    a2[1] = 1;
+    b[i] = 1;
+    c[3] = 1;
 }

+ 16 - 1
3rdparty/glslang/Test/link2.vk.frag

@@ -2,7 +2,22 @@
 
 layout(binding=1) uniform sampler2D s2D;
 
+int a1[];  // max size from link1
+int a2[];  // max size from link2
+int b[];
+int c[7];
+int i;
+
+buffer bnameRuntime  { float r[]; };
+buffer bnameImplicit { float m[4]; };
+
 vec4 getColor()
 {
-  return texture(s2D, vec2(0.5));
+    a1[2] = 1;
+    a2[9] = 1;
+    b[2] = 1;
+    c[3] = 1;
+    c[i] = 1;
+
+    return texture(s2D, vec2(0.5));
 }

+ 33 - 0
3rdparty/glslang/Test/nonuniform.frag

@@ -0,0 +1,33 @@
+#version 450
+
+int nonuniformEXT;
+
+#extension GL_EXT_nonuniform_qualifier : enable
+
+nonuniformEXT in vec4 nu_inv4;
+nonuniformEXT float nu_gf;
+
+nonuniformEXT out vec4 nu_outv4;           // ERROR, out
+nonuniformEXT uniform vec4 nu_uv4;         // ERROR, uniform
+nonuniformEXT const float nu_constf = 1.0; // ERROR, const
+
+nonuniformEXT int foo(nonuniformEXT int nupi, nonuniformEXT out int f)
+{
+    return nupi;
+}
+
+void main()
+{
+    nonuniformEXT int nu_li;
+    nonuniformEXT const int nu_ci = 2; // ERROR, const
+
+    foo(nu_li, nu_li);
+
+    int a;
+    nu_li = nonuniformEXT(a) + nonuniformEXT(a * 2);
+    nu_li = nonuniformEXT(a, a);       // ERROR, too many arguments
+    nu_li = nonuniformEXT();           // ERROR, no arguments
+}
+
+layout(location=1) in struct S { float a; nonuniformEXT float b; } ins;  // ERROR, not on member
+layout(location=3) in inbName { float a; nonuniformEXT float b; } inb;   // ERROR, not on member

+ 3 - 0
3rdparty/glslang/Test/runtests

@@ -207,6 +207,9 @@ diff -b $BASEDIR/hlsl.y-negate-3.vert.out $TARGETDIR/hlsl.y-negate-3.vert.out ||
 $EXE -H -e main -D -Od -fhlsl_functionality1 hlsl.structbuffer.incdec.frag > \
     $TARGETDIR/hlsl.structbuffer.incdec.frag.hlslfun1.out
 diff -b $BASEDIR/hlsl.structbuffer.incdec.frag.hlslfun1.out $TARGETDIR/hlsl.structbuffer.incdec.frag.hlslfun1.out || HASERROR=1
+$EXE -H -e main -D -Od -fhlsl_functionality1 hlsl.noSemantic.functionality1.comp > \
+    $TARGETDIR/hlsl.noSemantic.functionality1.comp.out
+diff -b $BASEDIR/hlsl.noSemantic.functionality1.comp.out $TARGETDIR/hlsl.noSemantic.functionality1.comp.out || HASERROR=1
 
 #
 # Final checking

+ 108 - 0
3rdparty/glslang/Test/runtimeArray.vert

@@ -0,0 +1,108 @@
+#version 450 core
+
+buffer bn {
+    int a[];
+    float b[];
+} buf;
+
+uniform un {
+    int a[];
+    float b[];
+} ubuf;
+
+buffer bna {
+    int a[];
+    float b[];
+} bufa[4];
+
+uniform una {
+    int a[];
+    float b[];
+} ubufa[4];
+
+buffer abn {
+    int aba[];
+    float abb[];
+};
+
+uniform aun {
+    int aua[];
+    float aub[];
+};
+
+layout(binding=1)                             uniform samplerBuffer       uniformTexelBufferDyn[];
+layout(binding=2, r32f)                       uniform imageBuffer         storageTexelBufferDyn[];
+layout(binding=3)                             uniform uname { float a; }  uniformBuffer[];
+layout(binding=4)                             buffer  bname { float b; }  storageBuffer[];
+layout(binding=5)                             uniform sampler2D           sampledImage[];
+layout(binding=6, r32f)                       uniform image2D             storageImage[];
+layout(binding=8)                             uniform samplerBuffer       uniformTexelBuffer[];
+layout(binding=9, r32f)                       uniform imageBuffer         storageTexelBuffer[];
+
+int i;
+
+void main()
+{
+    ubuf.a[3];
+    ubuf.b[3];
+    buf.a[3];
+    buf.b[3];
+
+    ubufa[3].a[3];
+    ubufa[3].b[3];
+    bufa[3].a[3];
+    bufa[3].b[3];
+
+    aua[3];
+    aub[3];
+    aba[3];
+    abb[3];
+
+    ubuf.a[i];             // ERROR
+    ubuf.b[i];             // ERROR
+    buf.a[i];              // ERROR
+    buf.b[i];
+
+    ubuf.a.length();       // ERROR
+    ubuf.b.length();       // ERROR
+    buf.a.length();        // ERROR
+    buf.b.length();
+
+    ubufa[1].a[i];         // ERROR
+    ubufa[1].b[i];         // ERROR
+    bufa[1].a[i];          // ERROR
+    bufa[1].b[i];
+
+    ubufa[1].a.length();   // ERROR
+    ubufa[1].b.length();   // ERROR
+    bufa[1].a.length();    // ERROR
+    bufa[1].b.length();
+
+    aua[i];                // ERROR
+    aub[i];                // ERROR
+    aba[i];                // ERROR
+    abb[i];
+
+    aua.length();          // ERROR
+    aub.length();          // ERROR
+    aba.length();          // ERROR
+    abb.length();
+
+    uniformTexelBufferDyn[1];
+    storageTexelBufferDyn[1];
+    uniformBuffer[1];
+    storageBuffer[1];
+    sampledImage[1];
+    storageImage[1];
+    uniformTexelBuffer[1];
+    storageTexelBuffer[1];
+
+    uniformTexelBufferDyn[i];  // ERROR, need extension
+    storageTexelBufferDyn[i];  // ERROR, need extension
+    uniformBuffer[i];          // ERROR, need extension
+    storageBuffer[i];          // ERROR, need extension
+    sampledImage[i];           // ERROR, need extension
+    storageImage[i];           // ERROR, need extension
+    uniformTexelBuffer[i];     // ERROR, need extension
+    storageTexelBuffer[i];     // ERROR, need extension
+}

+ 55 - 0
3rdparty/glslang/Test/spv.nonuniform.frag

@@ -0,0 +1,55 @@
+#version 450
+
+#extension GL_EXT_nonuniform_qualifier : enable
+
+layout(location=0) nonuniformEXT in vec4 nu_inv4;
+nonuniformEXT float nu_gf;
+layout(location=1) in nonuniformEXT flat int nu_ii;
+
+layout(binding=0, input_attachment_index = 0) uniform subpassInput        inputAttachmentDyn[];
+layout(binding=1)                             uniform samplerBuffer       uniformTexelBufferDyn[];
+layout(binding=2, r32f)                       uniform imageBuffer         storageTexelBufferDyn[];
+layout(binding=3)                             uniform uname { float a; }  uniformBuffer[];
+layout(binding=4)                             buffer  bname { float b; }  storageBuffer[];
+layout(binding=5)                             uniform sampler2D           sampledImage[];
+layout(binding=6, r32f)                       uniform image2D             storageImage[];
+layout(binding=7, input_attachment_index = 1) uniform subpassInput        inputAttachment[];
+layout(binding=8)                             uniform samplerBuffer       uniformTexelBuffer[];
+layout(binding=9, r32f)                       uniform imageBuffer         storageTexelBuffer[];
+
+nonuniformEXT int foo(nonuniformEXT int nupi, nonuniformEXT out int f)
+{
+    return nupi;
+}
+
+void main()
+{
+    nonuniformEXT int nu_li;
+    int dyn_i;
+
+    int a = foo(nu_li, nu_li);
+    nu_li = nonuniformEXT(a) + nonuniformEXT(a * 2);
+
+    float b;
+    b = nu_inv4.x * nu_gf;
+    b += subpassLoad(inputAttachmentDyn[dyn_i]).x;
+    b += texelFetch(uniformTexelBufferDyn[dyn_i], 1).x;
+    b += imageLoad(storageTexelBufferDyn[dyn_i], 1).x;
+    b += uniformBuffer[nu_ii].a;
+    b += storageBuffer[nu_ii].b;
+    b += texture(sampledImage[nu_ii], vec2(0.5)).x;
+    b += imageLoad(storageImage[nu_ii], ivec2(1)).x;
+    b += subpassLoad(inputAttachment[nu_ii]).x;
+    b += texelFetch(uniformTexelBuffer[nu_ii], 1).x;
+    b += imageLoad(storageTexelBuffer[nu_ii], 1).x;
+
+    nonuniformEXT ivec4 v;
+    nonuniformEXT mat4 m;
+    nonuniformEXT struct S { int a; } s;
+    ivec4 uv;
+    b += uniformBuffer[v.y].a;
+    b += uniformBuffer[v[2]].a;
+    b += uniformBuffer[uv[nu_ii]].a;
+    b += uniformBuffer[int(m[2].z)].a;
+    b += uniformBuffer[s.a].a;
+}

+ 11 - 1
3rdparty/glslang/glslang/Include/Types.h

@@ -437,6 +437,7 @@ public:
         clearInterstage();
         clearMemory();
         specConstant = false;
+        nonUniform = false;
         clearLayout();
     }
 
@@ -478,6 +479,7 @@ public:
     {
         storage      = EvqTemporary;
         specConstant = false;
+        nonUniform   = false;
     }
 
     const char*         semanticName;
@@ -502,6 +504,7 @@ public:
     bool readonly     : 1;
     bool writeonly    : 1;
     bool specConstant : 1;  // having a constant_id is not sufficient: expressions have no id, but are still specConstant
+    bool nonUniform   : 1;
 
     bool isMemory() const
     {
@@ -833,6 +836,10 @@ public:
         // true front-end constant.
         return specConstant;
     }
+    bool isNonUniform() const
+    {
+        return nonUniform;
+    }
     bool isFrontEndConstant() const
     {
         // True if the front-end knows the final constant value.
@@ -1383,8 +1390,9 @@ public:
     virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
 
     // "Image" is a superset of "Subpass"
-    virtual bool isImage() const   { return basicType == EbtSampler && getSampler().isImage(); }
+    virtual bool isImage()   const { return basicType == EbtSampler && getSampler().isImage(); }
     virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
+    virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); }
 
     // return true if this type contains any subtype which satisfies the given predicate.
     template <typename P>
@@ -1689,6 +1697,8 @@ public:
             appendStr(" writeonly");
         if (qualifier.specConstant)
             appendStr(" specialization-constant");
+        if (qualifier.nonUniform)
+            appendStr(" nonuniform");
         appendStr(" ");
         appendStr(getStorageQualifierString());
         if (isArray()) {

+ 1 - 0
3rdparty/glslang/glslang/Include/intermediate.h

@@ -729,6 +729,7 @@ enum TOperator {
     EOpConstructF16Mat4x4,
     EOpConstructStruct,
     EOpConstructTextureSampler,
+    EOpConstructNonuniform,     // expected to be transformed away, not present in final AST
     EOpConstructGuardEnd,
 
     //

+ 1 - 1
3rdparty/glslang/glslang/Include/revision.h

@@ -1,3 +1,3 @@
 // This header is generated by the make-revision script.
 
-#define GLSLANG_PATCH_LEVEL 2637
+#define GLSLANG_PATCH_LEVEL 2676

+ 70 - 0
3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp

@@ -158,6 +158,11 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
     if (specConstantPropagates(*node->getLeft(), *node->getRight()) && isSpecializationOperation(*node))
         node->getWritableType().getQualifier().makeSpecConstant();
 
+    // If must propagate nonuniform, make a nonuniform.
+    if ((node->getLeft()->getQualifier().nonUniform || node->getRight()->getQualifier().nonUniform) &&
+            isNonuniformPropagating(node->getOp()))
+        node->getWritableType().getQualifier().nonUniform = true;
+
     return node;
 }
 
@@ -366,6 +371,10 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo
     if (node->getOperand()->getType().getQualifier().isSpecConstant() && isSpecializationOperation(*node))
         node->getWritableType().getQualifier().makeSpecConstant();
 
+    // If must propagate nonuniform, make a nonuniform.
+    if (node->getOperand()->getQualifier().nonUniform && isNonuniformPropagating(node->getOp()))
+        node->getWritableType().getQualifier().nonUniform = true;
+
     return node;
 }
 
@@ -1748,6 +1757,9 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
 {
     TOperator op = EOpNull;
 
+    if (type.getQualifier().nonUniform)
+        return EOpConstructNonuniform;
+
     switch (type.getBasicType()) {
     case EbtStruct:
         op = EOpConstructStruct;
@@ -2800,6 +2812,64 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const
     }
 }
 
+// Is the operation one that must propagate nonuniform?
+bool TIntermediate::isNonuniformPropagating(TOperator op) const
+{
+    // "* All Operators in Section 5.1 (Operators), except for assignment,
+    //    arithmetic assignment, and sequence
+    //  * Component selection in Section 5.5
+    //  * Matrix components in Section 5.6
+    //  * Structure and Array Operations in Section 5.7, except for the length
+    //    method."
+    switch (op) {
+    case EOpPostIncrement:
+    case EOpPostDecrement:
+    case EOpPreIncrement:
+    case EOpPreDecrement:
+
+    case EOpNegative:
+    case EOpLogicalNot:
+    case EOpVectorLogicalNot:
+    case EOpBitwiseNot:
+
+    case EOpAdd:
+    case EOpSub:
+    case EOpMul:
+    case EOpDiv:
+    case EOpMod:
+    case EOpRightShift:
+    case EOpLeftShift:
+    case EOpAnd:
+    case EOpInclusiveOr:
+    case EOpExclusiveOr:
+    case EOpEqual:
+    case EOpNotEqual:
+    case EOpLessThan:
+    case EOpGreaterThan:
+    case EOpLessThanEqual:
+    case EOpGreaterThanEqual:
+    case EOpVectorTimesScalar:
+    case EOpVectorTimesMatrix:
+    case EOpMatrixTimesVector:
+    case EOpMatrixTimesScalar:
+
+    case EOpLogicalOr:
+    case EOpLogicalXor:
+    case EOpLogicalAnd:
+
+    case EOpIndexDirect:
+    case EOpIndexIndirect:
+    case EOpIndexDirectStruct:
+    case EOpVectorSwizzle:
+        return true;
+
+    default:
+        break;
+    }
+
+    return false;
+}
+
 ////////////////////////////////////////////////////////////////
 //
 // Member functions of the nodes used for building the tree.

+ 76 - 7
3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp

@@ -381,6 +381,8 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
         if (index->getQualifier().isFrontEndConstant()) {
             if (base->getType().isUnsizedArray())
                 base->getWritableType().updateImplicitArraySize(indexValue + 1);
+            else
+                checkIndex(loc, base->getType(), indexValue);
             result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
         } else {
             if (base->getType().isUnsizedArray()) {
@@ -390,8 +392,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
                     error(loc, "", "[", "array must be sized by a redeclaration or layout qualifier before being indexed with a variable");
                 else {
                     // it is okay for a run-time sized array
-                    if (base->getType().getQualifier().storage != EvqBuffer)
-                        error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable");
+                    checkRuntimeSizable(loc, *base);
                 }
                 base->getWritableType().setArrayVariablyIndexed();
             }
@@ -434,6 +435,10 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
         }
         result->setType(newType);
 
+        // Propagate nonuniform
+        if (base->getQualifier().isNonUniform() || index->getQualifier().isNonUniform())
+            result->getWritableType().getQualifier().nonUniform = true;
+
         if (anyIndexLimits)
             handleIndexLimits(loc, base, index);
     }
@@ -742,6 +747,10 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
     if (base->getQualifier().noContraction)
         result->getWritableType().getQualifier().noContraction = true;
 
+    // Propagate nonuniform
+    if (base->getQualifier().isNonUniform())
+        result->getWritableType().getQualifier().nonUniform = true;
+
     return result;
 }
 
@@ -1235,7 +1244,7 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction
                 if (length == 0) {
                     if (intermNode->getAsSymbolNode() && isIoResizeArray(type))
                         error(loc, "", function->getName().c_str(), "array must first be sized by a redeclaration or layout qualifier");
-                    else if (type.getQualifier().isUniformOrBuffer()) {
+                    else if (isRuntimeLength(*intermNode->getAsTyped())) {
                         // Create a unary op and let the back end handle it
                         return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt));
                     } else
@@ -2622,6 +2631,10 @@ void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType)
 {
     globalQualifierFixCheck(publicType.loc, publicType.qualifier);
     checkNoShaderLayouts(publicType.loc, publicType.shaderQualifiers);
+    if (publicType.qualifier.isNonUniform()) {
+        error(publicType.loc, "not allowed on block or structure members", "nonuniformEXT", "");
+        publicType.qualifier.nonUniform = false;
+    }
 }
 
 //
@@ -2629,12 +2642,15 @@ void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType)
 //
 void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier)
 {
+    bool nonuniformOkay = false;
+
     // move from parameter/unknown qualifiers to pipeline in/out qualifiers
     switch (qualifier.storage) {
     case EvqIn:
         profileRequires(loc, ENoProfile, 130, nullptr, "in for stage inputs");
         profileRequires(loc, EEsProfile, 300, nullptr, "in for stage inputs");
         qualifier.storage = EvqVaryingIn;
+        nonuniformOkay = true;
         break;
     case EvqOut:
         profileRequires(loc, ENoProfile, 130, nullptr, "out for stage outputs");
@@ -2645,10 +2661,17 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
         qualifier.storage = EvqVaryingIn;
         error(loc, "cannot use 'inout' at global scope", "", "");
         break;
+    case EvqGlobal:
+    case EvqTemporary:
+        nonuniformOkay = true;
+        break;
     default:
         break;
     }
 
+    if (!nonuniformOkay && qualifier.nonUniform)
+        error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", "");
+
     invariantCheck(loc, qualifier);
 }
 
@@ -2897,6 +2920,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
     MERGE_SINGLETON(readonly);
     MERGE_SINGLETON(writeonly);
     MERGE_SINGLETON(specConstant);
+    MERGE_SINGLETON(nonUniform);
 
     if (repeated)
         error(loc, "replicated qualifiers", "", "");
@@ -3268,6 +3292,39 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie
         checkIoArraysConsistency(loc);
 }
 
+// Policy and error check for needing a runtime sized array.
+void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermTyped& base)
+{
+    // runtime length implies runtime sizeable, so no problem
+    if (isRuntimeLength(base))
+        return;
+
+    // check for additional things allowed by GL_EXT_nonuniform_qualifier
+    if (base.getBasicType() == EbtSampler ||
+            (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
+        requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
+    else
+        error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable");
+}
+
+// Policy decision for whether a run-time .length() is allowed.
+bool TParseContext::isRuntimeLength(const TIntermTyped& base) const
+{
+    if (base.getType().getQualifier().storage == EvqBuffer) {
+        // in a buffer block
+        const TIntermBinary* binary = base.getAsBinaryNode();
+        if (binary != nullptr && binary->getOp() == EOpIndexDirectStruct) {
+            // is it the last member?
+            const int index = binary->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
+            const int memberCount = (int)binary->getLeft()->getType().getStruct()->size();
+            if (index == memberCount - 1)
+                return true;
+        }
+    }
+
+    return false;
+}
+
 // Returns true if the first argument to the #line directive is the line number for the next line.
 //
 // Desktop, pre-version 3.30:  "After processing this directive
@@ -3678,6 +3735,8 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali
         else
             warn(loc, "qualifier has no effect on non-output parameters", "precise", "");
     }
+    if (qualifier.isNonUniform())
+        type.getQualifier().nonUniform = qualifier.nonUniform;
 
     paramCheckFixStorage(loc, qualifier.storage, type);
 }
@@ -4655,11 +4714,16 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
         if (type.getBasicType() == EbtSampler) {
             int lastBinding = qualifier.layoutBinding;
             if (type.isArray()) {
-                if (type.isSizedArray())
-                    lastBinding += type.getCumulativeArraySize();
-                else {
+                if (spvVersion.vulkan > 0)
                     lastBinding += 1;
-                    warn(loc, "assuming array size of one for compile-time checking of binding numbers for unsized array", "[]", "");
+                else {
+                    if (type.isSizedArray())
+                        lastBinding += type.getCumulativeArraySize();
+                    else {
+                        lastBinding += 1;
+                        if (spvVersion.vulkan == 0)
+                            warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", "");
+                    }
                 }
             }
             if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits)
@@ -5827,6 +5891,11 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
         basicOp = EOpConstructBool;
         break;
 
+    case EOpConstructNonuniform:
+        node->getWritableType().getQualifier().nonUniform = true;
+        return node;
+        break;
+
     default:
         error(loc, "unsupported construction", "", "");
 

+ 2 - 0
3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h

@@ -427,6 +427,8 @@ protected:
     TVariable* makeInternalVariable(const char* name, const TType&) const;
     TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&);
     void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&);
+    void checkRuntimeSizable(const TSourceLoc&, const TIntermTyped&);
+    bool isRuntimeLength(const TIntermTyped&) const;
     TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable);
     TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer);
     void finish() override;

+ 7 - 0
3rdparty/glslang/glslang/MachineIndependent/Scan.cpp

@@ -341,6 +341,7 @@ void TScanContext::fillInKeywordMap()
 
     (*KeywordMap)["const"] =                   CONST;
     (*KeywordMap)["uniform"] =                 UNIFORM;
+    (*KeywordMap)["nonuniformEXT"] =           NONUNIFORM;
     (*KeywordMap)["in"] =                      IN;
     (*KeywordMap)["out"] =                     OUT;
     (*KeywordMap)["inout"] =                   INOUT;
@@ -873,6 +874,12 @@ int TScanContext::tokenizeIdentifier()
     case CASE:
         return keyword;
 
+    case NONUNIFORM:
+        if (parseContext.extensionTurnedOn(E_GL_EXT_nonuniform_qualifier))
+            return keyword;
+        else
+            return identifierOrType();
+
     case SWITCH:
     case DEFAULT:
         if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||

+ 2 - 0
3rdparty/glslang/glslang/MachineIndependent/Versions.cpp

@@ -199,6 +199,7 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_EXT_shader_image_load_formatted]             = EBhDisable;
     extensionBehavior[E_GL_EXT_post_depth_coverage]                     = EBhDisable;
     extensionBehavior[E_GL_EXT_control_flow_attributes]                 = EBhDisable;
+    extensionBehavior[E_GL_EXT_nonuniform_qualifier]                    = EBhDisable;
 
     // #line and #include
     extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive]          = EBhDisable;
@@ -360,6 +361,7 @@ void TParseVersions::getPreamble(std::string& preamble)
             "#define GL_EXT_shader_image_load_formatted 1\n"
             "#define GL_EXT_post_depth_coverage 1\n"
             "#define GL_EXT_control_flow_attributes 1\n"
+            "#define GL_EXT_nonuniform_qualifier 1\n"
 
             // GL_KHR_shader_subgroup
             "#define GL_KHR_shader_subgroup_basic 1\n"

+ 1 - 0
3rdparty/glslang/glslang/MachineIndependent/Versions.h

@@ -157,6 +157,7 @@ const char* const E_GL_EXT_device_group                 = "GL_EXT_device_group";
 const char* const E_GL_EXT_multiview                    = "GL_EXT_multiview";
 const char* const E_GL_EXT_post_depth_coverage          = "GL_EXT_post_depth_coverage";
 const char* const E_GL_EXT_control_flow_attributes      = "GL_EXT_control_flow_attributes";
+const char* const E_GL_EXT_nonuniform_qualifier         = "GL_EXT_nonuniform_qualifier";
 
 // Arrays of extensions for the above viewportEXTs duplications
 

+ 17 - 1
3rdparty/glslang/glslang/MachineIndependent/glslang.y

@@ -140,7 +140,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
 %token <lex> U8VEC2  U8VEC3  U8VEC4
 %token <lex> VEC2 VEC3 VEC4
 %token <lex> MAT2 MAT3 MAT4 CENTROID IN OUT INOUT
-%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED
+%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED NONUNIFORM
 %token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY
 %token <lex> DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4
 %token <lex> F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4
@@ -268,6 +268,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
 %type <interm> array_specifier
 %type <interm.type> precise_qualifier invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier
 %type <interm.type> layout_qualifier layout_qualifier_id_list layout_qualifier_id
+%type <interm.type> non_uniform_qualifier
 
 %type <interm.type> type_qualifier fully_specified_type type_specifier
 %type <interm.type> single_type_qualifier
@@ -473,6 +474,11 @@ function_identifier
             $$.function = new TFunction(&empty, TType(EbtVoid), EOpNull);
         }
     }
+    | non_uniform_qualifier {
+        // Constructor
+        $$.intermNode = 0;
+        $$.function = parseContext.handleConstructorCall($1.loc, $1);
+    }
     ;
 
 unary_expression
@@ -1217,6 +1223,9 @@ single_type_qualifier
         // allow inheritance of storage qualifier from block declaration
         $$ = $1;
     }
+    | non_uniform_qualifier {
+        $$ = $1;
+    }
     ;
 
 storage_qualifier
@@ -1337,6 +1346,13 @@ storage_qualifier
     }
     ;
 
+non_uniform_qualifier
+    : NONUNIFORM {
+        $$.init($1.loc);
+        $$.qualifier.nonUniform = true;
+    }
+    ;
+
 type_name_list
     : IDENTIFIER {
         // TODO

Різницю між файлами не показано, бо вона завелика
+ 486 - 483
3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp


+ 310 - 309
3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h

@@ -124,314 +124,315 @@ extern int yydebug;
     SAMPLE = 334,
     BUFFER = 335,
     SHARED = 336,
-    COHERENT = 337,
-    VOLATILE = 338,
-    RESTRICT = 339,
-    READONLY = 340,
-    WRITEONLY = 341,
-    DVEC2 = 342,
-    DVEC3 = 343,
-    DVEC4 = 344,
-    DMAT2 = 345,
-    DMAT3 = 346,
-    DMAT4 = 347,
-    F16VEC2 = 348,
-    F16VEC3 = 349,
-    F16VEC4 = 350,
-    F16MAT2 = 351,
-    F16MAT3 = 352,
-    F16MAT4 = 353,
-    F32VEC2 = 354,
-    F32VEC3 = 355,
-    F32VEC4 = 356,
-    F32MAT2 = 357,
-    F32MAT3 = 358,
-    F32MAT4 = 359,
-    F64VEC2 = 360,
-    F64VEC3 = 361,
-    F64VEC4 = 362,
-    F64MAT2 = 363,
-    F64MAT3 = 364,
-    F64MAT4 = 365,
-    NOPERSPECTIVE = 366,
-    FLAT = 367,
-    SMOOTH = 368,
-    LAYOUT = 369,
-    __EXPLICITINTERPAMD = 370,
-    MAT2X2 = 371,
-    MAT2X3 = 372,
-    MAT2X4 = 373,
-    MAT3X2 = 374,
-    MAT3X3 = 375,
-    MAT3X4 = 376,
-    MAT4X2 = 377,
-    MAT4X3 = 378,
-    MAT4X4 = 379,
-    DMAT2X2 = 380,
-    DMAT2X3 = 381,
-    DMAT2X4 = 382,
-    DMAT3X2 = 383,
-    DMAT3X3 = 384,
-    DMAT3X4 = 385,
-    DMAT4X2 = 386,
-    DMAT4X3 = 387,
-    DMAT4X4 = 388,
-    F16MAT2X2 = 389,
-    F16MAT2X3 = 390,
-    F16MAT2X4 = 391,
-    F16MAT3X2 = 392,
-    F16MAT3X3 = 393,
-    F16MAT3X4 = 394,
-    F16MAT4X2 = 395,
-    F16MAT4X3 = 396,
-    F16MAT4X4 = 397,
-    F32MAT2X2 = 398,
-    F32MAT2X3 = 399,
-    F32MAT2X4 = 400,
-    F32MAT3X2 = 401,
-    F32MAT3X3 = 402,
-    F32MAT3X4 = 403,
-    F32MAT4X2 = 404,
-    F32MAT4X3 = 405,
-    F32MAT4X4 = 406,
-    F64MAT2X2 = 407,
-    F64MAT2X3 = 408,
-    F64MAT2X4 = 409,
-    F64MAT3X2 = 410,
-    F64MAT3X3 = 411,
-    F64MAT3X4 = 412,
-    F64MAT4X2 = 413,
-    F64MAT4X3 = 414,
-    F64MAT4X4 = 415,
-    ATOMIC_UINT = 416,
-    SAMPLER1D = 417,
-    SAMPLER2D = 418,
-    SAMPLER3D = 419,
-    SAMPLERCUBE = 420,
-    SAMPLER1DSHADOW = 421,
-    SAMPLER2DSHADOW = 422,
-    SAMPLERCUBESHADOW = 423,
-    SAMPLER1DARRAY = 424,
-    SAMPLER2DARRAY = 425,
-    SAMPLER1DARRAYSHADOW = 426,
-    SAMPLER2DARRAYSHADOW = 427,
-    ISAMPLER1D = 428,
-    ISAMPLER2D = 429,
-    ISAMPLER3D = 430,
-    ISAMPLERCUBE = 431,
-    ISAMPLER1DARRAY = 432,
-    ISAMPLER2DARRAY = 433,
-    USAMPLER1D = 434,
-    USAMPLER2D = 435,
-    USAMPLER3D = 436,
-    USAMPLERCUBE = 437,
-    USAMPLER1DARRAY = 438,
-    USAMPLER2DARRAY = 439,
-    SAMPLER2DRECT = 440,
-    SAMPLER2DRECTSHADOW = 441,
-    ISAMPLER2DRECT = 442,
-    USAMPLER2DRECT = 443,
-    SAMPLERBUFFER = 444,
-    ISAMPLERBUFFER = 445,
-    USAMPLERBUFFER = 446,
-    SAMPLERCUBEARRAY = 447,
-    SAMPLERCUBEARRAYSHADOW = 448,
-    ISAMPLERCUBEARRAY = 449,
-    USAMPLERCUBEARRAY = 450,
-    SAMPLER2DMS = 451,
-    ISAMPLER2DMS = 452,
-    USAMPLER2DMS = 453,
-    SAMPLER2DMSARRAY = 454,
-    ISAMPLER2DMSARRAY = 455,
-    USAMPLER2DMSARRAY = 456,
-    SAMPLEREXTERNALOES = 457,
-    F16SAMPLER1D = 458,
-    F16SAMPLER2D = 459,
-    F16SAMPLER3D = 460,
-    F16SAMPLER2DRECT = 461,
-    F16SAMPLERCUBE = 462,
-    F16SAMPLER1DARRAY = 463,
-    F16SAMPLER2DARRAY = 464,
-    F16SAMPLERCUBEARRAY = 465,
-    F16SAMPLERBUFFER = 466,
-    F16SAMPLER2DMS = 467,
-    F16SAMPLER2DMSARRAY = 468,
-    F16SAMPLER1DSHADOW = 469,
-    F16SAMPLER2DSHADOW = 470,
-    F16SAMPLER1DARRAYSHADOW = 471,
-    F16SAMPLER2DARRAYSHADOW = 472,
-    F16SAMPLER2DRECTSHADOW = 473,
-    F16SAMPLERCUBESHADOW = 474,
-    F16SAMPLERCUBEARRAYSHADOW = 475,
-    SAMPLER = 476,
-    SAMPLERSHADOW = 477,
-    TEXTURE1D = 478,
-    TEXTURE2D = 479,
-    TEXTURE3D = 480,
-    TEXTURECUBE = 481,
-    TEXTURE1DARRAY = 482,
-    TEXTURE2DARRAY = 483,
-    ITEXTURE1D = 484,
-    ITEXTURE2D = 485,
-    ITEXTURE3D = 486,
-    ITEXTURECUBE = 487,
-    ITEXTURE1DARRAY = 488,
-    ITEXTURE2DARRAY = 489,
-    UTEXTURE1D = 490,
-    UTEXTURE2D = 491,
-    UTEXTURE3D = 492,
-    UTEXTURECUBE = 493,
-    UTEXTURE1DARRAY = 494,
-    UTEXTURE2DARRAY = 495,
-    TEXTURE2DRECT = 496,
-    ITEXTURE2DRECT = 497,
-    UTEXTURE2DRECT = 498,
-    TEXTUREBUFFER = 499,
-    ITEXTUREBUFFER = 500,
-    UTEXTUREBUFFER = 501,
-    TEXTURECUBEARRAY = 502,
-    ITEXTURECUBEARRAY = 503,
-    UTEXTURECUBEARRAY = 504,
-    TEXTURE2DMS = 505,
-    ITEXTURE2DMS = 506,
-    UTEXTURE2DMS = 507,
-    TEXTURE2DMSARRAY = 508,
-    ITEXTURE2DMSARRAY = 509,
-    UTEXTURE2DMSARRAY = 510,
-    F16TEXTURE1D = 511,
-    F16TEXTURE2D = 512,
-    F16TEXTURE3D = 513,
-    F16TEXTURE2DRECT = 514,
-    F16TEXTURECUBE = 515,
-    F16TEXTURE1DARRAY = 516,
-    F16TEXTURE2DARRAY = 517,
-    F16TEXTURECUBEARRAY = 518,
-    F16TEXTUREBUFFER = 519,
-    F16TEXTURE2DMS = 520,
-    F16TEXTURE2DMSARRAY = 521,
-    SUBPASSINPUT = 522,
-    SUBPASSINPUTMS = 523,
-    ISUBPASSINPUT = 524,
-    ISUBPASSINPUTMS = 525,
-    USUBPASSINPUT = 526,
-    USUBPASSINPUTMS = 527,
-    F16SUBPASSINPUT = 528,
-    F16SUBPASSINPUTMS = 529,
-    IMAGE1D = 530,
-    IIMAGE1D = 531,
-    UIMAGE1D = 532,
-    IMAGE2D = 533,
-    IIMAGE2D = 534,
-    UIMAGE2D = 535,
-    IMAGE3D = 536,
-    IIMAGE3D = 537,
-    UIMAGE3D = 538,
-    IMAGE2DRECT = 539,
-    IIMAGE2DRECT = 540,
-    UIMAGE2DRECT = 541,
-    IMAGECUBE = 542,
-    IIMAGECUBE = 543,
-    UIMAGECUBE = 544,
-    IMAGEBUFFER = 545,
-    IIMAGEBUFFER = 546,
-    UIMAGEBUFFER = 547,
-    IMAGE1DARRAY = 548,
-    IIMAGE1DARRAY = 549,
-    UIMAGE1DARRAY = 550,
-    IMAGE2DARRAY = 551,
-    IIMAGE2DARRAY = 552,
-    UIMAGE2DARRAY = 553,
-    IMAGECUBEARRAY = 554,
-    IIMAGECUBEARRAY = 555,
-    UIMAGECUBEARRAY = 556,
-    IMAGE2DMS = 557,
-    IIMAGE2DMS = 558,
-    UIMAGE2DMS = 559,
-    IMAGE2DMSARRAY = 560,
-    IIMAGE2DMSARRAY = 561,
-    UIMAGE2DMSARRAY = 562,
-    F16IMAGE1D = 563,
-    F16IMAGE2D = 564,
-    F16IMAGE3D = 565,
-    F16IMAGE2DRECT = 566,
-    F16IMAGECUBE = 567,
-    F16IMAGE1DARRAY = 568,
-    F16IMAGE2DARRAY = 569,
-    F16IMAGECUBEARRAY = 570,
-    F16IMAGEBUFFER = 571,
-    F16IMAGE2DMS = 572,
-    F16IMAGE2DMSARRAY = 573,
-    STRUCT = 574,
-    VOID = 575,
-    WHILE = 576,
-    IDENTIFIER = 577,
-    TYPE_NAME = 578,
-    FLOATCONSTANT = 579,
-    DOUBLECONSTANT = 580,
-    INT16CONSTANT = 581,
-    UINT16CONSTANT = 582,
-    INT32CONSTANT = 583,
-    UINT32CONSTANT = 584,
-    INTCONSTANT = 585,
-    UINTCONSTANT = 586,
-    INT64CONSTANT = 587,
-    UINT64CONSTANT = 588,
-    BOOLCONSTANT = 589,
-    FLOAT16CONSTANT = 590,
-    LEFT_OP = 591,
-    RIGHT_OP = 592,
-    INC_OP = 593,
-    DEC_OP = 594,
-    LE_OP = 595,
-    GE_OP = 596,
-    EQ_OP = 597,
-    NE_OP = 598,
-    AND_OP = 599,
-    OR_OP = 600,
-    XOR_OP = 601,
-    MUL_ASSIGN = 602,
-    DIV_ASSIGN = 603,
-    ADD_ASSIGN = 604,
-    MOD_ASSIGN = 605,
-    LEFT_ASSIGN = 606,
-    RIGHT_ASSIGN = 607,
-    AND_ASSIGN = 608,
-    XOR_ASSIGN = 609,
-    OR_ASSIGN = 610,
-    SUB_ASSIGN = 611,
-    LEFT_PAREN = 612,
-    RIGHT_PAREN = 613,
-    LEFT_BRACKET = 614,
-    RIGHT_BRACKET = 615,
-    LEFT_BRACE = 616,
-    RIGHT_BRACE = 617,
-    DOT = 618,
-    COMMA = 619,
-    COLON = 620,
-    EQUAL = 621,
-    SEMICOLON = 622,
-    BANG = 623,
-    DASH = 624,
-    TILDE = 625,
-    PLUS = 626,
-    STAR = 627,
-    SLASH = 628,
-    PERCENT = 629,
-    LEFT_ANGLE = 630,
-    RIGHT_ANGLE = 631,
-    VERTICAL_BAR = 632,
-    CARET = 633,
-    AMPERSAND = 634,
-    QUESTION = 635,
-    INVARIANT = 636,
-    PRECISE = 637,
-    HIGH_PRECISION = 638,
-    MEDIUM_PRECISION = 639,
-    LOW_PRECISION = 640,
-    PRECISION = 641,
-    PACKED = 642,
-    RESOURCE = 643,
-    SUPERP = 644
+    NONUNIFORM = 337,
+    COHERENT = 338,
+    VOLATILE = 339,
+    RESTRICT = 340,
+    READONLY = 341,
+    WRITEONLY = 342,
+    DVEC2 = 343,
+    DVEC3 = 344,
+    DVEC4 = 345,
+    DMAT2 = 346,
+    DMAT3 = 347,
+    DMAT4 = 348,
+    F16VEC2 = 349,
+    F16VEC3 = 350,
+    F16VEC4 = 351,
+    F16MAT2 = 352,
+    F16MAT3 = 353,
+    F16MAT4 = 354,
+    F32VEC2 = 355,
+    F32VEC3 = 356,
+    F32VEC4 = 357,
+    F32MAT2 = 358,
+    F32MAT3 = 359,
+    F32MAT4 = 360,
+    F64VEC2 = 361,
+    F64VEC3 = 362,
+    F64VEC4 = 363,
+    F64MAT2 = 364,
+    F64MAT3 = 365,
+    F64MAT4 = 366,
+    NOPERSPECTIVE = 367,
+    FLAT = 368,
+    SMOOTH = 369,
+    LAYOUT = 370,
+    __EXPLICITINTERPAMD = 371,
+    MAT2X2 = 372,
+    MAT2X3 = 373,
+    MAT2X4 = 374,
+    MAT3X2 = 375,
+    MAT3X3 = 376,
+    MAT3X4 = 377,
+    MAT4X2 = 378,
+    MAT4X3 = 379,
+    MAT4X4 = 380,
+    DMAT2X2 = 381,
+    DMAT2X3 = 382,
+    DMAT2X4 = 383,
+    DMAT3X2 = 384,
+    DMAT3X3 = 385,
+    DMAT3X4 = 386,
+    DMAT4X2 = 387,
+    DMAT4X3 = 388,
+    DMAT4X4 = 389,
+    F16MAT2X2 = 390,
+    F16MAT2X3 = 391,
+    F16MAT2X4 = 392,
+    F16MAT3X2 = 393,
+    F16MAT3X3 = 394,
+    F16MAT3X4 = 395,
+    F16MAT4X2 = 396,
+    F16MAT4X3 = 397,
+    F16MAT4X4 = 398,
+    F32MAT2X2 = 399,
+    F32MAT2X3 = 400,
+    F32MAT2X4 = 401,
+    F32MAT3X2 = 402,
+    F32MAT3X3 = 403,
+    F32MAT3X4 = 404,
+    F32MAT4X2 = 405,
+    F32MAT4X3 = 406,
+    F32MAT4X4 = 407,
+    F64MAT2X2 = 408,
+    F64MAT2X3 = 409,
+    F64MAT2X4 = 410,
+    F64MAT3X2 = 411,
+    F64MAT3X3 = 412,
+    F64MAT3X4 = 413,
+    F64MAT4X2 = 414,
+    F64MAT4X3 = 415,
+    F64MAT4X4 = 416,
+    ATOMIC_UINT = 417,
+    SAMPLER1D = 418,
+    SAMPLER2D = 419,
+    SAMPLER3D = 420,
+    SAMPLERCUBE = 421,
+    SAMPLER1DSHADOW = 422,
+    SAMPLER2DSHADOW = 423,
+    SAMPLERCUBESHADOW = 424,
+    SAMPLER1DARRAY = 425,
+    SAMPLER2DARRAY = 426,
+    SAMPLER1DARRAYSHADOW = 427,
+    SAMPLER2DARRAYSHADOW = 428,
+    ISAMPLER1D = 429,
+    ISAMPLER2D = 430,
+    ISAMPLER3D = 431,
+    ISAMPLERCUBE = 432,
+    ISAMPLER1DARRAY = 433,
+    ISAMPLER2DARRAY = 434,
+    USAMPLER1D = 435,
+    USAMPLER2D = 436,
+    USAMPLER3D = 437,
+    USAMPLERCUBE = 438,
+    USAMPLER1DARRAY = 439,
+    USAMPLER2DARRAY = 440,
+    SAMPLER2DRECT = 441,
+    SAMPLER2DRECTSHADOW = 442,
+    ISAMPLER2DRECT = 443,
+    USAMPLER2DRECT = 444,
+    SAMPLERBUFFER = 445,
+    ISAMPLERBUFFER = 446,
+    USAMPLERBUFFER = 447,
+    SAMPLERCUBEARRAY = 448,
+    SAMPLERCUBEARRAYSHADOW = 449,
+    ISAMPLERCUBEARRAY = 450,
+    USAMPLERCUBEARRAY = 451,
+    SAMPLER2DMS = 452,
+    ISAMPLER2DMS = 453,
+    USAMPLER2DMS = 454,
+    SAMPLER2DMSARRAY = 455,
+    ISAMPLER2DMSARRAY = 456,
+    USAMPLER2DMSARRAY = 457,
+    SAMPLEREXTERNALOES = 458,
+    F16SAMPLER1D = 459,
+    F16SAMPLER2D = 460,
+    F16SAMPLER3D = 461,
+    F16SAMPLER2DRECT = 462,
+    F16SAMPLERCUBE = 463,
+    F16SAMPLER1DARRAY = 464,
+    F16SAMPLER2DARRAY = 465,
+    F16SAMPLERCUBEARRAY = 466,
+    F16SAMPLERBUFFER = 467,
+    F16SAMPLER2DMS = 468,
+    F16SAMPLER2DMSARRAY = 469,
+    F16SAMPLER1DSHADOW = 470,
+    F16SAMPLER2DSHADOW = 471,
+    F16SAMPLER1DARRAYSHADOW = 472,
+    F16SAMPLER2DARRAYSHADOW = 473,
+    F16SAMPLER2DRECTSHADOW = 474,
+    F16SAMPLERCUBESHADOW = 475,
+    F16SAMPLERCUBEARRAYSHADOW = 476,
+    SAMPLER = 477,
+    SAMPLERSHADOW = 478,
+    TEXTURE1D = 479,
+    TEXTURE2D = 480,
+    TEXTURE3D = 481,
+    TEXTURECUBE = 482,
+    TEXTURE1DARRAY = 483,
+    TEXTURE2DARRAY = 484,
+    ITEXTURE1D = 485,
+    ITEXTURE2D = 486,
+    ITEXTURE3D = 487,
+    ITEXTURECUBE = 488,
+    ITEXTURE1DARRAY = 489,
+    ITEXTURE2DARRAY = 490,
+    UTEXTURE1D = 491,
+    UTEXTURE2D = 492,
+    UTEXTURE3D = 493,
+    UTEXTURECUBE = 494,
+    UTEXTURE1DARRAY = 495,
+    UTEXTURE2DARRAY = 496,
+    TEXTURE2DRECT = 497,
+    ITEXTURE2DRECT = 498,
+    UTEXTURE2DRECT = 499,
+    TEXTUREBUFFER = 500,
+    ITEXTUREBUFFER = 501,
+    UTEXTUREBUFFER = 502,
+    TEXTURECUBEARRAY = 503,
+    ITEXTURECUBEARRAY = 504,
+    UTEXTURECUBEARRAY = 505,
+    TEXTURE2DMS = 506,
+    ITEXTURE2DMS = 507,
+    UTEXTURE2DMS = 508,
+    TEXTURE2DMSARRAY = 509,
+    ITEXTURE2DMSARRAY = 510,
+    UTEXTURE2DMSARRAY = 511,
+    F16TEXTURE1D = 512,
+    F16TEXTURE2D = 513,
+    F16TEXTURE3D = 514,
+    F16TEXTURE2DRECT = 515,
+    F16TEXTURECUBE = 516,
+    F16TEXTURE1DARRAY = 517,
+    F16TEXTURE2DARRAY = 518,
+    F16TEXTURECUBEARRAY = 519,
+    F16TEXTUREBUFFER = 520,
+    F16TEXTURE2DMS = 521,
+    F16TEXTURE2DMSARRAY = 522,
+    SUBPASSINPUT = 523,
+    SUBPASSINPUTMS = 524,
+    ISUBPASSINPUT = 525,
+    ISUBPASSINPUTMS = 526,
+    USUBPASSINPUT = 527,
+    USUBPASSINPUTMS = 528,
+    F16SUBPASSINPUT = 529,
+    F16SUBPASSINPUTMS = 530,
+    IMAGE1D = 531,
+    IIMAGE1D = 532,
+    UIMAGE1D = 533,
+    IMAGE2D = 534,
+    IIMAGE2D = 535,
+    UIMAGE2D = 536,
+    IMAGE3D = 537,
+    IIMAGE3D = 538,
+    UIMAGE3D = 539,
+    IMAGE2DRECT = 540,
+    IIMAGE2DRECT = 541,
+    UIMAGE2DRECT = 542,
+    IMAGECUBE = 543,
+    IIMAGECUBE = 544,
+    UIMAGECUBE = 545,
+    IMAGEBUFFER = 546,
+    IIMAGEBUFFER = 547,
+    UIMAGEBUFFER = 548,
+    IMAGE1DARRAY = 549,
+    IIMAGE1DARRAY = 550,
+    UIMAGE1DARRAY = 551,
+    IMAGE2DARRAY = 552,
+    IIMAGE2DARRAY = 553,
+    UIMAGE2DARRAY = 554,
+    IMAGECUBEARRAY = 555,
+    IIMAGECUBEARRAY = 556,
+    UIMAGECUBEARRAY = 557,
+    IMAGE2DMS = 558,
+    IIMAGE2DMS = 559,
+    UIMAGE2DMS = 560,
+    IMAGE2DMSARRAY = 561,
+    IIMAGE2DMSARRAY = 562,
+    UIMAGE2DMSARRAY = 563,
+    F16IMAGE1D = 564,
+    F16IMAGE2D = 565,
+    F16IMAGE3D = 566,
+    F16IMAGE2DRECT = 567,
+    F16IMAGECUBE = 568,
+    F16IMAGE1DARRAY = 569,
+    F16IMAGE2DARRAY = 570,
+    F16IMAGECUBEARRAY = 571,
+    F16IMAGEBUFFER = 572,
+    F16IMAGE2DMS = 573,
+    F16IMAGE2DMSARRAY = 574,
+    STRUCT = 575,
+    VOID = 576,
+    WHILE = 577,
+    IDENTIFIER = 578,
+    TYPE_NAME = 579,
+    FLOATCONSTANT = 580,
+    DOUBLECONSTANT = 581,
+    INT16CONSTANT = 582,
+    UINT16CONSTANT = 583,
+    INT32CONSTANT = 584,
+    UINT32CONSTANT = 585,
+    INTCONSTANT = 586,
+    UINTCONSTANT = 587,
+    INT64CONSTANT = 588,
+    UINT64CONSTANT = 589,
+    BOOLCONSTANT = 590,
+    FLOAT16CONSTANT = 591,
+    LEFT_OP = 592,
+    RIGHT_OP = 593,
+    INC_OP = 594,
+    DEC_OP = 595,
+    LE_OP = 596,
+    GE_OP = 597,
+    EQ_OP = 598,
+    NE_OP = 599,
+    AND_OP = 600,
+    OR_OP = 601,
+    XOR_OP = 602,
+    MUL_ASSIGN = 603,
+    DIV_ASSIGN = 604,
+    ADD_ASSIGN = 605,
+    MOD_ASSIGN = 606,
+    LEFT_ASSIGN = 607,
+    RIGHT_ASSIGN = 608,
+    AND_ASSIGN = 609,
+    XOR_ASSIGN = 610,
+    OR_ASSIGN = 611,
+    SUB_ASSIGN = 612,
+    LEFT_PAREN = 613,
+    RIGHT_PAREN = 614,
+    LEFT_BRACKET = 615,
+    RIGHT_BRACKET = 616,
+    LEFT_BRACE = 617,
+    RIGHT_BRACE = 618,
+    DOT = 619,
+    COMMA = 620,
+    COLON = 621,
+    EQUAL = 622,
+    SEMICOLON = 623,
+    BANG = 624,
+    DASH = 625,
+    TILDE = 626,
+    PLUS = 627,
+    STAR = 628,
+    SLASH = 629,
+    PERCENT = 630,
+    LEFT_ANGLE = 631,
+    RIGHT_ANGLE = 632,
+    VERTICAL_BAR = 633,
+    CARET = 634,
+    AMPERSAND = 635,
+    QUESTION = 636,
+    INVARIANT = 637,
+    PRECISE = 638,
+    HIGH_PRECISION = 639,
+    MEDIUM_PRECISION = 640,
+    LOW_PRECISION = 641,
+    PRECISION = 642,
+    PACKED = 643,
+    RESOURCE = 644,
+    SUPERP = 645
   };
 #endif
 
@@ -475,7 +476,7 @@ union YYSTYPE
         };
     } interm;
 
-#line 479 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909  */
+#line 480 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909  */
 };
 # define YYSTYPE_IS_TRIVIAL 1
 # define YYSTYPE_IS_DECLARED 1

+ 14 - 8
3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp

@@ -268,12 +268,13 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
 // Recursively merge the implicit array sizes through the objects' respective type trees.
 void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
 {
-    if (type.isUnsizedArray() && unitType.isArray()) {
-        int newImplicitArraySize = unitType.isSizedArray() ? unitType.getOuterArraySize() : 
-                                                             unitType.getImplicitArraySize();
-        type.updateImplicitArraySize(type.getImplicitArraySize());
-        if (unitType.isArrayVariablyIndexed())
-            type.setArrayVariablyIndexed();
+    if (type.isUnsizedArray()) {
+        if (unitType.isUnsizedArray()) {
+            type.updateImplicitArraySize(unitType.getImplicitArraySize());
+            if (unitType.isArrayVariablyIndexed())
+                type.setArrayVariablyIndexed();
+        } else if (unitType.isSizedArray())
+            type.changeOuterArraySize(unitType.getOuterArraySize());
     }
 
     // Type mismatches are caught and reported after this, just be careful for now.
@@ -296,8 +297,13 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
 
     // Types have to match
     if (symbol.getType() != unitSymbol.getType()) {
-        error(infoSink, "Types must match:");
-        writeTypeComparison = true;
+        // but, we make an exception if one is an implicit array and the other is sized
+        if (! (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
+                symbol.getType().sameElementType(unitSymbol.getType()) &&
+                (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()))) {
+            error(infoSink, "Types must match:");
+            writeTypeComparison = true;
+        }
     }
 
     // Qualifiers have to (almost) match

+ 2 - 1
3rdparty/glslang/glslang/MachineIndependent/localintermediate.h

@@ -619,7 +619,7 @@ public:
         return semanticNameSet.insert(name).first->c_str();
     }
 
-    void setSourceFile(const char* file) { sourceFile = file; }
+    void setSourceFile(const char* file) { if (file != nullptr) sourceFile = file; }
     const std::string& getSourceFile() const { return sourceFile; }
     void addSourceText(const char* text) { sourceText = sourceText + text; }
     const std::string& getSourceText() const { return sourceText; }
@@ -651,6 +651,7 @@ protected:
     TIntermSequence& findLinkerObjects() const;
     bool userOutputUsed() const;
     bool isSpecializationOperation(const TIntermOperator&) const;
+    bool isNonuniformPropagating(TOperator) const;
     bool promoteUnary(TIntermUnary&);
     bool promoteBinary(TIntermBinary&);
     void addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTable&, const TString&);

+ 1 - 1
3rdparty/glslang/glslang/Public/ShaderLang.h

@@ -70,7 +70,7 @@
 // This should always increase, as some paths to do not consume
 // a more major number.
 // It should increment by one when new functionality is added.
-#define GLSLANG_MINOR_VERSION 5
+#define GLSLANG_MINOR_VERSION 6
 
 //
 // Call before doing any other compiler/linker operations.

+ 3 - 0
3rdparty/glslang/gtests/AST.FromFile.cpp

@@ -121,6 +121,7 @@ INSTANTIATE_TEST_CASE_P(
         "310.tese",
         "310implicitSizeArrayError.vert",
         "310AofA.vert",
+        "310runtimeArray.vert",
         "320.comp",
         "320.vert",
         "320.geom",
@@ -200,10 +201,12 @@ INSTANTIATE_TEST_CASE_P(
         "matrix.frag",
         "matrix2.frag",
         "mixedArrayDecls.frag",
+        "nonuniform.frag",
         "newTexture.frag",
         "Operations.frag",
         "overlongLiteral.frag",
         "prepost.frag",
+        "runtimeArray.vert",
         "simpleFunctionCall.frag",
         "structAssignment.frag",
         "structDeref.frag",

+ 18 - 2
3rdparty/glslang/gtests/Link.FromFile.Vk.cpp

@@ -52,6 +52,7 @@ TEST_P(LinkTestVulkan, FromFile)
     GlslangResult result;
 
     // Compile each input shader file.
+    bool success = true;
     std::vector<std::unique_ptr<glslang::TShader>> shaders;
     for (size_t i = 0; i < fileCount; ++i) {
         std::string contents;
@@ -61,7 +62,7 @@ TEST_P(LinkTestVulkan, FromFile)
                 new glslang::TShader(GetShaderStage(GetSuffix(fileNames[i]))));
         auto* shader = shaders.back().get();
         shader->setAutoMapLocations(true);
-        compile(shader, contents, "", controls);
+        success &= compile(shader, contents, "", controls);
         result.shaderResults.push_back(
             {fileNames[i], shader->getInfoLog(), shader->getInfoDebugLog()});
     }
@@ -69,10 +70,25 @@ TEST_P(LinkTestVulkan, FromFile)
     // Link all of them.
     glslang::TProgram program;
     for (const auto& shader : shaders) program.addShader(shader.get());
-    program.link(controls);
+    success &= program.link(controls);
     result.linkingOutput = program.getInfoLog();
     result.linkingError = program.getInfoDebugLog();
 
+    if (success && (controls & EShMsgSpvRules)) {
+        spv::SpvBuildLogger logger;
+        std::vector<uint32_t> spirv_binary;
+        glslang::SpvOptions options;
+        options.disableOptimizer = true;
+        glslang::GlslangToSpv(*program.getIntermediate(shaders.front()->getStage()),
+                                spirv_binary, &logger, &options);
+
+        std::ostringstream disassembly_stream;
+        spv::Parameterize();
+        spv::Disassemble(disassembly_stream, spirv_binary);
+        result.spirvWarningsErrors = logger.getAllMessages();
+        result.spirv = disassembly_stream.str();
+    }
+
     std::ostringstream stream;
     outputResultToStream(&stream, result, controls);
 

+ 1 - 0
3rdparty/glslang/gtests/Spv.FromFile.cpp

@@ -282,6 +282,7 @@ INSTANTIATE_TEST_CASE_P(
         "spv.newTexture.frag",
         "spv.noDeadDecorations.vert",
         "spv.nonSquare.vert",
+        "spv.nonuniform.frag",
         "spv.noWorkgroup.comp",
         "spv.offsets.frag",
         "spv.Operations.frag",

+ 3 - 0
3rdparty/glslang/hlsl/hlslParseHelper.cpp

@@ -844,6 +844,8 @@ TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc,
             if (index->getQualifier().isFrontEndConstant()) {
                 if (base->getType().isUnsizedArray())
                     base->getWritableType().updateImplicitArraySize(indexValue + 1);
+                else
+                    checkIndex(loc, base->getType(), indexValue);
                 result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
             } else
                 result = intermediate.addIndex(EOpIndexIndirect, base, index, loc);
@@ -6551,6 +6553,7 @@ void HlslParseContext::mergeQualifiers(TQualifier& dst, const TQualifier& src)
     MERGE_SINGLETON(readonly);
     MERGE_SINGLETON(writeonly);
     MERGE_SINGLETON(specConstant);
+    MERGE_SINGLETON(nonUniform);
 }
 
 // used to flatten the sampler type space into a single dimension

+ 18 - 0
3rdparty/glslang/known_good_khr.json

@@ -0,0 +1,18 @@
+{
+  "commits" : [
+    {
+      "name" : "spirv-tools",
+      "site" : "gitlab",
+      "subrepo" : "spirv/spirv-tools",
+      "subdir" : "External/spirv-tools",
+      "commit" : "d4e2c2eaa6fd2e9f9cd218ea9add9b0c8ae759ba"
+    },
+    {
+      "name" : "spirv-tools/external/spirv-headers",
+      "site" : "gitlab",
+      "subrepo" : "spirv/SPIRV-Headers",
+      "subdir" : "External/spirv-tools/external/spirv-headers",
+      "commit" : "4082a777bd5df31ed45acf40e64263094e85ed2e"
+    }
+  ]
+}

Деякі файли не було показано, через те що забагато файлів було змінено