소스 검색

Updated glslang.

Branimir Karadžić 8 년 전
부모
커밋
34b6791bd0
48개의 변경된 파일5938개의 추가작업 그리고 597개의 파일을 삭제
  1. 0 21
      3rdparty/glslang/SPIRV/GLSL.ext.AMD.h
  2. 5 3
      3rdparty/glslang/SPIRV/GlslangToSpv.cpp
  3. 18 0
      3rdparty/glslang/SPIRV/spirv.hpp
  4. 5 0
      3rdparty/glslang/Test/320.comp
  5. 225 0
      3rdparty/glslang/Test/320.frag
  6. 134 0
      3rdparty/glslang/Test/320.geom
  7. 150 0
      3rdparty/glslang/Test/320.tesc
  8. 114 0
      3rdparty/glslang/Test/320.tese
  9. 255 0
      3rdparty/glslang/Test/320.vert
  10. 2 0
      3rdparty/glslang/Test/435.vert
  11. 1 1
      3rdparty/glslang/Test/baseResults/310.frag.out
  12. 19 0
      3rdparty/glslang/Test/baseResults/320.comp.out
  13. 576 0
      3rdparty/glslang/Test/baseResults/320.frag.out
  14. 251 0
      3rdparty/glslang/Test/baseResults/320.geom.out
  15. 516 0
      3rdparty/glslang/Test/baseResults/320.tesc.out
  16. 276 0
      3rdparty/glslang/Test/baseResults/320.tese.out
  17. 797 0
      3rdparty/glslang/Test/baseResults/320.vert.out
  18. 25 0
      3rdparty/glslang/Test/baseResults/435.vert.out
  19. 2 0
      3rdparty/glslang/Test/baseResults/hlsl.clipdistance-4.vert.out
  20. 2 0
      3rdparty/glslang/Test/baseResults/hlsl.clipdistance-5.vert.out
  21. 562 0
      3rdparty/glslang/Test/baseResults/hlsl.clipdistance-6.vert.out
  22. 511 0
      3rdparty/glslang/Test/baseResults/hlsl.clipdistance-7.vert.out
  23. 342 0
      3rdparty/glslang/Test/baseResults/hlsl.clipdistance-8.vert.out
  24. 305 0
      3rdparty/glslang/Test/baseResults/hlsl.clipdistance-9.vert.out
  25. 3 3
      3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out
  26. 4 0
      3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out
  27. 266 354
      3rdparty/glslang/Test/baseResults/hlsl.semantic.vert.out
  28. 0 2
      3rdparty/glslang/Test/baseResults/hlsl.structbuffer.coherent.frag.out
  29. 0 3
      3rdparty/glslang/Test/baseResults/hlsl.structbuffer.frag.out
  30. 9 0
      3rdparty/glslang/Test/baseResults/reflection.vert.out
  31. 0 2
      3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out
  32. 0 2
      3rdparty/glslang/Test/baseResults/spv.ssbo.autoassign.frag.out
  33. 23 0
      3rdparty/glslang/Test/hlsl.clipdistance-6.vert
  34. 23 0
      3rdparty/glslang/Test/hlsl.clipdistance-7.vert
  35. 20 0
      3rdparty/glslang/Test/hlsl.clipdistance-8.vert
  36. 19 0
      3rdparty/glslang/Test/hlsl.clipdistance-9.vert
  37. 3 5
      3rdparty/glslang/Test/hlsl.semantic.vert
  38. 24 0
      3rdparty/glslang/Test/reflection.vert
  39. 13 9
      3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp
  40. 21 13
      3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
  41. 19 9
      3rdparty/glslang/glslang/MachineIndependent/Scan.cpp
  42. 46 9
      3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
  43. 19 11
      3rdparty/glslang/glslang/MachineIndependent/reflection.cpp
  44. 7 0
      3rdparty/glslang/gtests/AST.FromFile.cpp
  45. 4 0
      3rdparty/glslang/gtests/Hlsl.FromFile.cpp
  46. 308 122
      3rdparty/glslang/hlsl/hlslParseHelper.cpp
  47. 14 2
      3rdparty/glslang/hlsl/hlslParseHelper.h
  48. 0 26
      3rdparty/glslang/hlsl/hlslScanContext.cpp

+ 0 - 21
3rdparty/glslang/SPIRV/GLSL.ext.AMD.h

@@ -38,15 +38,6 @@ static const int GLSLextAMDRevision = 4;
 // SPV_AMD_shader_ballot
 static const char* const E_SPV_AMD_shader_ballot = "SPV_AMD_shader_ballot";
 
-static const Op OpGroupIAddNonUniformAMD = static_cast<Op>(5000);
-static const Op OpGroupFAddNonUniformAMD = static_cast<Op>(5001);
-static const Op OpGroupFMinNonUniformAMD = static_cast<Op>(5002);
-static const Op OpGroupUMinNonUniformAMD = static_cast<Op>(5003);
-static const Op OpGroupSMinNonUniformAMD = static_cast<Op>(5004);
-static const Op OpGroupFMaxNonUniformAMD = static_cast<Op>(5005);
-static const Op OpGroupUMaxNonUniformAMD = static_cast<Op>(5006);
-static const Op OpGroupSMaxNonUniformAMD = static_cast<Op>(5007);
-
 enum ShaderBallotAMD {
     ShaderBallotBadAMD = 0, // Don't use
 
@@ -80,16 +71,6 @@ enum ShaderTrinaryMinMaxAMD {
 // SPV_AMD_shader_explicit_vertex_parameter
 static const char* const E_SPV_AMD_shader_explicit_vertex_parameter = "SPV_AMD_shader_explicit_vertex_parameter";
 
-static const BuiltIn BuiltInBaryCoordNoPerspAMD           = static_cast<BuiltIn>(4992);
-static const BuiltIn BuiltInBaryCoordNoPerspCentroidAMD   = static_cast<BuiltIn>(4993);
-static const BuiltIn BuiltInBaryCoordNoPerspSampleAMD     = static_cast<BuiltIn>(4994);
-static const BuiltIn BuiltInBaryCoordSmoothAMD            = static_cast<BuiltIn>(4995);
-static const BuiltIn BuiltInBaryCoordSmoothCentroidAMD    = static_cast<BuiltIn>(4996);
-static const BuiltIn BuiltInBaryCoordSmoothSampleAMD      = static_cast<BuiltIn>(4997);
-static const BuiltIn BuiltInBaryCoordPullModelAMD         = static_cast<BuiltIn>(4998);
-
-static const Decoration DecorationExplicitInterpAMD       = static_cast<Decoration>(4999);
-
 enum ShaderExplicitVertexParameterAMD {
     ShaderExplicitVertexParameterBadAMD = 0, // Don't use
 
@@ -117,8 +98,6 @@ static const char* const E_SPV_AMD_gpu_shader_half_float = "SPV_AMD_gpu_shader_h
 // SPV_AMD_texture_gather_bias_lod
 static const char* const E_SPV_AMD_texture_gather_bias_lod = "SPV_AMD_texture_gather_bias_lod";
 
-static const Capability CapabilityImageGatherBiasLodAMD = static_cast<Capability>(5009);
-
 // SPV_AMD_gpu_shader_int16
 static const char* const E_SPV_AMD_gpu_shader_int16 = "SPV_AMD_gpu_shader_int16";
 

+ 5 - 3
3rdparty/glslang/SPIRV/GlslangToSpv.cpp

@@ -2531,7 +2531,9 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
             }
             addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier));
 
-            if (qualifier.storage == glslang::EvqBuffer) {
+            if (type.getBasicType() == glslang::EbtBlock &&
+                qualifier.storage == glslang::EvqBuffer) {
+                // Add memory decorations only to top-level members of shader storage block
                 std::vector<spv::Decoration> memory;
                 TranslateMemoryDecoration(memberQualifier, memory);
                 for (unsigned int i = 0; i < memory.size(); ++i)
@@ -3345,7 +3347,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
 
     // lod
     if (cracked.lod) {
-        params.lod = arguments[2];
+        params.lod = arguments[2 + extraArgs];
         ++extraArgs;
     } else if (glslangIntermediate->getStage() != EShLangFragment) {
         // we need to invent the default lod for an explicit lod instruction for a non-fragment stage
@@ -3354,7 +3356,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
 
     // multisample
     if (sampler.ms) {
-        params.sample = arguments[2]; // For MS, "sample" should be specified
+        params.sample = arguments[2 + extraArgs]; // For MS, "sample" should be specified
         ++extraArgs;
     }
 

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

@@ -377,6 +377,7 @@ enum Decoration {
     DecorationNoContraction = 42,
     DecorationInputAttachmentIndex = 43,
     DecorationAlignment = 44,
+    DecorationExplicitInterpAMD = 4999,
     DecorationOverrideCoverageNV = 5248,
     DecorationPassthroughNV = 5250,
     DecorationViewportRelativeNV = 5252,
@@ -436,6 +437,13 @@ enum BuiltIn {
     BuiltInDrawIndex = 4426,
     BuiltInDeviceIndex = 4438,
     BuiltInViewIndex = 4440,
+    BuiltInBaryCoordNoPerspAMD = 4992,
+    BuiltInBaryCoordNoPerspCentroidAMD = 4993,
+    BuiltInBaryCoordNoPerspSampleAMD = 4994,
+    BuiltInBaryCoordSmoothAMD = 4995,
+    BuiltInBaryCoordSmoothCentroidAMD = 4996,
+    BuiltInBaryCoordSmoothSampleAMD = 4997,
+    BuiltInBaryCoordPullModelAMD = 4998,
     BuiltInViewportMaskNV = 5253,
     BuiltInSecondaryPositionNV = 5257,
     BuiltInSecondaryViewportMaskNV = 5258,
@@ -629,7 +637,9 @@ enum Capability {
     CapabilityMultiView = 4439,
     CapabilityVariablePointersStorageBuffer = 4441,
     CapabilityVariablePointers = 4442,
+    CapabilityAtomicStorageOps = 4445,
     CapabilitySampleMaskPostDepthCoverage = 4447,
+    CapabilityImageGatherBiasLodAMD = 5009,
     CapabilitySampleMaskOverrideCoverageNV = 5249,
     CapabilityGeometryShaderPassthroughNV = 5251,
     CapabilityShaderViewportIndexLayerNV = 5254,
@@ -940,6 +950,14 @@ enum Op {
     OpSubgroupAnyKHR = 4429,
     OpSubgroupAllEqualKHR = 4430,
     OpSubgroupReadInvocationKHR = 4432,
+    OpGroupIAddNonUniformAMD = 5000,
+    OpGroupFAddNonUniformAMD = 5001,
+    OpGroupFMinNonUniformAMD = 5002,
+    OpGroupUMinNonUniformAMD = 5003,
+    OpGroupSMinNonUniformAMD = 5004,
+    OpGroupFMaxNonUniformAMD = 5005,
+    OpGroupUMaxNonUniformAMD = 5006,
+    OpGroupSMaxNonUniformAMD = 5007,
     OpMax = 0x7fffffff,
 };
 

+ 5 - 0
3rdparty/glslang/Test/320.comp

@@ -0,0 +1,5 @@
+#version 320 es
+
+void main()
+{
+}

+ 225 - 0
3rdparty/glslang/Test/320.frag

@@ -0,0 +1,225 @@
+#version 320 es
+
+out outbname { int a; } outbinst;   // ERROR, not out block in fragment shader
+
+in inbname {
+    int a;
+    vec4 v;
+    struct { int b; } s;     // ERROR, nested struct definition
+} inbinst;
+
+in inbname2 {
+    layout(location = 12) int aAnon;
+    layout(location = 13) centroid in vec4 vAnon;
+};
+
+in layout(location = 13) vec4 aliased; // ERROR, aliased
+
+in inbname2 {                // ERROR, reuse of block name
+    int aAnon;
+    centroid in vec4 vAnon;
+};
+
+in badmember {               // ERROR, aAnon already in global scope
+    int aAnon;
+};
+
+int inbname;                 // ERROR, redefinition of block name
+
+vec4 vAnon;                  // ERROR, anon in global scope; redefinition
+
+in arrayed {
+    float f;
+} arrayedInst[4];
+uniform int i;
+void fooIO()
+{
+    vec4 v = inbinst.v + vAnon;
+    v *= arrayedInst[2].f;
+    v *= arrayedInst[i].f;
+}
+
+in vec4 gl_FragCoord;
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;  // ERROR, non-ES
+
+layout(early_fragment_tests) in;
+out float gl_FragDepth;
+layout(depth_any) out float gl_FragDepth;  // ERROR, non-ES
+
+void main()
+{
+    gl_FragDepth = 0.2;  // ERROR, early_fragment_tests declared
+    bool f = gl_FrontFacing;
+}
+
+out float gl_FragDepth;
+
+void foo_GS()
+{
+    highp int l = gl_Layer;
+    highp int p = gl_PrimitiveID;
+}
+
+in vec2 inf, ing;
+uniform ivec2 offsets[4];
+uniform sampler2D sArray[4];
+uniform int sIndex;
+layout(binding = 0) uniform atomic_uint auArray[2];
+uniform ubName { int i; } ubInst[4];
+buffer bbName { int i; } bbInst[4];
+highp uniform writeonly image2D iArray[5];
+const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
+
+void pfoo()
+{
+    precise vec2 h;
+    h = fma(inf, ing, h);
+    textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
+    textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
+    textureGatherOffsets(sArray[0], vec2(0.1), offsets);       // ERROR, offset not constant
+}
+
+precision highp imageCubeArray        ;
+precision highp iimageCubeArray       ;
+precision highp uimageCubeArray       ;
+
+precision highp samplerCubeArray      ;
+precision highp samplerCubeArrayShadow;
+precision highp isamplerCubeArray     ;
+precision highp usamplerCubeArray     ;
+
+uniform writeonly imageCubeArray  CA1;
+uniform writeonly iimageCubeArray CA2;
+uniform writeonly uimageCubeArray CA3;
+
+#ifdef GL_EXT_texture_cube_map_array
+uniform samplerCubeArray          CA4;
+uniform samplerCubeArrayShadow    CA5;
+uniform isamplerCubeArray         CA6;
+uniform usamplerCubeArray         CA7;
+#endif
+
+void CAT()
+{
+    highp vec4 b4 = texture(CA4, vec4(0.5), 0.24);
+    highp ivec4 b6 = texture(CA6, vec4(0.5), 0.26);
+    highp uvec4 b7 = texture(CA7, vec4(0.5), 0.27);
+}
+
+void goodSample()
+{
+    lowp     int  a1 = gl_SampleID;       
+    mediump  vec2 a2 = gl_SamplePosition; 
+    highp    int  a3 = gl_SampleMaskIn[0];
+    gl_SampleMask[0] = a3;
+    mediump int n1 = gl_MaxSamples;
+    mediump int n2 = gl_NumSamples;
+}
+
+uniform layout(r32f)  highp  image2D im2Df;
+uniform layout(r32ui) highp uimage2D im2Du;
+uniform layout(r32i)  highp iimage2D im2Di;
+uniform ivec2 P;
+
+uniform layout(rgba32f)  highp  image2D badIm2Df;  // ERROR, needs readonly or writeonly
+uniform layout(rgba8ui) highp uimage2D badIm2Du;   // ERROR, needs readonly or writeonly
+uniform layout(rgba16i)  highp iimage2D badIm2Di;  // ERROR, needs readonly or writeonly
+
+void goodImageAtom()
+{
+    float datf;
+    int dati;
+    uint datu;
+
+    imageAtomicAdd(     im2Di, P, dati);
+    imageAtomicAdd(     im2Du, P, datu);
+    imageAtomicMin(     im2Di, P, dati);
+    imageAtomicMin(     im2Du, P, datu);
+    imageAtomicMax(     im2Di, P, dati);
+    imageAtomicMax(     im2Du, P, datu);
+    imageAtomicAnd(     im2Di, P, dati);
+    imageAtomicAnd(     im2Du, P, datu);
+    imageAtomicOr(      im2Di, P, dati);
+    imageAtomicOr(      im2Du, P, datu);
+    imageAtomicXor(     im2Di, P, dati);
+    imageAtomicXor(     im2Du, P, datu);
+    imageAtomicExchange(im2Di, P, dati);
+    imageAtomicExchange(im2Du, P, datu);
+    imageAtomicExchange(im2Df, P, datf);
+    imageAtomicCompSwap(im2Di, P,  3, dati);
+    imageAtomicCompSwap(im2Du, P, 5u, datu);
+
+    imageAtomicMax(badIm2Di, P, dati);      // ERROR, not an allowed layout() on the image
+    imageAtomicMax(badIm2Du, P, datu);      // ERROR, not an allowed layout() on the image
+    imageAtomicExchange(badIm2Df, P, datf); // ERROR, not an allowed layout() on the image
+}
+
+centroid out vec4 colorCentroidBad;  // ERROR
+flat out vec4 colorBadFlat;          // ERROR
+smooth out vec4 colorBadSmooth;      // ERROR
+noperspective out vec4 colorBadNo;   // ERROR
+flat centroid in vec2 colorfc;
+in float scalarIn;
+
+sample in vec4 colorSampIn;
+sample out vec4 colorSampleBad;     // ERROR
+flat sample in vec4 colorfsi;
+sample in vec3 sampInArray[4];
+
+void interp()
+{
+    float res;
+    vec2 res2;
+    vec3 res3;
+    vec4 res4;
+
+    res2 = interpolateAtCentroid(colorfc);
+    res4 = interpolateAtCentroid(colorSampIn);
+    res4 = interpolateAtCentroid(colorfsi);
+    res  = interpolateAtCentroid(scalarIn);
+    res3 = interpolateAtCentroid(sampInArray);         // ERROR
+    res3 = interpolateAtCentroid(sampInArray[2]);
+    res2 = interpolateAtCentroid(sampInArray[2].xy);   // ERROR
+
+    res3 = interpolateAtSample(sampInArray, 1);        // ERROR
+    res3 = interpolateAtSample(sampInArray[i], 0);
+    res2 = interpolateAtSample(sampInArray[2].xy, 2);  // ERROR
+    res  = interpolateAtSample(scalarIn, 1);
+
+    res3 = interpolateAtOffset(sampInArray, vec2(0.2));         // ERROR
+    res3 = interpolateAtOffset(sampInArray[2], vec2(0.2));
+    res2 = interpolateAtOffset(sampInArray[2].xy, vec2(0.2));   // ERROR, no swizzle
+    res  = interpolateAtOffset(scalarIn + scalarIn, vec2(0.2)); // ERROR, no binary ops other than dereference
+    res  = interpolateAtOffset(scalarIn, vec2(0.2));
+
+    float f;
+    res  = interpolateAtCentroid(f);           // ERROR, not interpolant
+    res4 = interpolateAtSample(outp, 0);       // ERROR, not interpolant
+}
+
+layout(blend_support_multiply) out;
+layout(blend_support_screen) out;
+layout(blend_support_overlay) out;
+layout(blend_support_darken, blend_support_lighten) out;
+layout(blend_support_colordodge) layout(blend_support_colorburn) out;
+layout(blend_support_hardlight) out;
+layout(blend_support_softlight) out;
+layout(blend_support_difference) out;
+layout(blend_support_exclusion) out;
+layout(blend_support_hsl_hue) out;
+layout(blend_support_hsl_saturation) out;
+layout(blend_support_hsl_color) out;
+layout(blend_support_hsl_luminosity) out;
+layout(blend_support_all_equations) out;
+
+layout(blend_support_hsl_luminosity) out;              // okay to repeat
+
+layout(blend_support_hsl_luminosity) in;                       // ERROR, only on "out"
+layout(blend_support_hsl_luminosity) out vec4;                 // ERROR, only on standalone
+layout(blend_support_hsl_luminosity) out vec4 badout;          // ERROR, only on standalone
+layout(blend_support_hsl_luminosity) struct badS {int i;};     // ERROR, only on standalone
+layout(blend_support_hsl_luminosity) void blendFoo() { }       // ERROR, only on standalone
+void blendFoo(layout(blend_support_hsl_luminosity) vec3 v) { } // ERROR, only on standalone
+layout(blend_support_flizbit) out;                             // ERROR, no flizbit
+
+out vec4 outAA[2][2];  // ERROR

+ 134 - 0
3rdparty/glslang/Test/320.geom

@@ -0,0 +1,134 @@
+#version 320 es
+
+precision mediump float;
+
+in fromVertex {
+    in vec3 color;
+} fromV[];
+
+in vec4 nonBlockUnsized[];
+
+out toFragment {
+    out vec3 color;
+} toF;
+
+out fromVertex {  // okay to reuse a block name for another block name
+    vec3 color;
+};
+
+out fooB {        // ERROR, cannot reuse block name as block instance
+    vec2 color;
+} fromVertex;
+
+int fromVertex;   // ERROR, cannot reuse a block name for something else
+
+out fooC {        // ERROR, cannot have same name for block and instance name
+    vec2 color;
+} fooC;
+
+void main()
+{
+    EmitVertex();
+    EndPrimitive();
+    EmitStreamVertex(1);    // ERROR
+    EndStreamPrimitive(0);  // ERROR
+
+    color = fromV[0].color;
+    gl_ClipDistance[3] =              // ERROR, no ClipDistance
+        gl_in[1].gl_ClipDistance[2];  // ERROR, no ClipDistance
+    gl_Position = gl_in[0].gl_Position;
+
+    gl_PrimitiveID = gl_PrimitiveIDIn;
+    gl_Layer = 2;
+}
+
+layout(stream = 4) out vec4 ov4; // ERROR, no streams
+
+layout(line_strip, points, triangle_strip, points, triangle_strip) out;  // just means triangle_strip"
+
+out ooutb { vec4 a; } ouuaa6;
+
+layout(max_vertices = 200) out;
+layout(max_vertices = 300) out;   // ERROR, too big
+void foo(layout(max_vertices = 4) int a)  // ERROR
+{
+    ouuaa6.a = vec4(1.0);
+}
+
+layout(line_strip, points, triangle_strip, points) out;  // ERROR, changing output primitive
+layout(line_strip, points) out; // ERROR, changing output primitive
+layout(triangle_strip) in; // ERROR, not an input primitive
+layout(triangle_strip) uniform; // ERROR
+layout(triangle_strip) out vec4 badv4;  // ERROR, not on a variable
+layout(triangle_strip) in vec4 bad2v4[];  // ERROR, not on a variable or input
+layout(invocations = 3) out outbn { int a; }; // 2 ERROR, not on a block, not until 4.0
+out outbn2 {
+    layout(invocations = 3)  int a; // 2 ERRORs, not on a block member, not until 4.0
+    layout(max_vertices = 3) int b; // ERROR, not on a block member
+    layout(triangle_strip)   int c; // ERROR, not on a block member
+} outbi;
+
+layout(lines) out;  // ERROR, not on output
+layout(lines_adjacency) in;
+layout(triangles) in;             // ERROR, can't change it
+layout(triangles_adjacency) in;   // ERROR, can't change it
+layout(invocations = 4) in;
+
+in sameName {
+    int a15;
+} insn[];
+
+out sameName {
+    float f15;
+};
+
+uniform sameName {
+    bool b15;
+};
+
+const int summ = gl_MaxVertexAttribs +
+             gl_MaxGeometryInputComponents +
+             gl_MaxGeometryOutputComponents +
+             gl_MaxGeometryImageUniforms +
+             gl_MaxGeometryTextureImageUnits +
+             gl_MaxGeometryOutputVertices +
+             gl_MaxGeometryTotalOutputComponents +
+             gl_MaxGeometryUniformComponents +
+             gl_MaxGeometryAtomicCounters +
+             gl_MaxGeometryAtomicCounterBuffers +
+             gl_MaxVertexTextureImageUnits +
+             gl_MaxCombinedTextureImageUnits +
+             gl_MaxTextureImageUnits +
+             gl_MaxDrawBuffers;
+
+void fooe1()
+{
+    gl_ViewportIndex;  // ERROR, not in ES
+    gl_MaxViewports;   // ERROR, not in ES
+    insn.length();     // 4: lines_adjacency
+    int inv = gl_InvocationID;
+}
+
+in vec4 explArray[4];
+in vec4 explArrayBad[5];  // ERROR, wrong size
+in vec4 nonArrayed;       // ERROR, not an array
+flat out vec3 myColor1;
+centroid out vec3 myColor2;
+centroid in vec3 centr[];
+sample out vec4 perSampleColor;  // ERROR without sample extensions
+
+layout(max_vertices = 200) out;  // matching redecl
+
+layout(location = 7, component = 2) in float comp[];  // ERROR, es has no component
+
+void notHere()
+{
+    gl_MaxGeometryVaryingComponents;  // ERROR, not in ES
+    gl_VerticesIn;                    // ERROR, not in ES
+}
+
+void pointSize2()
+{
+    highp float ps = gl_in[3].gl_PointSize;  // ERROR, need extension
+    gl_PointSize = ps;                       // ERROR, need extension
+}

+ 150 - 0
3rdparty/glslang/Test/320.tesc

@@ -0,0 +1,150 @@
+#version 320 es
+
+layout(vertices = 4) out;
+out int outa[gl_out.length()];
+
+layout(quads) in;                   // ERROR
+layout(ccw) out;                    // ERROR
+layout(fractional_even_spacing) in; // ERROR
+
+patch in vec4 patchIn;              // ERROR
+patch out vec4 patchOut;
+
+void main()
+{
+    barrier();
+
+    int a = gl_MaxTessControlInputComponents +
+            gl_MaxTessControlOutputComponents +
+            gl_MaxTessControlTextureImageUnits +
+            gl_MaxTessControlUniformComponents +
+            gl_MaxTessControlTotalOutputComponents;
+
+    vec4 p = gl_in[1].gl_Position;
+    float ps = gl_in[1].gl_PointSize;        // ERROR, need point_size extension
+    float cd = gl_in[1].gl_ClipDistance[2];  // ERROR, not in ES
+
+    int pvi = gl_PatchVerticesIn;
+    int pid = gl_PrimitiveID;
+    int iid = gl_InvocationID;
+
+    gl_out[gl_InvocationID].gl_Position = p;
+    gl_out[gl_InvocationID].gl_PointSize = ps;        // ERROR, need point_size extension
+    gl_out[gl_InvocationID].gl_ClipDistance[1] = cd;  // ERROR, not in ES
+
+    gl_TessLevelOuter[3] = 3.2;
+    gl_TessLevelInner[1] = 1.3;
+
+    if (a > 10)
+        barrier();           // ERROR
+    else
+        barrier();           // ERROR
+
+    barrier();
+
+    do {
+        barrier();           // ERROR
+    } while (a > 10);
+
+    switch (a) {
+    default:
+        barrier();           // ERROR
+        break;
+    }
+    a < 12 ? a : (barrier(), a); // ERROR
+    {
+        barrier();
+    }
+
+    return;
+
+    barrier();               // ERROR
+}
+
+layout(vertices = 4) in;    // ERROR, not on in
+layout(vertices = 5) out;   // ERROR, changing #
+
+void foo()
+{
+    gl_out[4].gl_Position;  // ERROR, out of range
+
+    barrier();              // ERROR, not in main
+}
+
+in vec2 ina;                // ERROR, not array
+in vec2 inb[];
+in vec2 inc[18];            // ERROR, wrong size
+in vec2 ind[gl_MaxPatchVertices];
+patch out float implA[];    // ERROR, not sized
+
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(location = 3) in vec4 ivla[];
+layout(location = 4) in vec4 ivlb[];
+layout(location = 4) in vec4 ivlc[];  // ERROR, overlapping
+
+layout(location = 3) out vec4 ovla[];
+layout(location = 4) out vec4 ovlb[];
+layout(location = 4) out vec4 ovlc[];  // ERROR, overlapping
+
+patch out pinbn {
+    int a;
+} pinbi;
+
+centroid out vec3 myColor2[];
+centroid in vec3 centr[];
+sample out vec4 perSampleColor[];
+
+layout(vertices = 4) out float badlay[];   // ERROR, not on a variable
+out float misSized[5];              // ERROR, size doesn't match
+out float okaySize[4];
+
+void pointSize2()
+{
+    float ps = gl_in[1].gl_PointSize;  // ERROR, need point_size extension
+    gl_out[gl_InvocationID].gl_PointSize = ps;   // ERROR, need point_size extension
+}
+
+precise vec3 pv3;
+
+void goodfoop()
+{
+    precise float d;
+
+    pv3 *= pv3;
+    pv3 = fma(pv3, pv3, pv3);
+    d = fma(d, d, d);
+}
+
+void bb()
+{
+    gl_BoundingBoxOES[0] = vec4(0.0);
+    gl_BoundingBoxOES[1] = vec4(1.0);
+    gl_BoundingBoxOES[2] = vec4(2.0);  // ERROR, overflow
+}
+
+out patch badpatchBName {  // ERROR, array size required
+    float f;
+} badpatchIName[];
+
+out patch patchBName {
+    float f;
+} patchIName[4];
+
+void outputtingOutparam(out int a)
+{
+    a = 2;
+}
+
+void outputting()
+{
+    outa[gl_InvocationID] = 2;
+    outa[1] = 2;                         // ERROR, not gl_InvocationID
+    gl_out[0].gl_Position = vec4(1.0);   // ERROR, not gl_InvocationID
+    outa[1];
+    gl_out[0];
+    outputtingOutparam(outa[0]);         // ERROR, not gl_InvocationID
+    outputtingOutparam(outa[gl_InvocationID]);
+    patchIName[1].f = 3.14;
+    outa[(gl_InvocationID)] = 2;
+}

+ 114 - 0
3rdparty/glslang/Test/320.tese

@@ -0,0 +1,114 @@
+#version 320 es
+
+layout(vertices = 4) out; // ERROR
+layout(quads, cw) in;
+layout(triangles) in;     // ERROR
+layout(isolines) in;      // ERROR
+
+layout(ccw) in;           // ERROR
+layout(cw) in;
+
+layout(fractional_odd_spacing) in;    
+layout(equal_spacing) in;              // ERROR
+layout(fractional_even_spacing) in;    // ERROR
+
+layout(point_mode) in;
+
+patch in vec4 patchIn;
+patch out vec4 patchOut;  // ERROR
+
+void main()
+{
+    barrier(); // ERROR
+
+    int a = gl_MaxTessEvaluationInputComponents +
+            gl_MaxTessEvaluationOutputComponents +
+            gl_MaxTessEvaluationTextureImageUnits +
+            gl_MaxTessEvaluationUniformComponents +
+            gl_MaxTessPatchComponents +
+            gl_MaxPatchVertices +
+            gl_MaxTessGenLevel;
+
+    vec4 p = gl_in[1].gl_Position;
+    float ps = gl_in[1].gl_PointSize;        // ERROR, need point_size extension
+    float cd = gl_in[1].gl_ClipDistance[2];  // ERROR, not in ES
+
+    int pvi = gl_PatchVerticesIn;
+    int pid = gl_PrimitiveID;
+    vec3 tc = gl_TessCoord;
+    float tlo = gl_TessLevelOuter[3];
+    float tli = gl_TessLevelInner[1];
+
+    gl_Position = p;
+    gl_PointSize = ps;             // ERROR, need point_size extension
+    gl_ClipDistance[2] = cd;       // ERROR, not in ES
+}
+
+smooth patch in vec4 badp1;         // ERROR
+flat patch in vec4 badp2;           // ERROR
+noperspective patch in vec4 badp3;  // ERROR
+patch sample in vec3 badp4;         // ERROR
+
+#extension GL_ARB_separate_shader_objects : enable
+
+in gl_PerVertex           // ERROR, no size
+{
+    vec4 gl_Position;
+} gl_in[];
+
+in gl_PerVertex           // ERROR, second redeclaration of gl_in
+{
+    vec4 gl_Position;
+} gl_in[];
+
+layout(quads, cw) out;     // ERROR
+layout(triangles) out;     // ERROR
+layout(isolines) out;      // ERROR
+layout(cw) out;            // ERROR
+layout(fractional_odd_spacing) out;    // ERROR
+layout(equal_spacing) out;             // ERROR
+layout(fractional_even_spacing) out;   // ERROR
+layout(point_mode) out;                // ERROR
+
+in vec2 ina;      // ERROR, not array
+in vec2 inb[];
+in vec2 inc[18];  // ERROR, wrong size
+in vec2 ind[gl_MaxPatchVertices];
+
+in testbla {      // ERROR, not array
+    int f;
+} bla;
+
+in testblb {
+    int f;
+} blb[];
+
+in testblc { // ERROR wrong size
+    int f;
+} blc[18];
+
+in testbld {
+    int f;
+} bld[gl_MaxPatchVertices];
+
+layout(location = 23) in vec4 ivla[];
+layout(location = 24) in vec4 ivlb[];
+layout(location = 24) in vec4 ivlc[];  // ERROR, overlap
+
+layout(location = 23) out vec4 ovla[2];
+layout(location = 24) out vec4 ovlb[2];  // ERROR, overlap
+
+in float gl_TessLevelOuter[4];           // ERROR, can't redeclare
+
+patch in pinbn {
+    int a;
+} pinbi;
+
+centroid out vec3 myColor2;
+centroid in vec3 centr[];
+sample out vec4 perSampleColor;
+
+void bbbad()
+{
+    gl_BoundingBoxOES; // ERROR, wrong stage
+}

+ 255 - 0
3rdparty/glslang/Test/320.vert

@@ -0,0 +1,255 @@
+#version 320 es
+
+out outbname {
+    int a;
+    out vec4 v;
+    highp sampler2D s;   // ERROR, opaque type
+} outbinst;
+
+out outbname2 {
+    layout(location = 12) int aAnon;
+    layout(location = 13) vec4 vAnon;
+};
+
+layout(location = 12) out highp int aliased;  // ERROR, aliasing location
+
+in inbname { int a; } inbinst;  // ERROR, no in block in vertex shader
+
+out gl_PerVertex {              // ERROR, has extra member
+    highp vec4 gl_Position;
+    highp vec4 t;
+};
+
+void main()
+{
+    int sum  = gl_VertexID +
+               gl_InstanceID;
+    gl_Position = vec4(1.0);
+    gl_PointSize = 2.0;         // ERROR, removed by redeclaration
+}
+
+out gl_PerVertex {              // ERROR, already used and already redeclared
+    highp vec4 gl_Position;
+    highp vec4 t;
+};
+
+smooth out smo {                // ERROR, no smooth on a block
+    int i;
+} smon;
+
+flat out fmo {                  // ERROR, no flat on a block
+    int i;
+} fmon;
+
+centroid out cmo {              // ERROR, no centroid on a block
+    int i;
+} cmon;
+
+invariant out imo {             // ERROR, no invariant on a block
+    int i;
+} imon;
+
+in vec2 inf, ing;
+uniform ivec2 offsets[4];
+uniform sampler2D sArray[4];
+uniform int sIndex;
+layout(binding = 0) uniform atomic_uint auArray[2];
+uniform ubName { int i; } ubInst[4];
+buffer bbName { int i; } bbInst[4];
+highp uniform writeonly image2D iArray[5];
+const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
+
+void pfoo()
+{
+    precise vec2 h;
+    h = fma(inf, ing, h);
+    sArray[sIndex + 1];
+    ubInst[sIndex + 1];
+    bbInst[sIndex - 2];      // ERROR, still not supported
+    iArray[2];
+    iArray[sIndex - 2];
+    textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
+    textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
+    textureGatherOffsets(sArray[0], vec2(0.1), offsets);   // ERROR, offset not constant
+}
+
+uniform samplerBuffer  noPreSamp1;            // ERROR, no default precision
+uniform isamplerBuffer noPreSamp2;            // ERROR, no default precision
+uniform usamplerBuffer noPreSamp3;            // ERROR, no default precision
+uniform writeonly imageBuffer    noPreSamp4;  // ERROR, no default precision
+uniform writeonly iimageBuffer   noPreSamp5;  // ERROR, no default precision
+uniform writeonly uimageBuffer   noPreSamp6;  // ERROR, no default precision
+
+precision highp samplerBuffer; 
+precision highp isamplerBuffer;
+precision highp usamplerBuffer;
+precision highp imageBuffer;   
+precision highp iimageBuffer;  
+precision highp uimageBuffer;  
+
+#ifdef GL_OES_texture_buffer
+uniform samplerBuffer  bufSamp1;          
+uniform isamplerBuffer bufSamp2;          
+uniform usamplerBuffer bufSamp3;          
+#endif
+#ifdef GL_EXT_texture_buffer
+uniform writeonly imageBuffer    bufSamp4;
+uniform writeonly iimageBuffer   bufSamp5;
+uniform writeonly uimageBuffer   bufSamp6;
+#endif
+
+void bufferT()
+{
+    highp int s1 = textureSize(bufSamp1);
+    highp int s2 = textureSize(bufSamp2);
+    highp int s3 = textureSize(bufSamp3);
+
+    highp int s4 = imageSize(bufSamp4);
+    highp int s5 = imageSize(bufSamp5);
+    highp int s6 = imageSize(bufSamp6);
+    
+    highp vec4 f1 = texelFetch(bufSamp1, s1);
+    highp ivec4 f2 = texelFetch(bufSamp2, s2);
+    highp uvec4 f3 = texelFetch(bufSamp3, s3);
+}
+
+uniform writeonly imageCubeArray  noPreCA1;   // ERROR, no default precision
+uniform writeonly iimageCubeArray noPreCA2;   // ERROR, no default precision
+uniform writeonly uimageCubeArray noPreCA3;   // ERROR, no default precision
+
+uniform samplerCubeArray          noPreCA4;   // ERROR, no default precision
+uniform samplerCubeArrayShadow    noPreCA5;   // ERROR, no default precision
+uniform isamplerCubeArray         noPreCA6;   // ERROR, no default precision
+uniform usamplerCubeArray         noPreCA7;   // ERROR, no default precision
+
+precision highp imageCubeArray        ;
+precision highp iimageCubeArray       ;
+precision highp uimageCubeArray       ;
+
+precision highp samplerCubeArray      ;
+precision highp samplerCubeArrayShadow;
+precision highp isamplerCubeArray     ;
+precision highp usamplerCubeArray     ;
+
+uniform writeonly imageCubeArray  CA1;
+uniform writeonly iimageCubeArray CA2;
+uniform writeonly uimageCubeArray CA3;
+
+layout(rgba16f) uniform readonly imageCubeArray  rCA1;
+layout(rgba32i) uniform readonly iimageCubeArray rCA2;
+layout(r32ui) uniform readonly uimageCubeArray rCA3;
+
+#ifdef GL_OES_texture_cube_map_array
+uniform samplerCubeArray          CA4;
+uniform samplerCubeArrayShadow    CA5;
+uniform isamplerCubeArray         CA6;
+uniform usamplerCubeArray         CA7;
+#endif
+
+void CAT()
+{
+    highp ivec3 s4 = textureSize(CA4, 1);
+    highp ivec3 s5 = textureSize(CA5, 1);
+    highp ivec3 s6 = textureSize(CA6, 1);
+    highp ivec3 s7 = textureSize(CA7, 1);
+    
+    highp vec4 t4 = texture(CA4, vec4(0.5));
+    highp float t5 = texture(CA5, vec4(0.5), 3.0);
+    highp ivec4 t6 = texture(CA6, vec4(0.5));
+    highp uvec4 t7 = texture(CA7, vec4(0.5));
+
+    highp vec4 L4 = textureLod(CA4, vec4(0.5), 0.24);
+    highp ivec4 L6 = textureLod(CA6, vec4(0.5), 0.26);
+    highp uvec4 L7 = textureLod(CA7, vec4(0.5), 0.27);
+
+    highp vec4 g4 = textureGrad(CA4, vec4(0.5), vec3(0.1), vec3(0.2));
+    highp ivec4 g6 = textureGrad(CA6, vec4(0.5), vec3(0.1), vec3(0.2));
+    highp uvec4 g7 = textureGrad(CA7, vec4(0.5), vec3(0.1), vec3(0.2));
+
+    highp vec4 gath4 = textureGather(CA4, vec4(0.5));
+    highp vec4 gathC4 = textureGather(CA4, vec4(0.5), 2);
+    highp ivec4 gath6 = textureGather(CA6, vec4(0.5));
+    highp ivec4 gathC6 = textureGather(CA6, vec4(0.5), 1);
+    highp uvec4 gath7 = textureGather(CA7, vec4(0.5));
+    highp uvec4 gathC7 = textureGather(CA7, vec4(0.5), 0);
+
+    highp vec4 gath5 = textureGather(CA5, vec4(0.5), 2.5);
+
+    highp ivec3 s1 = imageSize(CA1);
+    highp ivec3 s2 = imageSize(CA2);
+    highp ivec3 s3 = imageSize(CA3);
+
+    imageStore(CA1, s3, vec4(1));
+    imageStore(CA2, s3, ivec4(1));
+    imageStore(CA3, s3, uvec4(1));
+
+    highp vec4 cl1 = imageLoad(rCA1, s3);
+    highp ivec4 cl2 = imageLoad(rCA2, s3);
+    highp uvec4 cl3 = imageLoad(rCA3, s3);
+}
+
+uniform sampler2DMSArray  noPrec2DMS;    // ERROR, no default
+uniform isampler2DMSArray noPrec2DMSi;   // ERROR, no default
+uniform usampler2DMSArray noPrec2DMSu;   // ERROR, no default
+
+precision highp sampler2DMSArray;
+precision highp isampler2DMSArray;
+precision highp usampler2DMSArray;
+
+uniform sampler2DMSArray  samp2DMSA;
+uniform isampler2DMSArray samp2DMSAi;
+uniform usampler2DMSArray samp2DMSAu;
+
+void MSA()
+{
+    vec4 tf = texelFetch(samp2DMSA, ivec3(5), 2);
+    ivec4 tfi = texelFetch(samp2DMSAi, ivec3(5), 2);
+    uvec4 tfu = texelFetch(samp2DMSAu, ivec3(5), 2);
+    
+    ivec3 tfs = textureSize(samp2DMSA);
+    ivec3 tfsi = textureSize(samp2DMSAi);
+    ivec3 tfsb = textureSize(samp2DMSAi, 4);  // ERROR, no lod
+    ivec3 tfsu = textureSize(samp2DMSAu);
+}
+
+uniform layout(r32f)  highp  image2D im2Df;
+uniform layout(r32ui) highp uimage2D im2Du;
+uniform layout(r32i)  highp iimage2D im2Di;
+uniform ivec2 P;
+
+void goodImageAtom()
+{
+    float datf;
+    int dati;
+    uint datu;
+
+    imageAtomicAdd(     im2Di, P, dati);
+    imageAtomicAdd(     im2Du, P, datu);
+    imageAtomicMin(     im2Di, P, dati);
+    imageAtomicMin(     im2Du, P, datu);
+    imageAtomicMax(     im2Di, P, dati);
+    imageAtomicMax(     im2Du, P, datu);
+    imageAtomicAnd(     im2Di, P, dati);
+    imageAtomicAnd(     im2Du, P, datu);
+    imageAtomicOr(      im2Di, P, dati);
+    imageAtomicOr(      im2Du, P, datu);
+    imageAtomicXor(     im2Di, P, dati);
+    imageAtomicXor(     im2Du, P, datu);
+    imageAtomicExchange(im2Di, P, dati);
+    imageAtomicExchange(im2Du, P, datu);
+    imageAtomicExchange(im2Df, P, datf);
+    imageAtomicCompSwap(im2Di, P,  3, dati);
+    imageAtomicCompSwap(im2Du, P, 5u, datu);
+}
+
+sample out vec4 colorSample;
+flat sample out vec4 colorfsi;
+sample out vec3 sampInArray[4];
+in vec4 inv4;
+
+void badInterp()
+{
+    interpolateAtCentroid(inv4);             // ERROR, wrong stage
+    interpolateAtSample(inv4, 1);            // ERROR, need extension
+    interpolateAtOffset(inv4, vec2(0.2));    // ERROR, need extension
+}

+ 2 - 0
3rdparty/glslang/Test/435.vert

@@ -0,0 +1,2 @@
+#version 435
+void main() {}

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

@@ -123,7 +123,7 @@ ERROR: 0:391: 'interpolateAtOffset' : first argument must be an interpolant, or
 ERROR: 0:392: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element 
 ERROR: 0:396: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element 
 ERROR: 0:397: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element 
-ERROR: 0:400: 'blend equation' : required extension not requested: GL_KHR_blend_equation_advanced
+ERROR: 0:400: 'blend equation' : not supported for this version or the enabled extensions 
 ERROR: 0:423: 'blend equation' : can only apply to 'out' 
 ERROR: 0:424: 'blend equation' : can only apply to a standalone qualifier 
 ERROR: 0:425: 'blend equation' : can only apply to a standalone qualifier 

+ 19 - 0
3rdparty/glslang/Test/baseResults/320.comp.out

@@ -0,0 +1,19 @@
+320.comp
+Shader version: 320
+local_size = (1, 1, 1)
+0:? Sequence
+0:3  Function Definition: main( ( global void)
+0:3    Function Parameters: 
+0:?   Linker Objects
+
+
+Linked compute stage:
+
+
+Shader version: 320
+local_size = (1, 1, 1)
+0:? Sequence
+0:3  Function Definition: main( ( global void)
+0:3    Function Parameters: 
+0:?   Linker Objects
+

+ 576 - 0
3rdparty/glslang/Test/baseResults/320.frag.out

@@ -0,0 +1,576 @@
+320.frag
+ERROR: 0:3: 'output block' : not supported in this stage: fragment
+ERROR: 0:7: 'float' : type requires declaration of default precision qualifier 
+ERROR: 0:8: '' : cannot nest a structure definition inside a structure or block 
+ERROR: 0:16: 'location' : overlapping use of location 13
+ERROR: 0:18: 'inbname2' : Cannot reuse block name within the same interface: in
+ERROR: 0:23: 'badmember' : nameless block contains a member that already has a name at global scope 
+ERROR: 0:27: 'inbname' : redefinition 
+ERROR: 0:29: 'vAnon' : redefinition 
+ERROR: 0:43: 'origin_upper_left' : not supported with this profile: es
+ERROR: 0:43: 'pixel_center_integer' : not supported with this profile: es
+ERROR: 0:43: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
+ERROR: 0:47: 'depth layout qualifier' : not supported with this profile: es
+ERROR: 0:51: 'assign' :  l-value required "gl_FragDepth" (can't modify gl_FragDepth if using early_fragment_tests)
+ERROR: 0:79: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument
+ERROR: 0:124: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 0:125: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 0:126: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 0:152: 'imageAtomicMax' : only supported on image with format r32i or r32ui 
+ERROR: 0:153: 'imageAtomicMax' : only supported on image with format r32i or r32ui 
+ERROR: 0:154: 'imageAtomicExchange' : only supported on image with format r32f 
+ERROR: 0:157: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output 
+ERROR: 0:158: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output 
+ERROR: 0:159: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output 
+ERROR: 0:160: 'noperspective' : Reserved word. 
+ERROR: 0:160: 'noperspective' : not supported with this profile: es
+ERROR: 0:160: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output 
+ERROR: 0:165: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output 
+ERROR: 0:180: 'interpolateAtCentroid' : no matching overloaded function found 
+ERROR: 0:180: 'assign' :  cannot convert from ' const float' to ' temp mediump 3-component vector of float'
+ERROR: 0:182: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element 
+ERROR: 0:184: 'interpolateAtSample' : no matching overloaded function found 
+ERROR: 0:184: 'assign' :  cannot convert from ' const float' to ' temp mediump 3-component vector of float'
+ERROR: 0:186: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element 
+ERROR: 0:189: 'interpolateAtOffset' : no matching overloaded function found 
+ERROR: 0:189: 'assign' :  cannot convert from ' const float' to ' temp mediump 3-component vector of float'
+ERROR: 0:191: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element 
+ERROR: 0:192: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element 
+ERROR: 0:196: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element 
+ERROR: 0:197: 'outp' : undeclared identifier 
+ERROR: 0:197: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element 
+ERROR: 0:197: 'assign' :  cannot convert from ' global float' to ' temp mediump 4-component vector of float'
+ERROR: 0:217: 'blend equation' : can only apply to 'out' 
+ERROR: 0:218: 'blend equation' : can only apply to a standalone qualifier 
+ERROR: 0:219: 'blend equation' : can only apply to a standalone qualifier 
+ERROR: 0:220: 'blend equation' : can only apply to a standalone qualifier 
+ERROR: 0:221: 'blend equation' : can only apply to a standalone qualifier 
+ERROR: 0:222: 'blend equation' : can only apply to a standalone qualifier 
+ERROR: 0:223: 'blend_support' : unknown blend equation 
+ERROR: 0:225: 'fragment-shader array-of-array output' : not supported with this profile: es
+ERROR: 49 compilation errors.  No code generated.
+
+
+Shader version: 320
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+using early_fragment_tests
+using depth_any
+using blend_support_multiply blend_support_screen blend_support_overlay blend_support_darken blend_support_lighten blend_support_colordodge blend_support_colorburn blend_support_hardlight blend_support_softlight blend_support_difference blend_support_exclusion blend_support_hsl_hue blend_support_hsl_saturation blend_support_hsl_color blend_support_hsl_luminosity blend_support_all_equations
+ERROR: node is still EOpNull!
+0:35  Function Definition: fooIO( ( global void)
+0:35    Function Parameters: 
+0:37    Sequence
+0:37      Sequence
+0:37        move second child to first child ( temp mediump 4-component vector of float)
+0:37          'v' ( temp mediump 4-component vector of float)
+0:37          add ( temp mediump 4-component vector of float)
+0:37            v: direct index for structure ( in mediump 4-component vector of float)
+0:37              'inbinst' ( in block{ in mediump int a,  in mediump 4-component vector of float v,  in structure{ global mediump int b} s})
+0:37              Constant:
+0:37                1 (const int)
+0:37            vAnon: direct index for structure (layout( location=13) centroid in mediump 4-component vector of float)
+0:37              'anon@0' ( in block{layout( location=12) in mediump int aAnon, layout( location=13) centroid in mediump 4-component vector of float vAnon})
+0:37              Constant:
+0:37                1 (const uint)
+0:38      vector scale second child into first child ( temp mediump 4-component vector of float)
+0:38        'v' ( temp mediump 4-component vector of float)
+0:38        f: direct index for structure ( in mediump float)
+0:38          direct index ( temp block{ in mediump float f})
+0:38            'arrayedInst' ( in 4-element array of block{ in mediump float f})
+0:38            Constant:
+0:38              2 (const int)
+0:38          Constant:
+0:38            0 (const int)
+0:39      vector scale second child into first child ( temp mediump 4-component vector of float)
+0:39        'v' ( temp mediump 4-component vector of float)
+0:39        f: direct index for structure ( in mediump float)
+0:39          indirect index ( temp block{ in mediump float f})
+0:39            'arrayedInst' ( in 4-element array of block{ in mediump float f})
+0:39            'i' ( uniform mediump int)
+0:39          Constant:
+0:39            0 (const int)
+0:49  Function Definition: main( ( global void)
+0:49    Function Parameters: 
+0:51    Sequence
+0:51      move second child to first child ( temp highp float)
+0:51        'gl_FragDepth' ( gl_FragDepth highp float FragDepth)
+0:51        Constant:
+0:51          0.200000
+0:52      Sequence
+0:52        move second child to first child ( temp bool)
+0:52          'f' ( temp bool)
+0:52          'gl_FrontFacing' ( gl_FrontFacing bool Face)
+0:57  Function Definition: foo_GS( ( global void)
+0:57    Function Parameters: 
+0:59    Sequence
+0:59      Sequence
+0:59        move second child to first child ( temp highp int)
+0:59          'l' ( temp highp int)
+0:59          'gl_Layer' ( flat in highp int Layer)
+0:60      Sequence
+0:60        move second child to first child ( temp highp int)
+0:60          'p' ( temp highp int)
+0:60          'gl_PrimitiveID' ( flat in highp int PrimitiveID)
+0:73  Function Definition: pfoo( ( global void)
+0:73    Function Parameters: 
+0:?     Sequence
+0:76      move second child to first child ( temp mediump 2-component vector of float)
+0:76        'h' ( noContraction temp mediump 2-component vector of float)
+0:76        fma ( global mediump 2-component vector of float)
+0:76          'inf' ( smooth in mediump 2-component vector of float)
+0:76          'ing' ( smooth in mediump 2-component vector of float)
+0:76          'h' ( noContraction temp mediump 2-component vector of float)
+0:77      textureGatherOffset ( global lowp 4-component vector of float)
+0:77        direct index ( temp lowp sampler2D)
+0:77          'sArray' ( uniform 4-element array of lowp sampler2D)
+0:77          Constant:
+0:77            0 (const int)
+0:77        Constant:
+0:77          0.100000
+0:77          0.100000
+0:77        Convert float to int ( temp lowp 2-component vector of int)
+0:77          'inf' ( smooth in mediump 2-component vector of float)
+0:78      textureGatherOffsets ( global lowp 4-component vector of float, operation at mediump)
+0:78        direct index ( temp lowp sampler2D)
+0:78          'sArray' ( uniform 4-element array of lowp sampler2D)
+0:78          Constant:
+0:78            0 (const int)
+0:78        Constant:
+0:78          0.100000
+0:78          0.100000
+0:78        Constant:
+0:78          0 (const int)
+0:78          0 (const int)
+0:78          0 (const int)
+0:78          0 (const int)
+0:78          0 (const int)
+0:78          0 (const int)
+0:78          0 (const int)
+0:78          0 (const int)
+0:79      textureGatherOffsets ( global lowp 4-component vector of float, operation at mediump)
+0:79        direct index ( temp lowp sampler2D)
+0:79          'sArray' ( uniform 4-element array of lowp sampler2D)
+0:79          Constant:
+0:79            0 (const int)
+0:79        Constant:
+0:79          0.100000
+0:79          0.100000
+0:79        'offsets' ( uniform 4-element array of mediump 2-component vector of int)
+0:102  Function Definition: CAT( ( global void)
+0:102    Function Parameters: 
+0:104    Sequence
+0:104      Sequence
+0:104        move second child to first child ( temp highp 4-component vector of float)
+0:104          'b4' ( temp highp 4-component vector of float)
+0:104          texture ( global highp 4-component vector of float)
+0:104            'CA4' ( uniform highp samplerCubeArray)
+0:104            Constant:
+0:104              0.500000
+0:104              0.500000
+0:104              0.500000
+0:104              0.500000
+0:104            Constant:
+0:104              0.240000
+0:105      Sequence
+0:105        move second child to first child ( temp highp 4-component vector of int)
+0:105          'b6' ( temp highp 4-component vector of int)
+0:105          texture ( global highp 4-component vector of int)
+0:105            'CA6' ( uniform highp isamplerCubeArray)
+0:105            Constant:
+0:105              0.500000
+0:105              0.500000
+0:105              0.500000
+0:105              0.500000
+0:105            Constant:
+0:105              0.260000
+0:106      Sequence
+0:106        move second child to first child ( temp highp 4-component vector of uint)
+0:106          'b7' ( temp highp 4-component vector of uint)
+0:106          texture ( global highp 4-component vector of uint)
+0:106            'CA7' ( uniform highp usamplerCubeArray)
+0:106            Constant:
+0:106              0.500000
+0:106              0.500000
+0:106              0.500000
+0:106              0.500000
+0:106            Constant:
+0:106              0.270000
+0:109  Function Definition: goodSample( ( global void)
+0:109    Function Parameters: 
+0:111    Sequence
+0:111      Sequence
+0:111        move second child to first child ( temp lowp int)
+0:111          'a1' ( temp lowp int)
+0:111          'gl_SampleID' ( flat in lowp int SampleId)
+0:112      Sequence
+0:112        move second child to first child ( temp mediump 2-component vector of float)
+0:112          'a2' ( temp mediump 2-component vector of float)
+0:112          'gl_SamplePosition' ( smooth in mediump 2-component vector of float SamplePosition)
+0:113      Sequence
+0:113        move second child to first child ( temp highp int)
+0:113          'a3' ( temp highp int)
+0:113          direct index ( flat temp highp int SampleMaskIn)
+0:113            'gl_SampleMaskIn' ( flat in implicitly-sized array of highp int SampleMaskIn)
+0:113            Constant:
+0:113              0 (const int)
+0:114      move second child to first child ( temp highp int)
+0:114        direct index ( temp highp int SampleMaskIn)
+0:114          'gl_SampleMask' ( out implicitly-sized array of highp int SampleMaskIn)
+0:114          Constant:
+0:114            0 (const int)
+0:114        'a3' ( temp highp int)
+0:115      Sequence
+0:115        move second child to first child ( temp mediump int)
+0:115          'n1' ( temp mediump int)
+0:115          Constant:
+0:115            4 (const int)
+0:116      Sequence
+0:116        move second child to first child ( temp mediump int)
+0:116          'n2' ( temp mediump int)
+0:116          'gl_NumSamples' ( uniform lowp int)
+0:128  Function Definition: goodImageAtom( ( global void)
+0:128    Function Parameters: 
+0:?     Sequence
+0:134      imageAtomicAdd ( global highp int)
+0:134        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:134        'P' ( uniform mediump 2-component vector of int)
+0:134        'dati' ( temp mediump int)
+0:135      imageAtomicAdd ( global highp uint)
+0:135        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:135        'P' ( uniform mediump 2-component vector of int)
+0:135        'datu' ( temp mediump uint)
+0:136      imageAtomicMin ( global highp int)
+0:136        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:136        'P' ( uniform mediump 2-component vector of int)
+0:136        'dati' ( temp mediump int)
+0:137      imageAtomicMin ( global highp uint)
+0:137        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:137        'P' ( uniform mediump 2-component vector of int)
+0:137        'datu' ( temp mediump uint)
+0:138      imageAtomicMax ( global highp int)
+0:138        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:138        'P' ( uniform mediump 2-component vector of int)
+0:138        'dati' ( temp mediump int)
+0:139      imageAtomicMax ( global highp uint)
+0:139        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:139        'P' ( uniform mediump 2-component vector of int)
+0:139        'datu' ( temp mediump uint)
+0:140      imageAtomicAnd ( global highp int)
+0:140        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:140        'P' ( uniform mediump 2-component vector of int)
+0:140        'dati' ( temp mediump int)
+0:141      imageAtomicAnd ( global highp uint)
+0:141        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:141        'P' ( uniform mediump 2-component vector of int)
+0:141        'datu' ( temp mediump uint)
+0:142      imageAtomicOr ( global highp int)
+0:142        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:142        'P' ( uniform mediump 2-component vector of int)
+0:142        'dati' ( temp mediump int)
+0:143      imageAtomicOr ( global highp uint)
+0:143        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:143        'P' ( uniform mediump 2-component vector of int)
+0:143        'datu' ( temp mediump uint)
+0:144      imageAtomicXor ( global highp int)
+0:144        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:144        'P' ( uniform mediump 2-component vector of int)
+0:144        'dati' ( temp mediump int)
+0:145      imageAtomicXor ( global highp uint)
+0:145        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:145        'P' ( uniform mediump 2-component vector of int)
+0:145        'datu' ( temp mediump uint)
+0:146      imageAtomicExchange ( global highp int)
+0:146        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:146        'P' ( uniform mediump 2-component vector of int)
+0:146        'dati' ( temp mediump int)
+0:147      imageAtomicExchange ( global highp uint)
+0:147        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:147        'P' ( uniform mediump 2-component vector of int)
+0:147        'datu' ( temp mediump uint)
+0:148      imageAtomicExchange ( global highp float)
+0:148        'im2Df' (layout( r32f) uniform highp image2D)
+0:148        'P' ( uniform mediump 2-component vector of int)
+0:148        'datf' ( temp mediump float)
+0:149      imageAtomicCompSwap ( global highp int)
+0:149        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:149        'P' ( uniform mediump 2-component vector of int)
+0:149        Constant:
+0:149          3 (const int)
+0:149        'dati' ( temp mediump int)
+0:150      imageAtomicCompSwap ( global highp uint)
+0:150        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:150        'P' ( uniform mediump 2-component vector of int)
+0:150        Constant:
+0:150          5 (const uint)
+0:150        'datu' ( temp mediump uint)
+0:152      imageAtomicMax ( global highp int)
+0:152        'badIm2Di' (layout( rgba16i) uniform highp iimage2D)
+0:152        'P' ( uniform mediump 2-component vector of int)
+0:152        'dati' ( temp mediump int)
+0:153      imageAtomicMax ( global highp uint)
+0:153        'badIm2Du' (layout( rgba8ui) uniform highp uimage2D)
+0:153        'P' ( uniform mediump 2-component vector of int)
+0:153        'datu' ( temp mediump uint)
+0:154      imageAtomicExchange ( global highp float)
+0:154        'badIm2Df' (layout( rgba32f) uniform highp image2D)
+0:154        'P' ( uniform mediump 2-component vector of int)
+0:154        'datf' ( temp mediump float)
+0:169  Function Definition: interp( ( global void)
+0:169    Function Parameters: 
+0:?     Sequence
+0:176      move second child to first child ( temp mediump 2-component vector of float)
+0:176        'res2' ( temp mediump 2-component vector of float)
+0:176        interpolateAtCentroid ( global mediump 2-component vector of float)
+0:176          'colorfc' ( centroid flat in mediump 2-component vector of float)
+0:177      move second child to first child ( temp mediump 4-component vector of float)
+0:177        'res4' ( temp mediump 4-component vector of float)
+0:177        interpolateAtCentroid ( global mediump 4-component vector of float)
+0:177          'colorSampIn' ( smooth sample in mediump 4-component vector of float)
+0:178      move second child to first child ( temp mediump 4-component vector of float)
+0:178        'res4' ( temp mediump 4-component vector of float)
+0:178        interpolateAtCentroid ( global mediump 4-component vector of float)
+0:178          'colorfsi' ( flat sample in mediump 4-component vector of float)
+0:179      move second child to first child ( temp mediump float)
+0:179        'res' ( temp mediump float)
+0:179        interpolateAtCentroid ( global mediump float)
+0:179          'scalarIn' ( smooth in mediump float)
+0:180      'res3' ( temp mediump 3-component vector of float)
+0:181      move second child to first child ( temp mediump 3-component vector of float)
+0:181        'res3' ( temp mediump 3-component vector of float)
+0:181        interpolateAtCentroid ( global mediump 3-component vector of float)
+0:181          direct index ( smooth sample temp mediump 3-component vector of float)
+0:181            'sampInArray' ( smooth sample in 4-element array of mediump 3-component vector of float)
+0:181            Constant:
+0:181              2 (const int)
+0:182      move second child to first child ( temp mediump 2-component vector of float)
+0:182        'res2' ( temp mediump 2-component vector of float)
+0:182        interpolateAtCentroid ( global mediump 2-component vector of float)
+0:182          vector swizzle ( temp mediump 2-component vector of float)
+0:182            direct index ( smooth sample temp mediump 3-component vector of float)
+0:182              'sampInArray' ( smooth sample in 4-element array of mediump 3-component vector of float)
+0:182              Constant:
+0:182                2 (const int)
+0:182            Sequence
+0:182              Constant:
+0:182                0 (const int)
+0:182              Constant:
+0:182                1 (const int)
+0:184      'res3' ( temp mediump 3-component vector of float)
+0:185      move second child to first child ( temp mediump 3-component vector of float)
+0:185        'res3' ( temp mediump 3-component vector of float)
+0:185        interpolateAtSample ( global mediump 3-component vector of float)
+0:185          indirect index ( smooth sample temp mediump 3-component vector of float)
+0:185            'sampInArray' ( smooth sample in 4-element array of mediump 3-component vector of float)
+0:185            'i' ( uniform mediump int)
+0:185          Constant:
+0:185            0 (const int)
+0:186      move second child to first child ( temp mediump 2-component vector of float)
+0:186        'res2' ( temp mediump 2-component vector of float)
+0:186        interpolateAtSample ( global mediump 2-component vector of float)
+0:186          vector swizzle ( temp mediump 2-component vector of float)
+0:186            direct index ( smooth sample temp mediump 3-component vector of float)
+0:186              'sampInArray' ( smooth sample in 4-element array of mediump 3-component vector of float)
+0:186              Constant:
+0:186                2 (const int)
+0:186            Sequence
+0:186              Constant:
+0:186                0 (const int)
+0:186              Constant:
+0:186                1 (const int)
+0:186          Constant:
+0:186            2 (const int)
+0:187      move second child to first child ( temp mediump float)
+0:187        'res' ( temp mediump float)
+0:187        interpolateAtSample ( global mediump float)
+0:187          'scalarIn' ( smooth in mediump float)
+0:187          Constant:
+0:187            1 (const int)
+0:189      'res3' ( temp mediump 3-component vector of float)
+0:190      move second child to first child ( temp mediump 3-component vector of float)
+0:190        'res3' ( temp mediump 3-component vector of float)
+0:190        interpolateAtOffset ( global mediump 3-component vector of float)
+0:190          direct index ( smooth sample temp mediump 3-component vector of float)
+0:190            'sampInArray' ( smooth sample in 4-element array of mediump 3-component vector of float)
+0:190            Constant:
+0:190              2 (const int)
+0:190          Constant:
+0:190            0.200000
+0:190            0.200000
+0:191      move second child to first child ( temp mediump 2-component vector of float)
+0:191        'res2' ( temp mediump 2-component vector of float)
+0:191        interpolateAtOffset ( global mediump 2-component vector of float)
+0:191          vector swizzle ( temp mediump 2-component vector of float)
+0:191            direct index ( smooth sample temp mediump 3-component vector of float)
+0:191              'sampInArray' ( smooth sample in 4-element array of mediump 3-component vector of float)
+0:191              Constant:
+0:191                2 (const int)
+0:191            Sequence
+0:191              Constant:
+0:191                0 (const int)
+0:191              Constant:
+0:191                1 (const int)
+0:191          Constant:
+0:191            0.200000
+0:191            0.200000
+0:192      move second child to first child ( temp mediump float)
+0:192        'res' ( temp mediump float)
+0:192        interpolateAtOffset ( global mediump float)
+0:192          add ( temp mediump float)
+0:192            'scalarIn' ( smooth in mediump float)
+0:192            'scalarIn' ( smooth in mediump float)
+0:192          Constant:
+0:192            0.200000
+0:192            0.200000
+0:193      move second child to first child ( temp mediump float)
+0:193        'res' ( temp mediump float)
+0:193        interpolateAtOffset ( global mediump float)
+0:193          'scalarIn' ( smooth in mediump float)
+0:193          Constant:
+0:193            0.200000
+0:193            0.200000
+0:196      move second child to first child ( temp mediump float)
+0:196        'res' ( temp mediump float)
+0:196        interpolateAtCentroid ( global mediump float)
+0:196          'f' ( temp mediump float)
+0:197      'res4' ( temp mediump 4-component vector of float)
+0:221  Function Definition: blendFoo( ( temp void)
+0:221    Function Parameters: 
+0:222  Function Definition: blendFoo(vf3; ( global void)
+0:222    Function Parameters: 
+0:222      'v' ( in mediump 3-component vector of float)
+0:?   Linker Objects
+0:?     'outbinst' ( out block{ out mediump int a})
+0:?     'inbinst' ( in block{ in mediump int a,  in mediump 4-component vector of float v,  in structure{ global mediump int b} s})
+0:?     'anon@0' ( in block{layout( location=12) in mediump int aAnon, layout( location=13) centroid in mediump 4-component vector of float vAnon})
+0:?     'aliased' (layout( location=13) smooth in mediump 4-component vector of float)
+0:?     'arrayedInst' ( in 4-element array of block{ in mediump float f})
+0:?     'i' ( uniform mediump int)
+0:?     'gl_FragCoord' ( gl_FragCoord highp 4-component vector of float FragCoord)
+0:?     'gl_FragDepth' ( gl_FragDepth highp float FragDepth)
+0:?     'inf' ( smooth in mediump 2-component vector of float)
+0:?     'ing' ( smooth in mediump 2-component vector of float)
+0:?     'offsets' ( uniform 4-element array of mediump 2-component vector of int)
+0:?     'sArray' ( uniform 4-element array of lowp sampler2D)
+0:?     'sIndex' ( uniform mediump int)
+0:?     'auArray' (layout( binding=0 offset=0) uniform 2-element array of highp atomic_uint)
+0:?     'ubInst' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform mediump int i})
+0:?     'bbInst' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer mediump int i})
+0:?     'iArray' ( writeonly uniform 5-element array of highp image2D)
+0:?     'constOffsets' ( const 4-element array of mediump 2-component vector of int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?     'CA1' ( writeonly uniform highp imageCubeArray)
+0:?     'CA2' ( writeonly uniform highp iimageCubeArray)
+0:?     'CA3' ( writeonly uniform highp uimageCubeArray)
+0:?     'CA4' ( uniform highp samplerCubeArray)
+0:?     'CA5' ( uniform highp samplerCubeArrayShadow)
+0:?     'CA6' ( uniform highp isamplerCubeArray)
+0:?     'CA7' ( uniform highp usamplerCubeArray)
+0:?     'gl_SampleMaskIn' ( flat in implicitly-sized array of highp int SampleMaskIn)
+0:?     'gl_SampleMask' ( out implicitly-sized array of highp int SampleMaskIn)
+0:?     'im2Df' (layout( r32f) uniform highp image2D)
+0:?     'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:?     'im2Di' (layout( r32i) uniform highp iimage2D)
+0:?     'P' ( uniform mediump 2-component vector of int)
+0:?     'badIm2Df' (layout( rgba32f) uniform highp image2D)
+0:?     'badIm2Du' (layout( rgba8ui) uniform highp uimage2D)
+0:?     'badIm2Di' (layout( rgba16i) uniform highp iimage2D)
+0:?     'colorCentroidBad' ( centroid out mediump 4-component vector of float)
+0:?     'colorBadFlat' ( flat out mediump 4-component vector of float)
+0:?     'colorBadSmooth' ( smooth out mediump 4-component vector of float)
+0:?     'colorBadNo' ( noperspective out mediump 4-component vector of float)
+0:?     'colorfc' ( centroid flat in mediump 2-component vector of float)
+0:?     'scalarIn' ( smooth in mediump float)
+0:?     'colorSampIn' ( smooth sample in mediump 4-component vector of float)
+0:?     'colorSampleBad' ( sample out mediump 4-component vector of float)
+0:?     'colorfsi' ( flat sample in mediump 4-component vector of float)
+0:?     'sampInArray' ( smooth sample in 4-element array of mediump 3-component vector of float)
+0:?     'badout' ( out mediump 4-component vector of float)
+0:?     'outAA' ( out 2-element array of 2-element array of mediump 4-component vector of float)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: when more than one fragment shader output, all must have location qualifiers
+
+Shader version: 320
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+using early_fragment_tests
+using depth_any
+using blend_support_multiply blend_support_screen blend_support_overlay blend_support_darken blend_support_lighten blend_support_colordodge blend_support_colorburn blend_support_hardlight blend_support_softlight blend_support_difference blend_support_exclusion blend_support_hsl_hue blend_support_hsl_saturation blend_support_hsl_color blend_support_hsl_luminosity blend_support_all_equations
+ERROR: node is still EOpNull!
+0:49  Function Definition: main( ( global void)
+0:49    Function Parameters: 
+0:51    Sequence
+0:51      move second child to first child ( temp highp float)
+0:51        'gl_FragDepth' ( gl_FragDepth highp float FragDepth)
+0:51        Constant:
+0:51          0.200000
+0:52      Sequence
+0:52        move second child to first child ( temp bool)
+0:52          'f' ( temp bool)
+0:52          'gl_FrontFacing' ( gl_FrontFacing bool Face)
+0:?   Linker Objects
+0:?     'outbinst' ( out block{ out mediump int a})
+0:?     'inbinst' ( in block{ in mediump int a,  in mediump 4-component vector of float v,  in structure{ global mediump int b} s})
+0:?     'anon@0' ( in block{layout( location=12) in mediump int aAnon, layout( location=13) centroid in mediump 4-component vector of float vAnon})
+0:?     'aliased' (layout( location=13) smooth in mediump 4-component vector of float)
+0:?     'arrayedInst' ( in 4-element array of block{ in mediump float f})
+0:?     'i' ( uniform mediump int)
+0:?     'gl_FragCoord' ( gl_FragCoord highp 4-component vector of float FragCoord)
+0:?     'gl_FragDepth' ( gl_FragDepth highp float FragDepth)
+0:?     'inf' ( smooth in mediump 2-component vector of float)
+0:?     'ing' ( smooth in mediump 2-component vector of float)
+0:?     'offsets' ( uniform 4-element array of mediump 2-component vector of int)
+0:?     'sArray' ( uniform 4-element array of lowp sampler2D)
+0:?     'sIndex' ( uniform mediump int)
+0:?     'auArray' (layout( binding=0 offset=0) uniform 2-element array of highp atomic_uint)
+0:?     'ubInst' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform mediump int i})
+0:?     'bbInst' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer mediump int i})
+0:?     'iArray' ( writeonly uniform 5-element array of highp image2D)
+0:?     'constOffsets' ( const 4-element array of mediump 2-component vector of int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?     'CA1' ( writeonly uniform highp imageCubeArray)
+0:?     'CA2' ( writeonly uniform highp iimageCubeArray)
+0:?     'CA3' ( writeonly uniform highp uimageCubeArray)
+0:?     'CA4' ( uniform highp samplerCubeArray)
+0:?     'CA5' ( uniform highp samplerCubeArrayShadow)
+0:?     'CA6' ( uniform highp isamplerCubeArray)
+0:?     'CA7' ( uniform highp usamplerCubeArray)
+0:?     'gl_SampleMaskIn' ( flat in 1-element array of highp int SampleMaskIn)
+0:?     'gl_SampleMask' ( out 1-element array of highp int SampleMaskIn)
+0:?     'im2Df' (layout( r32f) uniform highp image2D)
+0:?     'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:?     'im2Di' (layout( r32i) uniform highp iimage2D)
+0:?     'P' ( uniform mediump 2-component vector of int)
+0:?     'badIm2Df' (layout( rgba32f) uniform highp image2D)
+0:?     'badIm2Du' (layout( rgba8ui) uniform highp uimage2D)
+0:?     'badIm2Di' (layout( rgba16i) uniform highp iimage2D)
+0:?     'colorCentroidBad' ( centroid out mediump 4-component vector of float)
+0:?     'colorBadFlat' ( flat out mediump 4-component vector of float)
+0:?     'colorBadSmooth' ( smooth out mediump 4-component vector of float)
+0:?     'colorBadNo' ( noperspective out mediump 4-component vector of float)
+0:?     'colorfc' ( centroid flat in mediump 2-component vector of float)
+0:?     'scalarIn' ( smooth in mediump float)
+0:?     'colorSampIn' ( smooth sample in mediump 4-component vector of float)
+0:?     'colorSampleBad' ( sample out mediump 4-component vector of float)
+0:?     'colorfsi' ( flat sample in mediump 4-component vector of float)
+0:?     'sampInArray' ( smooth sample in 4-element array of mediump 3-component vector of float)
+0:?     'badout' ( out mediump 4-component vector of float)
+0:?     'outAA' ( out 2-element array of 2-element array of mediump 4-component vector of float)
+

+ 251 - 0
3rdparty/glslang/Test/baseResults/320.geom.out

@@ -0,0 +1,251 @@
+320.geom
+ERROR: 0:19: 'fromVertex' : block instance name redefinition 
+ERROR: 0:23: 'fromVertex' : redefinition 
+ERROR: 0:25: 'fooC' : block instance name redefinition 
+ERROR: 0:33: 'EmitStreamVertex' : no matching overloaded function found 
+ERROR: 0:34: 'EndStreamPrimitive' : no matching overloaded function found 
+ERROR: 0:37: 'gl_ClipDistance' : undeclared identifier 
+ERROR: 0:37: 'gl_ClipDistance' :  left of '[' is not of type array, matrix, or vector  
+ERROR: 0:38: 'gl_ClipDistance' : no such field in structure 
+ERROR: 0:38: 'expression' :  left of '[' is not of type array, matrix, or vector  
+ERROR: 0:37: 'assign' :  l-value required (can't modify a const)
+ERROR: 0:45: 'selecting output stream' : not supported with this profile: es
+ERROR: 0:52: 'max_vertices' : too large, must be less than gl_MaxGeometryOutputVertices 
+ERROR: 0:52: 'max_vertices' : cannot change previously set layout value 
+ERROR: 0:53: 'max_vertices' : can only apply to a standalone qualifier 
+ERROR: 0:58: 'points' : cannot change previously set output primitive 
+ERROR: 0:59: 'points' : cannot change previously set output primitive 
+ERROR: 0:60: 'triangle_strip' : cannot apply to input 
+ERROR: 0:61: 'triangle_strip' : cannot apply to: uniform
+ERROR: 0:62: 'triangle_strip' : can only apply to a standalone qualifier 
+ERROR: 0:63: 'triangle_strip' : can only apply to a standalone qualifier 
+ERROR: 0:64: 'invocations' : can only apply to a standalone qualifier 
+ERROR: 0:66: 'invocations' : can only apply to a standalone qualifier 
+ERROR: 0:67: 'max_vertices' : can only apply to a standalone qualifier 
+ERROR: 0:68: 'triangle_strip' : can only apply to a standalone qualifier 
+ERROR: 0:71: 'lines' : cannot apply to 'out' 
+ERROR: 0:73: 'triangles' : cannot change previously set input primitive 
+ERROR: 0:74: 'triangles_adjacency' : cannot change previously set input primitive 
+ERROR: 0:106: 'gl_ViewportIndex' : undeclared identifier 
+ERROR: 0:107: 'gl_MaxViewports' : undeclared identifier 
+ERROR: 0:113: 'lines_adjacency' : inconsistent input primitive for array size of explArrayBad
+ERROR: 0:114: 'in' : type must be an array: nonArrayed
+ERROR: 0:122: 'component' : not supported with this profile: es
+ERROR: 0:126: 'gl_MaxGeometryVaryingComponents' : undeclared identifier 
+ERROR: 0:127: 'gl_VerticesIn' : undeclared identifier 
+ERROR: 0:132: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_geometry_point_size
+GL_OES_geometry_point_size
+ERROR: 0:133: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_geometry_point_size
+GL_OES_geometry_point_size
+ERROR: 36 compilation errors.  No code generated.
+
+
+Shader version: 320
+invocations = 4
+max_vertices = 200
+input primitive = lines_adjacency
+output primitive = triangle_strip
+ERROR: node is still EOpNull!
+0:29  Function Definition: main( ( global void)
+0:29    Function Parameters: 
+0:31    Sequence
+0:31      EmitVertex ( global void)
+0:32      EndPrimitive ( global void)
+0:33      Constant:
+0:33        0.000000
+0:34      Constant:
+0:34        0.000000
+0:36      move second child to first child ( temp mediump 3-component vector of float)
+0:36        color: direct index for structure (layout( stream=0) out mediump 3-component vector of float)
+0:36          'anon@0' (layout( stream=0) out block{layout( stream=0) out mediump 3-component vector of float color})
+0:36          Constant:
+0:36            0 (const uint)
+0:36        color: direct index for structure ( in mediump 3-component vector of float)
+0:36          direct index ( temp block{ in mediump 3-component vector of float color})
+0:36            'fromV' ( in 4-element array of block{ in mediump 3-component vector of float color})
+0:36            Constant:
+0:36              0 (const int)
+0:36          Constant:
+0:36            0 (const int)
+0:37      move second child to first child ( temp float)
+0:37        Constant:
+0:37          0.000000
+0:38        Constant:
+0:38          0.000000
+0:39      move second child to first child ( temp highp 4-component vector of float)
+0:39        gl_Position: direct index for structure (layout( stream=0) gl_Position highp 4-component vector of float Position)
+0:39          'anon@1' (layout( stream=0) out block{layout( stream=0) gl_Position highp 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize highp float PointSize gl_PointSize})
+0:39          Constant:
+0:39            0 (const uint)
+0:39        gl_Position: direct index for structure ( in highp 4-component vector of float Position)
+0:39          direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize})
+0:39            'gl_in' ( in 4-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize})
+0:39            Constant:
+0:39              0 (const int)
+0:39          Constant:
+0:39            0 (const int)
+0:41      move second child to first child ( temp highp int)
+0:41        'gl_PrimitiveID' (layout( stream=0) out highp int PrimitiveID)
+0:41        'gl_PrimitiveIDIn' ( in highp int PrimitiveID)
+0:42      move second child to first child ( temp highp int)
+0:42        'gl_Layer' (layout( stream=0) out highp int Layer)
+0:42        Constant:
+0:42          2 (const int)
+0:53  Function Definition: foo(i1; ( global void)
+0:53    Function Parameters: 
+0:53      'a' ( in highp int)
+0:55    Sequence
+0:55      move second child to first child ( temp mediump 4-component vector of float)
+0:55        a: direct index for structure (layout( stream=0) out mediump 4-component vector of float)
+0:55          'ouuaa6' (layout( stream=0) out block{layout( stream=0) out mediump 4-component vector of float a})
+0:55          Constant:
+0:55            0 (const int)
+0:55        Constant:
+0:55          1.000000
+0:55          1.000000
+0:55          1.000000
+0:55          1.000000
+0:104  Function Definition: fooe1( ( global void)
+0:104    Function Parameters: 
+0:106    Sequence
+0:106      'gl_ViewportIndex' ( temp float)
+0:107      'gl_MaxViewports' ( temp float)
+0:108      Constant:
+0:108        4 (const int)
+0:109      Sequence
+0:109        move second child to first child ( temp highp int)
+0:109          'inv' ( temp highp int)
+0:109          'gl_InvocationID' ( in highp int InvocationID)
+0:124  Function Definition: notHere( ( global void)
+0:124    Function Parameters: 
+0:126    Sequence
+0:126      'gl_MaxGeometryVaryingComponents' ( temp float)
+0:127      'gl_VerticesIn' ( temp float)
+0:130  Function Definition: pointSize2( ( global void)
+0:130    Function Parameters: 
+0:132    Sequence
+0:132      Sequence
+0:132        move second child to first child ( temp highp float)
+0:132          'ps' ( temp highp float)
+0:132          gl_PointSize: direct index for structure ( in highp float PointSize)
+0:132            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize})
+0:132              'gl_in' ( in 4-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize})
+0:132              Constant:
+0:132                3 (const int)
+0:132            Constant:
+0:132              1 (const int)
+0:133      move second child to first child ( temp highp float)
+0:133        gl_PointSize: direct index for structure (layout( stream=0) gl_PointSize highp float PointSize)
+0:133          'anon@1' (layout( stream=0) out block{layout( stream=0) gl_Position highp 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize highp float PointSize gl_PointSize})
+0:133          Constant:
+0:133            1 (const uint)
+0:133        'ps' ( temp highp float)
+0:?   Linker Objects
+0:?     'fromV' ( in 4-element array of block{ in mediump 3-component vector of float color})
+0:?     'nonBlockUnsized' ( in 4-element array of mediump 4-component vector of float)
+0:?     'toF' (layout( stream=0) out block{layout( stream=0) out mediump 3-component vector of float color})
+0:?     'anon@0' (layout( stream=0) out block{layout( stream=0) out mediump 3-component vector of float color})
+0:?     'gl_in' ( in 4-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize})
+0:?     'ov4' (layout( stream=4) out mediump 4-component vector of float)
+0:?     'ouuaa6' (layout( stream=0) out block{layout( stream=0) out mediump 4-component vector of float a})
+0:?     'badv4' (layout( stream=0) out mediump 4-component vector of float)
+0:?     'bad2v4' ( in 4-element array of mediump 4-component vector of float)
+0:?     'anon@1' (layout( stream=0) out block{layout( stream=0) out highp int a})
+0:?     'outbi' (layout( stream=0) out block{layout( stream=0) out highp int a, layout( stream=0) out highp int b, layout( stream=0) out highp int c})
+0:?     'insn' ( in 4-element array of block{ in highp int a15})
+0:?     'anon@2' (layout( stream=0) out block{layout( stream=0) out mediump float f15})
+0:?     'anon@3' (layout( column_major shared) uniform block{layout( column_major shared) uniform bool b15})
+0:?     'summ' ( const highp int)
+0:?       2752 (const int)
+0:?     'explArray' ( in 4-element array of mediump 4-component vector of float)
+0:?     'explArrayBad' ( in 5-element array of mediump 4-component vector of float)
+0:?     'nonArrayed' ( in mediump 4-component vector of float)
+0:?     'myColor1' (layout( stream=0) flat out mediump 3-component vector of float)
+0:?     'myColor2' (layout( stream=0) centroid out mediump 3-component vector of float)
+0:?     'centr' ( centroid in 4-element array of mediump 3-component vector of float)
+0:?     'perSampleColor' (layout( stream=0) sample out mediump 4-component vector of float)
+0:?     'comp' (layout( location=7 component=2) in 4-element array of mediump float)
+
+
+Linked geometry stage:
+
+
+Shader version: 320
+invocations = 4
+max_vertices = 200
+input primitive = lines_adjacency
+output primitive = triangle_strip
+ERROR: node is still EOpNull!
+0:29  Function Definition: main( ( global void)
+0:29    Function Parameters: 
+0:31    Sequence
+0:31      EmitVertex ( global void)
+0:32      EndPrimitive ( global void)
+0:33      Constant:
+0:33        0.000000
+0:34      Constant:
+0:34        0.000000
+0:36      move second child to first child ( temp mediump 3-component vector of float)
+0:36        color: direct index for structure (layout( stream=0) out mediump 3-component vector of float)
+0:36          'anon@0' (layout( stream=0) out block{layout( stream=0) out mediump 3-component vector of float color})
+0:36          Constant:
+0:36            0 (const uint)
+0:36        color: direct index for structure ( in mediump 3-component vector of float)
+0:36          direct index ( temp block{ in mediump 3-component vector of float color})
+0:36            'fromV' ( in 4-element array of block{ in mediump 3-component vector of float color})
+0:36            Constant:
+0:36              0 (const int)
+0:36          Constant:
+0:36            0 (const int)
+0:37      move second child to first child ( temp float)
+0:37        Constant:
+0:37          0.000000
+0:38        Constant:
+0:38          0.000000
+0:39      move second child to first child ( temp highp 4-component vector of float)
+0:39        gl_Position: direct index for structure (layout( stream=0) gl_Position highp 4-component vector of float Position)
+0:39          'anon@1' (layout( stream=0) out block{layout( stream=0) gl_Position highp 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize highp float PointSize gl_PointSize})
+0:39          Constant:
+0:39            0 (const uint)
+0:39        gl_Position: direct index for structure ( in highp 4-component vector of float Position)
+0:39          direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize})
+0:39            'gl_in' ( in 4-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize})
+0:39            Constant:
+0:39              0 (const int)
+0:39          Constant:
+0:39            0 (const int)
+0:41      move second child to first child ( temp highp int)
+0:41        'gl_PrimitiveID' (layout( stream=0) out highp int PrimitiveID)
+0:41        'gl_PrimitiveIDIn' ( in highp int PrimitiveID)
+0:42      move second child to first child ( temp highp int)
+0:42        'gl_Layer' (layout( stream=0) out highp int Layer)
+0:42        Constant:
+0:42          2 (const int)
+0:?   Linker Objects
+0:?     'fromV' ( in 4-element array of block{ in mediump 3-component vector of float color})
+0:?     'nonBlockUnsized' ( in 4-element array of mediump 4-component vector of float)
+0:?     'toF' (layout( stream=0) out block{layout( stream=0) out mediump 3-component vector of float color})
+0:?     'anon@0' (layout( stream=0) out block{layout( stream=0) out mediump 3-component vector of float color})
+0:?     'gl_in' ( in 4-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize})
+0:?     'ov4' (layout( stream=4) out mediump 4-component vector of float)
+0:?     'ouuaa6' (layout( stream=0) out block{layout( stream=0) out mediump 4-component vector of float a})
+0:?     'badv4' (layout( stream=0) out mediump 4-component vector of float)
+0:?     'bad2v4' ( in 4-element array of mediump 4-component vector of float)
+0:?     'anon@1' (layout( stream=0) out block{layout( stream=0) out highp int a})
+0:?     'outbi' (layout( stream=0) out block{layout( stream=0) out highp int a, layout( stream=0) out highp int b, layout( stream=0) out highp int c})
+0:?     'insn' ( in 4-element array of block{ in highp int a15})
+0:?     'anon@2' (layout( stream=0) out block{layout( stream=0) out mediump float f15})
+0:?     'anon@3' (layout( column_major shared) uniform block{layout( column_major shared) uniform bool b15})
+0:?     'summ' ( const highp int)
+0:?       2752 (const int)
+0:?     'explArray' ( in 4-element array of mediump 4-component vector of float)
+0:?     'explArrayBad' ( in 5-element array of mediump 4-component vector of float)
+0:?     'nonArrayed' ( in mediump 4-component vector of float)
+0:?     'myColor1' (layout( stream=0) flat out mediump 3-component vector of float)
+0:?     'myColor2' (layout( stream=0) centroid out mediump 3-component vector of float)
+0:?     'centr' ( centroid in 4-element array of mediump 3-component vector of float)
+0:?     'perSampleColor' (layout( stream=0) sample out mediump 4-component vector of float)
+0:?     'comp' (layout( location=7 component=2) in 4-element array of mediump float)
+

+ 516 - 0
3rdparty/glslang/Test/baseResults/320.tesc.out

@@ -0,0 +1,516 @@
+320.tesc
+ERROR: 0:6: 'quads' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) 
+ERROR: 0:7: 'ccw' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) 
+ERROR: 0:8: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) 
+ERROR: 0:10: 'patch' : can only use on output in tessellation-control shader 
+ERROR: 0:24: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:25: 'gl_ClipDistance' : no such field in structure 
+ERROR: 0:25: 'expression' :  left of '[' is not of type array, matrix, or vector  
+ERROR: 0:32: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:33: 'gl_ClipDistance' : no such field in structure 
+ERROR: 0:33: 'expression' :  left of '[' is not of type array, matrix, or vector  
+ERROR: 0:33: 'assign' :  l-value required (can't modify a const)
+ERROR: 0:39: '' : tessellation control barrier() cannot be placed within flow control 
+ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control 
+ERROR: 0:46: '' : tessellation control barrier() cannot be placed within flow control 
+ERROR: 0:51: '' : tessellation control barrier() cannot be placed within flow control 
+ERROR: 0:54: '' : tessellation control barrier() cannot be placed within flow control 
+ERROR: 0:61: '' : tessellation control barrier() cannot be placed after a return from main() 
+ERROR: 0:64: 'vertices' : can only apply to 'out' 
+ERROR: 0:65: 'vertices' : cannot change previously set layout value 
+ERROR: 0:69: '[' :  array index out of range '4'
+ERROR: 0:71: '' : tessellation control barrier() must be in main() 
+ERROR: 0:74: 'in' : type must be an array: ina
+ERROR: 0:76: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized 
+ERROR: 0:78: '' : array size required 
+ERROR: 0:84: 'location' : overlapping use of location 4
+ERROR: 0:88: 'location' : overlapping use of location 4
+ERROR: 0:98: 'vertices' : can only apply to a standalone qualifier 
+ERROR: 0:99: 'vertices' : inconsistent output number of vertices for array size of misSized
+ERROR: 0:104: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:105: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:123: '[' :  array index out of range '2'
+ERROR: 0:126: '' : array size required 
+ERROR: 0:142: '[]' : tessellation-control per-vertex output l-value must be indexed with gl_InvocationID 
+ERROR: 0:143: '[]' : tessellation-control per-vertex output l-value must be indexed with gl_InvocationID 
+ERROR: 0:146: '[]' : tessellation-control per-vertex output l-value must be indexed with gl_InvocationID 
+ERROR: 35 compilation errors.  No code generated.
+
+
+Shader version: 320
+Requested GL_ARB_separate_shader_objects
+vertices = 4
+ERROR: node is still EOpNull!
+0:13  Function Definition: main( ( global void)
+0:13    Function Parameters: 
+0:15    Sequence
+0:15      Barrier ( global void)
+0:17      Sequence
+0:17        move second child to first child ( temp highp int)
+0:17          'a' ( temp highp int)
+0:17          Constant:
+0:17            5392 (const int)
+0:23      Sequence
+0:23        move second child to first child ( temp highp 4-component vector of float)
+0:23          'p' ( temp highp 4-component vector of float)
+0:23          gl_Position: direct index for structure ( in highp 4-component vector of float Position)
+0:23            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:23              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:23              Constant:
+0:23                1 (const int)
+0:23            Constant:
+0:23              0 (const int)
+0:24      Sequence
+0:24        move second child to first child ( temp highp float)
+0:24          'ps' ( temp highp float)
+0:24          gl_PointSize: direct index for structure ( in highp float PointSize)
+0:24            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:24              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:24              Constant:
+0:24                1 (const int)
+0:24            Constant:
+0:24              1 (const int)
+0:25      Sequence
+0:25        move second child to first child ( temp highp float)
+0:25          'cd' ( temp highp float)
+0:25          Constant:
+0:25            0.000000
+0:27      Sequence
+0:27        move second child to first child ( temp highp int)
+0:27          'pvi' ( temp highp int)
+0:27          'gl_PatchVerticesIn' ( in highp int PatchVertices)
+0:28      Sequence
+0:28        move second child to first child ( temp highp int)
+0:28          'pid' ( temp highp int)
+0:28          'gl_PrimitiveID' ( in highp int PrimitiveID)
+0:29      Sequence
+0:29        move second child to first child ( temp highp int)
+0:29          'iid' ( temp highp int)
+0:29          'gl_InvocationID' ( in highp int InvocationID)
+0:31      move second child to first child ( temp highp 4-component vector of float)
+0:31        gl_Position: direct index for structure ( out highp 4-component vector of float Position)
+0:31          indirect index ( temp block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:31            'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:31            'gl_InvocationID' ( in highp int InvocationID)
+0:31          Constant:
+0:31            0 (const int)
+0:31        'p' ( temp highp 4-component vector of float)
+0:32      move second child to first child ( temp highp float)
+0:32        gl_PointSize: direct index for structure ( out highp float PointSize)
+0:32          indirect index ( temp block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:32            'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:32            'gl_InvocationID' ( in highp int InvocationID)
+0:32          Constant:
+0:32            1 (const int)
+0:32        'ps' ( temp highp float)
+0:33      move second child to first child ( temp highp float)
+0:33        Constant:
+0:33          0.000000
+0:33        'cd' ( temp highp float)
+0:35      move second child to first child ( temp highp float)
+0:35        direct index ( patch temp highp float TessLevelOuter)
+0:35          'gl_TessLevelOuter' ( patch out 4-element array of highp float TessLevelOuter)
+0:35          Constant:
+0:35            3 (const int)
+0:35        Constant:
+0:35          3.200000
+0:36      move second child to first child ( temp highp float)
+0:36        direct index ( patch temp highp float TessLevelInner)
+0:36          'gl_TessLevelInner' ( patch out 2-element array of highp float TessLevelInner)
+0:36          Constant:
+0:36            1 (const int)
+0:36        Constant:
+0:36          1.300000
+0:38      Test condition and select ( temp void)
+0:38        Condition
+0:38        Compare Greater Than ( temp bool)
+0:38          'a' ( temp highp int)
+0:38          Constant:
+0:38            10 (const int)
+0:38        true case
+0:39        Barrier ( global void)
+0:38        false case
+0:41        Barrier ( global void)
+0:43      Barrier ( global void)
+0:47      Loop with condition not tested first
+0:47        Loop Condition
+0:47        Compare Greater Than ( temp bool)
+0:47          'a' ( temp highp int)
+0:47          Constant:
+0:47            10 (const int)
+0:47        Loop Body
+0:46        Sequence
+0:46          Barrier ( global void)
+0:49      switch
+0:49      condition
+0:49        'a' ( temp highp int)
+0:49      body
+0:49        Sequence
+0:50          default: 
+0:?           Sequence
+0:51            Barrier ( global void)
+0:52            Branch: Break
+0:54      Test condition and select ( temp highp int)
+0:54        Condition
+0:54        Compare Less Than ( temp bool)
+0:54          'a' ( temp highp int)
+0:54          Constant:
+0:54            12 (const int)
+0:54        true case
+0:54        'a' ( temp highp int)
+0:54        false case
+0:54        Comma ( temp highp int)
+0:54          Barrier ( global void)
+0:54          'a' ( temp highp int)
+0:56      Sequence
+0:56        Barrier ( global void)
+0:59      Branch: Return
+0:61      Barrier ( global void)
+0:67  Function Definition: foo( ( global void)
+0:67    Function Parameters: 
+0:69    Sequence
+0:69      gl_Position: direct index for structure ( out highp 4-component vector of float Position)
+0:69        direct index ( temp block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:69          'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:69          Constant:
+0:69            4 (const int)
+0:69        Constant:
+0:69          0 (const int)
+0:71      Barrier ( global void)
+0:102  Function Definition: pointSize2( ( global void)
+0:102    Function Parameters: 
+0:104    Sequence
+0:104      Sequence
+0:104        move second child to first child ( temp highp float)
+0:104          'ps' ( temp highp float)
+0:104          gl_PointSize: direct index for structure ( in highp float PointSize)
+0:104            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:104              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:104              Constant:
+0:104                1 (const int)
+0:104            Constant:
+0:104              1 (const int)
+0:105      move second child to first child ( temp highp float)
+0:105        gl_PointSize: direct index for structure ( out highp float PointSize)
+0:105          indirect index ( temp block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:105            'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:105            'gl_InvocationID' ( in highp int InvocationID)
+0:105          Constant:
+0:105            1 (const int)
+0:105        'ps' ( temp highp float)
+0:110  Function Definition: goodfoop( ( global void)
+0:110    Function Parameters: 
+0:?     Sequence
+0:114      multiply second child into first child ( temp highp 3-component vector of float)
+0:114        'pv3' ( noContraction temp highp 3-component vector of float)
+0:114        'pv3' ( noContraction temp highp 3-component vector of float)
+0:115      move second child to first child ( temp highp 3-component vector of float)
+0:115        'pv3' ( noContraction temp highp 3-component vector of float)
+0:115        fma ( global highp 3-component vector of float)
+0:115          'pv3' ( noContraction temp highp 3-component vector of float)
+0:115          'pv3' ( noContraction temp highp 3-component vector of float)
+0:115          'pv3' ( noContraction temp highp 3-component vector of float)
+0:116      move second child to first child ( temp highp float)
+0:116        'd' ( noContraction temp highp float)
+0:116        fma ( global highp float)
+0:116          'd' ( noContraction temp highp float)
+0:116          'd' ( noContraction temp highp float)
+0:116          'd' ( noContraction temp highp float)
+0:119  Function Definition: bb( ( global void)
+0:119    Function Parameters: 
+0:121    Sequence
+0:121      move second child to first child ( temp highp 4-component vector of float)
+0:121        direct index ( patch temp highp 4-component vector of float BoundingBox)
+0:121          'gl_BoundingBoxOES' ( patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:121          Constant:
+0:121            0 (const int)
+0:121        Constant:
+0:121          0.000000
+0:121          0.000000
+0:121          0.000000
+0:121          0.000000
+0:122      move second child to first child ( temp highp 4-component vector of float)
+0:122        direct index ( patch temp highp 4-component vector of float BoundingBox)
+0:122          'gl_BoundingBoxOES' ( patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:122          Constant:
+0:122            1 (const int)
+0:122        Constant:
+0:122          1.000000
+0:122          1.000000
+0:122          1.000000
+0:122          1.000000
+0:123      move second child to first child ( temp highp 4-component vector of float)
+0:123        direct index ( patch temp highp 4-component vector of float BoundingBox)
+0:123          'gl_BoundingBoxOES' ( patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:123          Constant:
+0:123            2 (const int)
+0:123        Constant:
+0:123          2.000000
+0:123          2.000000
+0:123          2.000000
+0:123          2.000000
+0:134  Function Definition: outputtingOutparam(i1; ( global void)
+0:134    Function Parameters: 
+0:134      'a' ( out highp int)
+0:136    Sequence
+0:136      move second child to first child ( temp highp int)
+0:136        'a' ( out highp int)
+0:136        Constant:
+0:136          2 (const int)
+0:139  Function Definition: outputting( ( global void)
+0:139    Function Parameters: 
+0:141    Sequence
+0:141      move second child to first child ( temp highp int)
+0:141        indirect index ( temp highp int)
+0:141          'outa' ( out 4-element array of highp int)
+0:141          'gl_InvocationID' ( in highp int InvocationID)
+0:141        Constant:
+0:141          2 (const int)
+0:142      move second child to first child ( temp highp int)
+0:142        direct index ( temp highp int)
+0:142          'outa' ( out 4-element array of highp int)
+0:142          Constant:
+0:142            1 (const int)
+0:142        Constant:
+0:142          2 (const int)
+0:143      move second child to first child ( temp highp 4-component vector of float)
+0:143        gl_Position: direct index for structure ( out highp 4-component vector of float Position)
+0:143          direct index ( temp block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:143            'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:143            Constant:
+0:143              0 (const int)
+0:143          Constant:
+0:143            0 (const int)
+0:143        Constant:
+0:143          1.000000
+0:143          1.000000
+0:143          1.000000
+0:143          1.000000
+0:144      direct index ( temp highp int)
+0:144        'outa' ( out 4-element array of highp int)
+0:144        Constant:
+0:144          1 (const int)
+0:145      direct index ( temp block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:145        'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:145        Constant:
+0:145          0 (const int)
+0:146      Function Call: outputtingOutparam(i1; ( global void)
+0:146        direct index ( temp highp int)
+0:146          'outa' ( out 4-element array of highp int)
+0:146          Constant:
+0:146            0 (const int)
+0:147      Function Call: outputtingOutparam(i1; ( global void)
+0:147        indirect index ( temp highp int)
+0:147          'outa' ( out 4-element array of highp int)
+0:147          'gl_InvocationID' ( in highp int InvocationID)
+0:148      move second child to first child ( temp highp float)
+0:148        f: direct index for structure ( out highp float)
+0:148          direct index ( patch temp block{ out highp float f})
+0:148            'patchIName' ( patch out 4-element array of block{ out highp float f})
+0:148            Constant:
+0:148              1 (const int)
+0:148          Constant:
+0:148            0 (const int)
+0:148        Constant:
+0:148          3.140000
+0:149      move second child to first child ( temp highp int)
+0:149        indirect index ( temp highp int)
+0:149          'outa' ( out 4-element array of highp int)
+0:149          'gl_InvocationID' ( in highp int InvocationID)
+0:149        Constant:
+0:149          2 (const int)
+0:?   Linker Objects
+0:?     'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:?     'outa' ( out 4-element array of highp int)
+0:?     'patchIn' ( patch in highp 4-component vector of float)
+0:?     'patchOut' ( patch out highp 4-component vector of float)
+0:?     'ina' ( in highp 2-component vector of float)
+0:?     'inb' ( in 32-element array of highp 2-component vector of float)
+0:?     'inc' ( in 32-element array of highp 2-component vector of float)
+0:?     'ind' ( in 32-element array of highp 2-component vector of float)
+0:?     'implA' ( patch out implicitly-sized array of highp float)
+0:?     'ivla' (layout( location=3) in 32-element array of highp 4-component vector of float)
+0:?     'ivlb' (layout( location=4) in 32-element array of highp 4-component vector of float)
+0:?     'ivlc' (layout( location=4) in 32-element array of highp 4-component vector of float)
+0:?     'ovla' (layout( location=3) out 4-element array of highp 4-component vector of float)
+0:?     'ovlb' (layout( location=4) out 4-element array of highp 4-component vector of float)
+0:?     'ovlc' (layout( location=4) out 4-element array of highp 4-component vector of float)
+0:?     'pinbi' ( patch out block{ out highp int a})
+0:?     'myColor2' ( centroid out 4-element array of highp 3-component vector of float)
+0:?     'centr' ( centroid in 32-element array of highp 3-component vector of float)
+0:?     'perSampleColor' ( sample out 4-element array of highp 4-component vector of float)
+0:?     'badlay' ( out 4-element array of highp float)
+0:?     'misSized' ( out 5-element array of highp float)
+0:?     'okaySize' ( out 4-element array of highp float)
+0:?     'pv3' ( noContraction temp highp 3-component vector of float)
+0:?     'badpatchIName' ( patch out implicitly-sized array of block{ out highp float f})
+0:?     'patchIName' ( patch out 4-element array of block{ out highp float f})
+
+
+Linked tessellation control stage:
+
+
+Shader version: 320
+Requested GL_ARB_separate_shader_objects
+vertices = 4
+ERROR: node is still EOpNull!
+0:13  Function Definition: main( ( global void)
+0:13    Function Parameters: 
+0:15    Sequence
+0:15      Barrier ( global void)
+0:17      Sequence
+0:17        move second child to first child ( temp highp int)
+0:17          'a' ( temp highp int)
+0:17          Constant:
+0:17            5392 (const int)
+0:23      Sequence
+0:23        move second child to first child ( temp highp 4-component vector of float)
+0:23          'p' ( temp highp 4-component vector of float)
+0:23          gl_Position: direct index for structure ( in highp 4-component vector of float Position)
+0:23            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in 1-element array of highp 4-component vector of float gl_PositionPerViewNV})
+0:23              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in 1-element array of highp 4-component vector of float gl_PositionPerViewNV})
+0:23              Constant:
+0:23                1 (const int)
+0:23            Constant:
+0:23              0 (const int)
+0:24      Sequence
+0:24        move second child to first child ( temp highp float)
+0:24          'ps' ( temp highp float)
+0:24          gl_PointSize: direct index for structure ( in highp float PointSize)
+0:24            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in 1-element array of highp 4-component vector of float gl_PositionPerViewNV})
+0:24              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in 1-element array of highp 4-component vector of float gl_PositionPerViewNV})
+0:24              Constant:
+0:24                1 (const int)
+0:24            Constant:
+0:24              1 (const int)
+0:25      Sequence
+0:25        move second child to first child ( temp highp float)
+0:25          'cd' ( temp highp float)
+0:25          Constant:
+0:25            0.000000
+0:27      Sequence
+0:27        move second child to first child ( temp highp int)
+0:27          'pvi' ( temp highp int)
+0:27          'gl_PatchVerticesIn' ( in highp int PatchVertices)
+0:28      Sequence
+0:28        move second child to first child ( temp highp int)
+0:28          'pid' ( temp highp int)
+0:28          'gl_PrimitiveID' ( in highp int PrimitiveID)
+0:29      Sequence
+0:29        move second child to first child ( temp highp int)
+0:29          'iid' ( temp highp int)
+0:29          'gl_InvocationID' ( in highp int InvocationID)
+0:31      move second child to first child ( temp highp 4-component vector of float)
+0:31        gl_Position: direct index for structure ( out highp 4-component vector of float Position)
+0:31          indirect index ( temp block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:31            'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:31            'gl_InvocationID' ( in highp int InvocationID)
+0:31          Constant:
+0:31            0 (const int)
+0:31        'p' ( temp highp 4-component vector of float)
+0:32      move second child to first child ( temp highp float)
+0:32        gl_PointSize: direct index for structure ( out highp float PointSize)
+0:32          indirect index ( temp block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:32            'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:32            'gl_InvocationID' ( in highp int InvocationID)
+0:32          Constant:
+0:32            1 (const int)
+0:32        'ps' ( temp highp float)
+0:33      move second child to first child ( temp highp float)
+0:33        Constant:
+0:33          0.000000
+0:33        'cd' ( temp highp float)
+0:35      move second child to first child ( temp highp float)
+0:35        direct index ( patch temp highp float TessLevelOuter)
+0:35          'gl_TessLevelOuter' ( patch out 4-element array of highp float TessLevelOuter)
+0:35          Constant:
+0:35            3 (const int)
+0:35        Constant:
+0:35          3.200000
+0:36      move second child to first child ( temp highp float)
+0:36        direct index ( patch temp highp float TessLevelInner)
+0:36          'gl_TessLevelInner' ( patch out 2-element array of highp float TessLevelInner)
+0:36          Constant:
+0:36            1 (const int)
+0:36        Constant:
+0:36          1.300000
+0:38      Test condition and select ( temp void)
+0:38        Condition
+0:38        Compare Greater Than ( temp bool)
+0:38          'a' ( temp highp int)
+0:38          Constant:
+0:38            10 (const int)
+0:38        true case
+0:39        Barrier ( global void)
+0:38        false case
+0:41        Barrier ( global void)
+0:43      Barrier ( global void)
+0:47      Loop with condition not tested first
+0:47        Loop Condition
+0:47        Compare Greater Than ( temp bool)
+0:47          'a' ( temp highp int)
+0:47          Constant:
+0:47            10 (const int)
+0:47        Loop Body
+0:46        Sequence
+0:46          Barrier ( global void)
+0:49      switch
+0:49      condition
+0:49        'a' ( temp highp int)
+0:49      body
+0:49        Sequence
+0:50          default: 
+0:?           Sequence
+0:51            Barrier ( global void)
+0:52            Branch: Break
+0:54      Test condition and select ( temp highp int)
+0:54        Condition
+0:54        Compare Less Than ( temp bool)
+0:54          'a' ( temp highp int)
+0:54          Constant:
+0:54            12 (const int)
+0:54        true case
+0:54        'a' ( temp highp int)
+0:54        false case
+0:54        Comma ( temp highp int)
+0:54          Barrier ( global void)
+0:54          'a' ( temp highp int)
+0:56      Sequence
+0:56        Barrier ( global void)
+0:59      Branch: Return
+0:61      Barrier ( global void)
+0:?   Linker Objects
+0:?     'gl_out' ( out 4-element array of block{ out highp 4-component vector of float Position gl_Position,  out highp float PointSize gl_PointSize})
+0:?     'outa' ( out 4-element array of highp int)
+0:?     'patchIn' ( patch in highp 4-component vector of float)
+0:?     'patchOut' ( patch out highp 4-component vector of float)
+0:?     'ina' ( in highp 2-component vector of float)
+0:?     'inb' ( in 32-element array of highp 2-component vector of float)
+0:?     'inc' ( in 32-element array of highp 2-component vector of float)
+0:?     'ind' ( in 32-element array of highp 2-component vector of float)
+0:?     'implA' ( patch out 1-element array of highp float)
+0:?     'ivla' (layout( location=3) in 32-element array of highp 4-component vector of float)
+0:?     'ivlb' (layout( location=4) in 32-element array of highp 4-component vector of float)
+0:?     'ivlc' (layout( location=4) in 32-element array of highp 4-component vector of float)
+0:?     'ovla' (layout( location=3) out 4-element array of highp 4-component vector of float)
+0:?     'ovlb' (layout( location=4) out 4-element array of highp 4-component vector of float)
+0:?     'ovlc' (layout( location=4) out 4-element array of highp 4-component vector of float)
+0:?     'pinbi' ( patch out block{ out highp int a})
+0:?     'myColor2' ( centroid out 4-element array of highp 3-component vector of float)
+0:?     'centr' ( centroid in 32-element array of highp 3-component vector of float)
+0:?     'perSampleColor' ( sample out 4-element array of highp 4-component vector of float)
+0:?     'badlay' ( out 4-element array of highp float)
+0:?     'misSized' ( out 5-element array of highp float)
+0:?     'okaySize' ( out 4-element array of highp float)
+0:?     'pv3' ( noContraction temp highp 3-component vector of float)
+0:?     'badpatchIName' ( patch out 1-element array of block{ out highp float f})
+0:?     'patchIName' ( patch out 4-element array of block{ out highp float f})
+

+ 276 - 0
3rdparty/glslang/Test/baseResults/320.tese.out

@@ -0,0 +1,276 @@
+320.tese
+ERROR: 0:3: 'vertices' : there is no such layout identifier for this stage taking an assigned value 
+ERROR: 0:5: 'triangles' : cannot change previously set input primitive 
+ERROR: 0:6: 'isolines' : cannot change previously set input primitive 
+ERROR: 0:8: 'ccw' : cannot change previously set vertex order 
+ERROR: 0:12: 'equal_spacing' : cannot change previously set vertex spacing 
+ERROR: 0:13: 'fractional_even_spacing' : cannot change previously set vertex spacing 
+ERROR: 0:18: 'patch' : can only use on input in tessellation-evaluation shader 
+ERROR: 0:22: 'barrier' : no matching overloaded function found 
+ERROR: 0:33: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:34: 'gl_ClipDistance' : no such field in structure 
+ERROR: 0:34: 'expression' :  left of '[' is not of type array, matrix, or vector  
+ERROR: 0:43: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:44: 'gl_ClipDistance' : undeclared identifier 
+ERROR: 0:44: 'gl_ClipDistance' :  left of '[' is not of type array, matrix, or vector  
+ERROR: 0:44: 'assign' :  l-value required (can't modify a const)
+ERROR: 0:47: 'patch' : cannot use interpolation qualifiers with patch 
+ERROR: 0:48: 'patch' : cannot use interpolation qualifiers with patch 
+ERROR: 0:49: 'noperspective' : Reserved word. 
+ERROR: 0:49: 'noperspective' : not supported with this profile: es
+ERROR: 0:49: 'patch' : cannot use interpolation qualifiers with patch 
+ERROR: 0:50: '' : can only have one auxiliary qualifier (centroid, patch, and sample) 
+ERROR: 0:54: 'gl_PerVertex' : block already declared with size, can't redeclare as implicitly-sized 
+ERROR: 0:59: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use 
+ERROR: 0:64: 'quads' : cannot apply to 'out' 
+ERROR: 0:64: 'cw' : can only apply to 'in' 
+ERROR: 0:65: 'triangles' : cannot apply to 'out' 
+ERROR: 0:66: 'isolines' : cannot apply to 'out' 
+ERROR: 0:67: 'cw' : can only apply to 'in' 
+ERROR: 0:68: 'fractional_odd_spacing' : can only apply to 'in' 
+ERROR: 0:69: 'equal_spacing' : can only apply to 'in' 
+ERROR: 0:70: 'fractional_even_spacing' : can only apply to 'in' 
+ERROR: 0:71: 'point_mode' : can only apply to 'in' 
+ERROR: 0:73: 'in' : type must be an array: ina
+ERROR: 0:75: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized 
+ERROR: 0:78: 'in' : type must be an array: bla
+ERROR: 0:86: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized 
+ERROR: 0:96: 'location' : overlapping use of location 24
+ERROR: 0:99: 'location' : overlapping use of location 24
+ERROR: 0:101: 'gl_TessLevelOuter' : identifiers starting with "gl_" are reserved 
+ERROR: 0:113: 'gl_BoundingBoxOES' : undeclared identifier 
+ERROR: 40 compilation errors.  No code generated.
+
+
+Shader version: 320
+Requested GL_ARB_separate_shader_objects
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:20  Function Definition: main( ( global void)
+0:20    Function Parameters: 
+0:22    Sequence
+0:22      Constant:
+0:22        0.000000
+0:24      Sequence
+0:24        move second child to first child ( temp highp int)
+0:24          'a' ( temp highp int)
+0:24          Constant:
+0:24            1512 (const int)
+0:32      Sequence
+0:32        move second child to first child ( temp highp 4-component vector of float)
+0:32          'p' ( temp highp 4-component vector of float)
+0:32          gl_Position: direct index for structure ( in highp 4-component vector of float Position)
+0:32            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:32              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:32              Constant:
+0:32                1 (const int)
+0:32            Constant:
+0:32              0 (const int)
+0:33      Sequence
+0:33        move second child to first child ( temp highp float)
+0:33          'ps' ( temp highp float)
+0:33          gl_PointSize: direct index for structure ( in highp float PointSize)
+0:33            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:33              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in implicitly-sized array of highp 4-component vector of float gl_PositionPerViewNV})
+0:33              Constant:
+0:33                1 (const int)
+0:33            Constant:
+0:33              1 (const int)
+0:34      Sequence
+0:34        move second child to first child ( temp highp float)
+0:34          'cd' ( temp highp float)
+0:34          Constant:
+0:34            0.000000
+0:36      Sequence
+0:36        move second child to first child ( temp highp int)
+0:36          'pvi' ( temp highp int)
+0:36          'gl_PatchVerticesIn' ( in highp int PatchVertices)
+0:37      Sequence
+0:37        move second child to first child ( temp highp int)
+0:37          'pid' ( temp highp int)
+0:37          'gl_PrimitiveID' ( in highp int PrimitiveID)
+0:38      Sequence
+0:38        move second child to first child ( temp highp 3-component vector of float)
+0:38          'tc' ( temp highp 3-component vector of float)
+0:38          'gl_TessCoord' ( in highp 3-component vector of float TessCoord)
+0:39      Sequence
+0:39        move second child to first child ( temp highp float)
+0:39          'tlo' ( temp highp float)
+0:39          direct index ( patch temp highp float TessLevelOuter)
+0:39            'gl_TessLevelOuter' ( patch in 4-element array of highp float TessLevelOuter)
+0:39            Constant:
+0:39              3 (const int)
+0:40      Sequence
+0:40        move second child to first child ( temp highp float)
+0:40          'tli' ( temp highp float)
+0:40          direct index ( patch temp highp float TessLevelInner)
+0:40            'gl_TessLevelInner' ( patch in 2-element array of highp float TessLevelInner)
+0:40            Constant:
+0:40              1 (const int)
+0:42      move second child to first child ( temp highp 4-component vector of float)
+0:42        gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
+0:42          'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position,  gl_PointSize highp float PointSize gl_PointSize})
+0:42          Constant:
+0:42            0 (const uint)
+0:42        'p' ( temp highp 4-component vector of float)
+0:43      move second child to first child ( temp highp float)
+0:43        gl_PointSize: direct index for structure ( gl_PointSize highp float PointSize)
+0:43          'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position,  gl_PointSize highp float PointSize gl_PointSize})
+0:43          Constant:
+0:43            1 (const uint)
+0:43        'ps' ( temp highp float)
+0:44      move second child to first child ( temp highp float)
+0:44        Constant:
+0:44          0.000000
+0:44        'cd' ( temp highp float)
+0:111  Function Definition: bbbad( ( global void)
+0:111    Function Parameters: 
+0:113    Sequence
+0:113      'gl_BoundingBoxOES' ( temp float)
+0:?   Linker Objects
+0:?     'patchIn' ( patch in highp 4-component vector of float)
+0:?     'patchOut' ( patch out highp 4-component vector of float)
+0:?     'badp1' ( smooth patch in highp 4-component vector of float)
+0:?     'badp2' ( flat patch in highp 4-component vector of float)
+0:?     'badp3' ( noperspective patch in highp 4-component vector of float)
+0:?     'badp4' ( patch sample in highp 3-component vector of float)
+0:?     'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position})
+0:?     'ina' ( in highp 2-component vector of float)
+0:?     'inb' ( in 32-element array of highp 2-component vector of float)
+0:?     'inc' ( in 32-element array of highp 2-component vector of float)
+0:?     'ind' ( in 32-element array of highp 2-component vector of float)
+0:?     'bla' ( in block{ in highp int f})
+0:?     'blb' ( in 32-element array of block{ in highp int f})
+0:?     'blc' ( in 32-element array of block{ in highp int f})
+0:?     'bld' ( in 32-element array of block{ in highp int f})
+0:?     'ivla' (layout( location=23) in 32-element array of highp 4-component vector of float)
+0:?     'ivlb' (layout( location=24) in 32-element array of highp 4-component vector of float)
+0:?     'ivlc' (layout( location=24) in 32-element array of highp 4-component vector of float)
+0:?     'ovla' (layout( location=23) out 2-element array of highp 4-component vector of float)
+0:?     'ovlb' (layout( location=24) out 2-element array of highp 4-component vector of float)
+0:?     'pinbi' ( patch in block{ in highp int a})
+0:?     'myColor2' ( centroid out highp 3-component vector of float)
+0:?     'centr' ( centroid in 32-element array of highp 3-component vector of float)
+0:?     'perSampleColor' ( sample out highp 4-component vector of float)
+
+
+Linked tessellation evaluation stage:
+
+
+Shader version: 320
+Requested GL_ARB_separate_shader_objects
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:20  Function Definition: main( ( global void)
+0:20    Function Parameters: 
+0:22    Sequence
+0:22      Constant:
+0:22        0.000000
+0:24      Sequence
+0:24        move second child to first child ( temp highp int)
+0:24          'a' ( temp highp int)
+0:24          Constant:
+0:24            1512 (const int)
+0:32      Sequence
+0:32        move second child to first child ( temp highp 4-component vector of float)
+0:32          'p' ( temp highp 4-component vector of float)
+0:32          gl_Position: direct index for structure ( in highp 4-component vector of float Position)
+0:32            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in 1-element array of highp 4-component vector of float gl_PositionPerViewNV})
+0:32              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in 1-element array of highp 4-component vector of float gl_PositionPerViewNV})
+0:32              Constant:
+0:32                1 (const int)
+0:32            Constant:
+0:32              0 (const int)
+0:33      Sequence
+0:33        move second child to first child ( temp highp float)
+0:33          'ps' ( temp highp float)
+0:33          gl_PointSize: direct index for structure ( in highp float PointSize)
+0:33            direct index ( temp block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in 1-element array of highp 4-component vector of float gl_PositionPerViewNV})
+0:33              'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position,  in highp float PointSize gl_PointSize,  in highp 4-component vector of float gl_SecondaryPositionNV,  in 1-element array of highp 4-component vector of float gl_PositionPerViewNV})
+0:33              Constant:
+0:33                1 (const int)
+0:33            Constant:
+0:33              1 (const int)
+0:34      Sequence
+0:34        move second child to first child ( temp highp float)
+0:34          'cd' ( temp highp float)
+0:34          Constant:
+0:34            0.000000
+0:36      Sequence
+0:36        move second child to first child ( temp highp int)
+0:36          'pvi' ( temp highp int)
+0:36          'gl_PatchVerticesIn' ( in highp int PatchVertices)
+0:37      Sequence
+0:37        move second child to first child ( temp highp int)
+0:37          'pid' ( temp highp int)
+0:37          'gl_PrimitiveID' ( in highp int PrimitiveID)
+0:38      Sequence
+0:38        move second child to first child ( temp highp 3-component vector of float)
+0:38          'tc' ( temp highp 3-component vector of float)
+0:38          'gl_TessCoord' ( in highp 3-component vector of float TessCoord)
+0:39      Sequence
+0:39        move second child to first child ( temp highp float)
+0:39          'tlo' ( temp highp float)
+0:39          direct index ( patch temp highp float TessLevelOuter)
+0:39            'gl_TessLevelOuter' ( patch in 4-element array of highp float TessLevelOuter)
+0:39            Constant:
+0:39              3 (const int)
+0:40      Sequence
+0:40        move second child to first child ( temp highp float)
+0:40          'tli' ( temp highp float)
+0:40          direct index ( patch temp highp float TessLevelInner)
+0:40            'gl_TessLevelInner' ( patch in 2-element array of highp float TessLevelInner)
+0:40            Constant:
+0:40              1 (const int)
+0:42      move second child to first child ( temp highp 4-component vector of float)
+0:42        gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
+0:42          'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position,  gl_PointSize highp float PointSize gl_PointSize})
+0:42          Constant:
+0:42            0 (const uint)
+0:42        'p' ( temp highp 4-component vector of float)
+0:43      move second child to first child ( temp highp float)
+0:43        gl_PointSize: direct index for structure ( gl_PointSize highp float PointSize)
+0:43          'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position,  gl_PointSize highp float PointSize gl_PointSize})
+0:43          Constant:
+0:43            1 (const uint)
+0:43        'ps' ( temp highp float)
+0:44      move second child to first child ( temp highp float)
+0:44        Constant:
+0:44          0.000000
+0:44        'cd' ( temp highp float)
+0:?   Linker Objects
+0:?     'patchIn' ( patch in highp 4-component vector of float)
+0:?     'patchOut' ( patch out highp 4-component vector of float)
+0:?     'badp1' ( smooth patch in highp 4-component vector of float)
+0:?     'badp2' ( flat patch in highp 4-component vector of float)
+0:?     'badp3' ( noperspective patch in highp 4-component vector of float)
+0:?     'badp4' ( patch sample in highp 3-component vector of float)
+0:?     'gl_in' ( in 32-element array of block{ in highp 4-component vector of float Position gl_Position})
+0:?     'ina' ( in highp 2-component vector of float)
+0:?     'inb' ( in 32-element array of highp 2-component vector of float)
+0:?     'inc' ( in 32-element array of highp 2-component vector of float)
+0:?     'ind' ( in 32-element array of highp 2-component vector of float)
+0:?     'bla' ( in block{ in highp int f})
+0:?     'blb' ( in 32-element array of block{ in highp int f})
+0:?     'blc' ( in 32-element array of block{ in highp int f})
+0:?     'bld' ( in 32-element array of block{ in highp int f})
+0:?     'ivla' (layout( location=23) in 32-element array of highp 4-component vector of float)
+0:?     'ivlb' (layout( location=24) in 32-element array of highp 4-component vector of float)
+0:?     'ivlc' (layout( location=24) in 32-element array of highp 4-component vector of float)
+0:?     'ovla' (layout( location=23) out 2-element array of highp 4-component vector of float)
+0:?     'ovlb' (layout( location=24) out 2-element array of highp 4-component vector of float)
+0:?     'pinbi' ( patch in block{ in highp int a})
+0:?     'myColor2' ( centroid out highp 3-component vector of float)
+0:?     'centr' ( centroid in 32-element array of highp 3-component vector of float)
+0:?     'perSampleColor' ( sample out highp 4-component vector of float)
+

+ 797 - 0
3rdparty/glslang/Test/baseResults/320.vert.out

@@ -0,0 +1,797 @@
+320.vert
+ERROR: 0:6: 's' : member of block cannot be or contain a sampler, image, or atomic_uint type 
+ERROR: 0:14: 'location' : overlapping use of location 12
+ERROR: 0:16: 'input block' : not supported in this stage: vertex
+ERROR: 0:18: 'gl_PerVertex' : block redeclaration has extra members 
+ERROR: 0:28: 'gl_PointSize' : member of nameless block was not redeclared 
+ERROR: 0:28: 'assign' :  cannot convert from ' const float' to ' gl_PointSize highp void PointSize'
+ERROR: 0:31: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use 
+ERROR: 0:36: 'flat/smooth/noperspective' : cannot use interpolation qualifiers on an interface block 
+ERROR: 0:40: 'flat/smooth/noperspective' : cannot use interpolation qualifiers on an interface block 
+ERROR: 0:44: 'centroid' : cannot use centroid qualifier on an interface block 
+ERROR: 0:48: 'invariant' : cannot use invariant qualifier on an interface block 
+ERROR: 0:68: 'variable indexing buffer block array' : not supported with this profile: es
+ERROR: 0:73: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument
+ERROR: 0:76: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:77: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:78: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:79: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:80: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:81: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:116: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:117: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:118: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:120: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:121: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:122: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:123: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:191: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:192: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:193: 'sampler/image' : type requires declaration of default precision qualifier 
+ERROR: 0:211: 'textureSize' : no matching overloaded function found 
+ERROR: 0:211: '=' :  cannot convert from ' const float' to ' temp highp 3-component vector of int'
+ERROR: 0:252: 'interpolateAtCentroid' : no matching overloaded function found 
+ERROR: 0:253: 'interpolateAtSample' : no matching overloaded function found 
+ERROR: 0:254: 'interpolateAtOffset' : no matching overloaded function found 
+ERROR: 34 compilation errors.  No code generated.
+
+
+Shader version: 320
+ERROR: node is still EOpNull!
+0:23  Function Definition: main( ( global void)
+0:23    Function Parameters: 
+0:25    Sequence
+0:25      Sequence
+0:25        move second child to first child ( temp highp int)
+0:25          'sum' ( temp highp int)
+0:25          add ( temp highp int)
+0:25            'gl_VertexID' ( gl_VertexId highp int VertexId)
+0:26            'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
+0:27      move second child to first child ( temp highp 4-component vector of float)
+0:27        gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
+0:27          'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position, })
+0:27          Constant:
+0:27            0 (const uint)
+0:27        Constant:
+0:27          1.000000
+0:27          1.000000
+0:27          1.000000
+0:27          1.000000
+0:28      gl_PointSize: direct index for structure ( gl_PointSize highp void PointSize)
+0:28        'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position, })
+0:28        Constant:
+0:28          1 (const uint)
+0:62  Function Definition: pfoo( ( global void)
+0:62    Function Parameters: 
+0:?     Sequence
+0:65      move second child to first child ( temp highp 2-component vector of float)
+0:65        'h' ( noContraction temp highp 2-component vector of float)
+0:65        fma ( global highp 2-component vector of float)
+0:65          'inf' ( in highp 2-component vector of float)
+0:65          'ing' ( in highp 2-component vector of float)
+0:65          'h' ( noContraction temp highp 2-component vector of float)
+0:66      indirect index ( temp lowp sampler2D)
+0:66        'sArray' ( uniform 4-element array of lowp sampler2D)
+0:66        add ( temp highp int)
+0:66          'sIndex' ( uniform highp int)
+0:66          Constant:
+0:66            1 (const int)
+0:67      indirect index (layout( column_major shared) temp block{layout( column_major shared) uniform highp int i})
+0:67        'ubInst' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform highp int i})
+0:67        add ( temp highp int)
+0:67          'sIndex' ( uniform highp int)
+0:67          Constant:
+0:67            1 (const int)
+0:68      indirect index (layout( column_major shared) temp block{layout( column_major shared) buffer highp int i})
+0:68        'bbInst' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer highp int i})
+0:68        subtract ( temp highp int)
+0:68          'sIndex' ( uniform highp int)
+0:68          Constant:
+0:68            2 (const int)
+0:69      direct index ( writeonly temp highp image2D)
+0:69        'iArray' ( writeonly uniform 5-element array of highp image2D)
+0:69        Constant:
+0:69          2 (const int)
+0:70      indirect index ( writeonly temp highp image2D)
+0:70        'iArray' ( writeonly uniform 5-element array of highp image2D)
+0:70        subtract ( temp highp int)
+0:70          'sIndex' ( uniform highp int)
+0:70          Constant:
+0:70            2 (const int)
+0:71      textureGatherOffset ( global lowp 4-component vector of float)
+0:71        direct index ( temp lowp sampler2D)
+0:71          'sArray' ( uniform 4-element array of lowp sampler2D)
+0:71          Constant:
+0:71            0 (const int)
+0:71        Constant:
+0:71          0.100000
+0:71          0.100000
+0:71        Convert float to int ( temp lowp 2-component vector of int)
+0:71          'inf' ( in highp 2-component vector of float)
+0:72      textureGatherOffsets ( global lowp 4-component vector of float, operation at highp)
+0:72        direct index ( temp lowp sampler2D)
+0:72          'sArray' ( uniform 4-element array of lowp sampler2D)
+0:72          Constant:
+0:72            0 (const int)
+0:72        Constant:
+0:72          0.100000
+0:72          0.100000
+0:72        Constant:
+0:72          0 (const int)
+0:72          0 (const int)
+0:72          0 (const int)
+0:72          0 (const int)
+0:72          0 (const int)
+0:72          0 (const int)
+0:72          0 (const int)
+0:72          0 (const int)
+0:73      textureGatherOffsets ( global lowp 4-component vector of float, operation at highp)
+0:73        direct index ( temp lowp sampler2D)
+0:73          'sArray' ( uniform 4-element array of lowp sampler2D)
+0:73          Constant:
+0:73            0 (const int)
+0:73        Constant:
+0:73          0.100000
+0:73          0.100000
+0:73        'offsets' ( uniform 4-element array of highp 2-component vector of int)
+0:101  Function Definition: bufferT( ( global void)
+0:101    Function Parameters: 
+0:103    Sequence
+0:103      Sequence
+0:103        move second child to first child ( temp highp int)
+0:103          's1' ( temp highp int)
+0:103          textureSize ( global highp int)
+0:103            'bufSamp1' ( uniform highp samplerBuffer)
+0:104      Sequence
+0:104        move second child to first child ( temp highp int)
+0:104          's2' ( temp highp int)
+0:104          textureSize ( global highp int)
+0:104            'bufSamp2' ( uniform highp isamplerBuffer)
+0:105      Sequence
+0:105        move second child to first child ( temp highp int)
+0:105          's3' ( temp highp int)
+0:105          textureSize ( global highp int)
+0:105            'bufSamp3' ( uniform highp usamplerBuffer)
+0:107      Sequence
+0:107        move second child to first child ( temp highp int)
+0:107          's4' ( temp highp int)
+0:107          imageQuerySize ( global highp int)
+0:107            'bufSamp4' ( writeonly uniform highp imageBuffer)
+0:108      Sequence
+0:108        move second child to first child ( temp highp int)
+0:108          's5' ( temp highp int)
+0:108          imageQuerySize ( global highp int)
+0:108            'bufSamp5' ( writeonly uniform highp iimageBuffer)
+0:109      Sequence
+0:109        move second child to first child ( temp highp int)
+0:109          's6' ( temp highp int)
+0:109          imageQuerySize ( global highp int)
+0:109            'bufSamp6' ( writeonly uniform highp uimageBuffer)
+0:111      Sequence
+0:111        move second child to first child ( temp highp 4-component vector of float)
+0:111          'f1' ( temp highp 4-component vector of float)
+0:111          textureFetch ( global highp 4-component vector of float)
+0:111            'bufSamp1' ( uniform highp samplerBuffer)
+0:111            's1' ( temp highp int)
+0:112      Sequence
+0:112        move second child to first child ( temp highp 4-component vector of int)
+0:112          'f2' ( temp highp 4-component vector of int)
+0:112          textureFetch ( global highp 4-component vector of int)
+0:112            'bufSamp2' ( uniform highp isamplerBuffer)
+0:112            's2' ( temp highp int)
+0:113      Sequence
+0:113        move second child to first child ( temp highp 4-component vector of uint)
+0:113          'f3' ( temp highp 4-component vector of uint)
+0:113          textureFetch ( global highp 4-component vector of uint)
+0:113            'bufSamp3' ( uniform highp usamplerBuffer)
+0:113            's3' ( temp highp int)
+0:149  Function Definition: CAT( ( global void)
+0:149    Function Parameters: 
+0:151    Sequence
+0:151      Sequence
+0:151        move second child to first child ( temp highp 3-component vector of int)
+0:151          's4' ( temp highp 3-component vector of int)
+0:151          textureSize ( global highp 3-component vector of int)
+0:151            'CA4' ( uniform highp samplerCubeArray)
+0:151            Constant:
+0:151              1 (const int)
+0:152      Sequence
+0:152        move second child to first child ( temp highp 3-component vector of int)
+0:152          's5' ( temp highp 3-component vector of int)
+0:152          textureSize ( global highp 3-component vector of int)
+0:152            'CA5' ( uniform highp samplerCubeArrayShadow)
+0:152            Constant:
+0:152              1 (const int)
+0:153      Sequence
+0:153        move second child to first child ( temp highp 3-component vector of int)
+0:153          's6' ( temp highp 3-component vector of int)
+0:153          textureSize ( global highp 3-component vector of int)
+0:153            'CA6' ( uniform highp isamplerCubeArray)
+0:153            Constant:
+0:153              1 (const int)
+0:154      Sequence
+0:154        move second child to first child ( temp highp 3-component vector of int)
+0:154          's7' ( temp highp 3-component vector of int)
+0:154          textureSize ( global highp 3-component vector of int)
+0:154            'CA7' ( uniform highp usamplerCubeArray)
+0:154            Constant:
+0:154              1 (const int)
+0:156      Sequence
+0:156        move second child to first child ( temp highp 4-component vector of float)
+0:156          't4' ( temp highp 4-component vector of float)
+0:156          texture ( global highp 4-component vector of float)
+0:156            'CA4' ( uniform highp samplerCubeArray)
+0:156            Constant:
+0:156              0.500000
+0:156              0.500000
+0:156              0.500000
+0:156              0.500000
+0:157      Sequence
+0:157        move second child to first child ( temp highp float)
+0:157          't5' ( temp highp float)
+0:157          texture ( global highp float)
+0:157            'CA5' ( uniform highp samplerCubeArrayShadow)
+0:157            Constant:
+0:157              0.500000
+0:157              0.500000
+0:157              0.500000
+0:157              0.500000
+0:157            Constant:
+0:157              3.000000
+0:158      Sequence
+0:158        move second child to first child ( temp highp 4-component vector of int)
+0:158          't6' ( temp highp 4-component vector of int)
+0:158          texture ( global highp 4-component vector of int)
+0:158            'CA6' ( uniform highp isamplerCubeArray)
+0:158            Constant:
+0:158              0.500000
+0:158              0.500000
+0:158              0.500000
+0:158              0.500000
+0:159      Sequence
+0:159        move second child to first child ( temp highp 4-component vector of uint)
+0:159          't7' ( temp highp 4-component vector of uint)
+0:159          texture ( global highp 4-component vector of uint)
+0:159            'CA7' ( uniform highp usamplerCubeArray)
+0:159            Constant:
+0:159              0.500000
+0:159              0.500000
+0:159              0.500000
+0:159              0.500000
+0:161      Sequence
+0:161        move second child to first child ( temp highp 4-component vector of float)
+0:161          'L4' ( temp highp 4-component vector of float)
+0:161          textureLod ( global highp 4-component vector of float)
+0:161            'CA4' ( uniform highp samplerCubeArray)
+0:161            Constant:
+0:161              0.500000
+0:161              0.500000
+0:161              0.500000
+0:161              0.500000
+0:161            Constant:
+0:161              0.240000
+0:162      Sequence
+0:162        move second child to first child ( temp highp 4-component vector of int)
+0:162          'L6' ( temp highp 4-component vector of int)
+0:162          textureLod ( global highp 4-component vector of int)
+0:162            'CA6' ( uniform highp isamplerCubeArray)
+0:162            Constant:
+0:162              0.500000
+0:162              0.500000
+0:162              0.500000
+0:162              0.500000
+0:162            Constant:
+0:162              0.260000
+0:163      Sequence
+0:163        move second child to first child ( temp highp 4-component vector of uint)
+0:163          'L7' ( temp highp 4-component vector of uint)
+0:163          textureLod ( global highp 4-component vector of uint)
+0:163            'CA7' ( uniform highp usamplerCubeArray)
+0:163            Constant:
+0:163              0.500000
+0:163              0.500000
+0:163              0.500000
+0:163              0.500000
+0:163            Constant:
+0:163              0.270000
+0:165      Sequence
+0:165        move second child to first child ( temp highp 4-component vector of float)
+0:165          'g4' ( temp highp 4-component vector of float)
+0:165          textureGrad ( global highp 4-component vector of float)
+0:165            'CA4' ( uniform highp samplerCubeArray)
+0:165            Constant:
+0:165              0.500000
+0:165              0.500000
+0:165              0.500000
+0:165              0.500000
+0:165            Constant:
+0:165              0.100000
+0:165              0.100000
+0:165              0.100000
+0:165            Constant:
+0:165              0.200000
+0:165              0.200000
+0:165              0.200000
+0:166      Sequence
+0:166        move second child to first child ( temp highp 4-component vector of int)
+0:166          'g6' ( temp highp 4-component vector of int)
+0:166          textureGrad ( global highp 4-component vector of int)
+0:166            'CA6' ( uniform highp isamplerCubeArray)
+0:166            Constant:
+0:166              0.500000
+0:166              0.500000
+0:166              0.500000
+0:166              0.500000
+0:166            Constant:
+0:166              0.100000
+0:166              0.100000
+0:166              0.100000
+0:166            Constant:
+0:166              0.200000
+0:166              0.200000
+0:166              0.200000
+0:167      Sequence
+0:167        move second child to first child ( temp highp 4-component vector of uint)
+0:167          'g7' ( temp highp 4-component vector of uint)
+0:167          textureGrad ( global highp 4-component vector of uint)
+0:167            'CA7' ( uniform highp usamplerCubeArray)
+0:167            Constant:
+0:167              0.500000
+0:167              0.500000
+0:167              0.500000
+0:167              0.500000
+0:167            Constant:
+0:167              0.100000
+0:167              0.100000
+0:167              0.100000
+0:167            Constant:
+0:167              0.200000
+0:167              0.200000
+0:167              0.200000
+0:169      Sequence
+0:169        move second child to first child ( temp highp 4-component vector of float)
+0:169          'gath4' ( temp highp 4-component vector of float)
+0:169          textureGather ( global highp 4-component vector of float)
+0:169            'CA4' ( uniform highp samplerCubeArray)
+0:169            Constant:
+0:169              0.500000
+0:169              0.500000
+0:169              0.500000
+0:169              0.500000
+0:170      Sequence
+0:170        move second child to first child ( temp highp 4-component vector of float)
+0:170          'gathC4' ( temp highp 4-component vector of float)
+0:170          textureGather ( global highp 4-component vector of float)
+0:170            'CA4' ( uniform highp samplerCubeArray)
+0:170            Constant:
+0:170              0.500000
+0:170              0.500000
+0:170              0.500000
+0:170              0.500000
+0:170            Constant:
+0:170              2 (const int)
+0:171      Sequence
+0:171        move second child to first child ( temp highp 4-component vector of int)
+0:171          'gath6' ( temp highp 4-component vector of int)
+0:171          textureGather ( global highp 4-component vector of int)
+0:171            'CA6' ( uniform highp isamplerCubeArray)
+0:171            Constant:
+0:171              0.500000
+0:171              0.500000
+0:171              0.500000
+0:171              0.500000
+0:172      Sequence
+0:172        move second child to first child ( temp highp 4-component vector of int)
+0:172          'gathC6' ( temp highp 4-component vector of int)
+0:172          textureGather ( global highp 4-component vector of int)
+0:172            'CA6' ( uniform highp isamplerCubeArray)
+0:172            Constant:
+0:172              0.500000
+0:172              0.500000
+0:172              0.500000
+0:172              0.500000
+0:172            Constant:
+0:172              1 (const int)
+0:173      Sequence
+0:173        move second child to first child ( temp highp 4-component vector of uint)
+0:173          'gath7' ( temp highp 4-component vector of uint)
+0:173          textureGather ( global highp 4-component vector of uint)
+0:173            'CA7' ( uniform highp usamplerCubeArray)
+0:173            Constant:
+0:173              0.500000
+0:173              0.500000
+0:173              0.500000
+0:173              0.500000
+0:174      Sequence
+0:174        move second child to first child ( temp highp 4-component vector of uint)
+0:174          'gathC7' ( temp highp 4-component vector of uint)
+0:174          textureGather ( global highp 4-component vector of uint)
+0:174            'CA7' ( uniform highp usamplerCubeArray)
+0:174            Constant:
+0:174              0.500000
+0:174              0.500000
+0:174              0.500000
+0:174              0.500000
+0:174            Constant:
+0:174              0 (const int)
+0:176      Sequence
+0:176        move second child to first child ( temp highp 4-component vector of float)
+0:176          'gath5' ( temp highp 4-component vector of float)
+0:176          textureGather ( global highp 4-component vector of float)
+0:176            'CA5' ( uniform highp samplerCubeArrayShadow)
+0:176            Constant:
+0:176              0.500000
+0:176              0.500000
+0:176              0.500000
+0:176              0.500000
+0:176            Constant:
+0:176              2.500000
+0:178      Sequence
+0:178        move second child to first child ( temp highp 3-component vector of int)
+0:178          's1' ( temp highp 3-component vector of int)
+0:178          imageQuerySize ( global highp 3-component vector of int)
+0:178            'CA1' ( writeonly uniform highp imageCubeArray)
+0:179      Sequence
+0:179        move second child to first child ( temp highp 3-component vector of int)
+0:179          's2' ( temp highp 3-component vector of int)
+0:179          imageQuerySize ( global highp 3-component vector of int)
+0:179            'CA2' ( writeonly uniform highp iimageCubeArray)
+0:180      Sequence
+0:180        move second child to first child ( temp highp 3-component vector of int)
+0:180          's3' ( temp highp 3-component vector of int)
+0:180          imageQuerySize ( global highp 3-component vector of int)
+0:180            'CA3' ( writeonly uniform highp uimageCubeArray)
+0:182      imageStore ( global highp void)
+0:182        'CA1' ( writeonly uniform highp imageCubeArray)
+0:182        's3' ( temp highp 3-component vector of int)
+0:182        Constant:
+0:182          1.000000
+0:182          1.000000
+0:182          1.000000
+0:182          1.000000
+0:183      imageStore ( global highp void)
+0:183        'CA2' ( writeonly uniform highp iimageCubeArray)
+0:183        's3' ( temp highp 3-component vector of int)
+0:183        Constant:
+0:183          1 (const int)
+0:183          1 (const int)
+0:183          1 (const int)
+0:183          1 (const int)
+0:184      imageStore ( global highp void)
+0:184        'CA3' ( writeonly uniform highp uimageCubeArray)
+0:184        's3' ( temp highp 3-component vector of int)
+0:184        Constant:
+0:184          1 (const uint)
+0:184          1 (const uint)
+0:184          1 (const uint)
+0:184          1 (const uint)
+0:186      Sequence
+0:186        move second child to first child ( temp highp 4-component vector of float)
+0:186          'cl1' ( temp highp 4-component vector of float)
+0:186          imageLoad ( global highp 4-component vector of float)
+0:186            'rCA1' (layout( rgba16f) readonly uniform highp imageCubeArray)
+0:186            's3' ( temp highp 3-component vector of int)
+0:187      Sequence
+0:187        move second child to first child ( temp highp 4-component vector of int)
+0:187          'cl2' ( temp highp 4-component vector of int)
+0:187          imageLoad ( global highp 4-component vector of int)
+0:187            'rCA2' (layout( rgba32i) readonly uniform highp iimageCubeArray)
+0:187            's3' ( temp highp 3-component vector of int)
+0:188      Sequence
+0:188        move second child to first child ( temp highp 4-component vector of uint)
+0:188          'cl3' ( temp highp 4-component vector of uint)
+0:188          imageLoad ( global highp 4-component vector of uint)
+0:188            'rCA3' (layout( r32ui) readonly uniform highp uimageCubeArray)
+0:188            's3' ( temp highp 3-component vector of int)
+0:203  Function Definition: MSA( ( global void)
+0:203    Function Parameters: 
+0:205    Sequence
+0:205      Sequence
+0:205        move second child to first child ( temp highp 4-component vector of float)
+0:205          'tf' ( temp highp 4-component vector of float)
+0:205          textureFetch ( global highp 4-component vector of float)
+0:205            'samp2DMSA' ( uniform highp sampler2DMSArray)
+0:205            Constant:
+0:205              5 (const int)
+0:205              5 (const int)
+0:205              5 (const int)
+0:205            Constant:
+0:205              2 (const int)
+0:206      Sequence
+0:206        move second child to first child ( temp highp 4-component vector of int)
+0:206          'tfi' ( temp highp 4-component vector of int)
+0:206          textureFetch ( global highp 4-component vector of int)
+0:206            'samp2DMSAi' ( uniform highp isampler2DMSArray)
+0:206            Constant:
+0:206              5 (const int)
+0:206              5 (const int)
+0:206              5 (const int)
+0:206            Constant:
+0:206              2 (const int)
+0:207      Sequence
+0:207        move second child to first child ( temp highp 4-component vector of uint)
+0:207          'tfu' ( temp highp 4-component vector of uint)
+0:207          textureFetch ( global highp 4-component vector of uint)
+0:207            'samp2DMSAu' ( uniform highp usampler2DMSArray)
+0:207            Constant:
+0:207              5 (const int)
+0:207              5 (const int)
+0:207              5 (const int)
+0:207            Constant:
+0:207              2 (const int)
+0:209      Sequence
+0:209        move second child to first child ( temp highp 3-component vector of int)
+0:209          'tfs' ( temp highp 3-component vector of int)
+0:209          textureSize ( global highp 3-component vector of int)
+0:209            'samp2DMSA' ( uniform highp sampler2DMSArray)
+0:210      Sequence
+0:210        move second child to first child ( temp highp 3-component vector of int)
+0:210          'tfsi' ( temp highp 3-component vector of int)
+0:210          textureSize ( global highp 3-component vector of int)
+0:210            'samp2DMSAi' ( uniform highp isampler2DMSArray)
+0:212      Sequence
+0:212        move second child to first child ( temp highp 3-component vector of int)
+0:212          'tfsu' ( temp highp 3-component vector of int)
+0:212          textureSize ( global highp 3-component vector of int)
+0:212            'samp2DMSAu' ( uniform highp usampler2DMSArray)
+0:220  Function Definition: goodImageAtom( ( global void)
+0:220    Function Parameters: 
+0:?     Sequence
+0:226      imageAtomicAdd ( global highp int)
+0:226        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:226        'P' ( uniform highp 2-component vector of int)
+0:226        'dati' ( temp highp int)
+0:227      imageAtomicAdd ( global highp uint)
+0:227        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:227        'P' ( uniform highp 2-component vector of int)
+0:227        'datu' ( temp highp uint)
+0:228      imageAtomicMin ( global highp int)
+0:228        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:228        'P' ( uniform highp 2-component vector of int)
+0:228        'dati' ( temp highp int)
+0:229      imageAtomicMin ( global highp uint)
+0:229        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:229        'P' ( uniform highp 2-component vector of int)
+0:229        'datu' ( temp highp uint)
+0:230      imageAtomicMax ( global highp int)
+0:230        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:230        'P' ( uniform highp 2-component vector of int)
+0:230        'dati' ( temp highp int)
+0:231      imageAtomicMax ( global highp uint)
+0:231        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:231        'P' ( uniform highp 2-component vector of int)
+0:231        'datu' ( temp highp uint)
+0:232      imageAtomicAnd ( global highp int)
+0:232        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:232        'P' ( uniform highp 2-component vector of int)
+0:232        'dati' ( temp highp int)
+0:233      imageAtomicAnd ( global highp uint)
+0:233        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:233        'P' ( uniform highp 2-component vector of int)
+0:233        'datu' ( temp highp uint)
+0:234      imageAtomicOr ( global highp int)
+0:234        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:234        'P' ( uniform highp 2-component vector of int)
+0:234        'dati' ( temp highp int)
+0:235      imageAtomicOr ( global highp uint)
+0:235        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:235        'P' ( uniform highp 2-component vector of int)
+0:235        'datu' ( temp highp uint)
+0:236      imageAtomicXor ( global highp int)
+0:236        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:236        'P' ( uniform highp 2-component vector of int)
+0:236        'dati' ( temp highp int)
+0:237      imageAtomicXor ( global highp uint)
+0:237        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:237        'P' ( uniform highp 2-component vector of int)
+0:237        'datu' ( temp highp uint)
+0:238      imageAtomicExchange ( global highp int)
+0:238        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:238        'P' ( uniform highp 2-component vector of int)
+0:238        'dati' ( temp highp int)
+0:239      imageAtomicExchange ( global highp uint)
+0:239        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:239        'P' ( uniform highp 2-component vector of int)
+0:239        'datu' ( temp highp uint)
+0:240      imageAtomicExchange ( global highp float)
+0:240        'im2Df' (layout( r32f) uniform highp image2D)
+0:240        'P' ( uniform highp 2-component vector of int)
+0:240        'datf' ( temp highp float)
+0:241      imageAtomicCompSwap ( global highp int)
+0:241        'im2Di' (layout( r32i) uniform highp iimage2D)
+0:241        'P' ( uniform highp 2-component vector of int)
+0:241        Constant:
+0:241          3 (const int)
+0:241        'dati' ( temp highp int)
+0:242      imageAtomicCompSwap ( global highp uint)
+0:242        'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:242        'P' ( uniform highp 2-component vector of int)
+0:242        Constant:
+0:242          5 (const uint)
+0:242        'datu' ( temp highp uint)
+0:250  Function Definition: badInterp( ( global void)
+0:250    Function Parameters: 
+0:252    Sequence
+0:252      Constant:
+0:252        0.000000
+0:253      Constant:
+0:253        0.000000
+0:254      Constant:
+0:254        0.000000
+0:?   Linker Objects
+0:?     'outbinst' ( out block{ out highp int a,  out highp 4-component vector of float v,  out highp sampler2D s})
+0:?     'anon@0' ( out block{layout( location=12) out highp int aAnon, layout( location=13) out highp 4-component vector of float vAnon})
+0:?     'aliased' (layout( location=12) smooth out highp int)
+0:?     'inbinst' ( in block{ in highp int a})
+0:?     'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position, })
+0:?     'smon' ( smooth out block{ out highp int i})
+0:?     'fmon' ( flat out block{ out highp int i})
+0:?     'cmon' ( centroid out block{ out highp int i})
+0:?     'imon' ( invariant out block{ out highp int i})
+0:?     'inf' ( in highp 2-component vector of float)
+0:?     'ing' ( in highp 2-component vector of float)
+0:?     'offsets' ( uniform 4-element array of highp 2-component vector of int)
+0:?     'sArray' ( uniform 4-element array of lowp sampler2D)
+0:?     'sIndex' ( uniform highp int)
+0:?     'auArray' (layout( binding=0 offset=0) uniform 2-element array of highp atomic_uint)
+0:?     'ubInst' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform highp int i})
+0:?     'bbInst' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer highp int i})
+0:?     'iArray' ( writeonly uniform 5-element array of highp image2D)
+0:?     'constOffsets' ( const 4-element array of highp 2-component vector of int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?     'noPreSamp1' ( uniform mediump samplerBuffer)
+0:?     'noPreSamp2' ( uniform mediump isamplerBuffer)
+0:?     'noPreSamp3' ( uniform mediump usamplerBuffer)
+0:?     'noPreSamp4' ( writeonly uniform mediump imageBuffer)
+0:?     'noPreSamp5' ( writeonly uniform mediump iimageBuffer)
+0:?     'noPreSamp6' ( writeonly uniform mediump uimageBuffer)
+0:?     'bufSamp1' ( uniform highp samplerBuffer)
+0:?     'bufSamp2' ( uniform highp isamplerBuffer)
+0:?     'bufSamp3' ( uniform highp usamplerBuffer)
+0:?     'bufSamp4' ( writeonly uniform highp imageBuffer)
+0:?     'bufSamp5' ( writeonly uniform highp iimageBuffer)
+0:?     'bufSamp6' ( writeonly uniform highp uimageBuffer)
+0:?     'noPreCA1' ( writeonly uniform mediump imageCubeArray)
+0:?     'noPreCA2' ( writeonly uniform mediump iimageCubeArray)
+0:?     'noPreCA3' ( writeonly uniform mediump uimageCubeArray)
+0:?     'noPreCA4' ( uniform mediump samplerCubeArray)
+0:?     'noPreCA5' ( uniform mediump samplerCubeArrayShadow)
+0:?     'noPreCA6' ( uniform mediump isamplerCubeArray)
+0:?     'noPreCA7' ( uniform mediump usamplerCubeArray)
+0:?     'CA1' ( writeonly uniform highp imageCubeArray)
+0:?     'CA2' ( writeonly uniform highp iimageCubeArray)
+0:?     'CA3' ( writeonly uniform highp uimageCubeArray)
+0:?     'rCA1' (layout( rgba16f) readonly uniform highp imageCubeArray)
+0:?     'rCA2' (layout( rgba32i) readonly uniform highp iimageCubeArray)
+0:?     'rCA3' (layout( r32ui) readonly uniform highp uimageCubeArray)
+0:?     'CA4' ( uniform highp samplerCubeArray)
+0:?     'CA5' ( uniform highp samplerCubeArrayShadow)
+0:?     'CA6' ( uniform highp isamplerCubeArray)
+0:?     'CA7' ( uniform highp usamplerCubeArray)
+0:?     'noPrec2DMS' ( uniform mediump sampler2DMSArray)
+0:?     'noPrec2DMSi' ( uniform mediump isampler2DMSArray)
+0:?     'noPrec2DMSu' ( uniform mediump usampler2DMSArray)
+0:?     'samp2DMSA' ( uniform highp sampler2DMSArray)
+0:?     'samp2DMSAi' ( uniform highp isampler2DMSArray)
+0:?     'samp2DMSAu' ( uniform highp usampler2DMSArray)
+0:?     'im2Df' (layout( r32f) uniform highp image2D)
+0:?     'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:?     'im2Di' (layout( r32i) uniform highp iimage2D)
+0:?     'P' ( uniform highp 2-component vector of int)
+0:?     'colorSample' ( smooth sample out highp 4-component vector of float)
+0:?     'colorfsi' ( flat sample out highp 4-component vector of float)
+0:?     'sampInArray' ( smooth sample out 4-element array of highp 3-component vector of float)
+0:?     'inv4' ( in highp 4-component vector of float)
+0:?     'gl_VertexID' ( gl_VertexId highp int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 320
+ERROR: node is still EOpNull!
+0:23  Function Definition: main( ( global void)
+0:23    Function Parameters: 
+0:25    Sequence
+0:25      Sequence
+0:25        move second child to first child ( temp highp int)
+0:25          'sum' ( temp highp int)
+0:25          add ( temp highp int)
+0:25            'gl_VertexID' ( gl_VertexId highp int VertexId)
+0:26            'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
+0:27      move second child to first child ( temp highp 4-component vector of float)
+0:27        gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
+0:27          'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position, })
+0:27          Constant:
+0:27            0 (const uint)
+0:27        Constant:
+0:27          1.000000
+0:27          1.000000
+0:27          1.000000
+0:27          1.000000
+0:28      gl_PointSize: direct index for structure ( gl_PointSize highp void PointSize)
+0:28        'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position, })
+0:28        Constant:
+0:28          1 (const uint)
+0:?   Linker Objects
+0:?     'outbinst' ( out block{ out highp int a,  out highp 4-component vector of float v,  out highp sampler2D s})
+0:?     'anon@0' ( out block{layout( location=12) out highp int aAnon, layout( location=13) out highp 4-component vector of float vAnon})
+0:?     'aliased' (layout( location=12) smooth out highp int)
+0:?     'inbinst' ( in block{ in highp int a})
+0:?     'anon@1' ( out block{ gl_Position highp 4-component vector of float Position gl_Position, })
+0:?     'smon' ( smooth out block{ out highp int i})
+0:?     'fmon' ( flat out block{ out highp int i})
+0:?     'cmon' ( centroid out block{ out highp int i})
+0:?     'imon' ( invariant out block{ out highp int i})
+0:?     'inf' ( in highp 2-component vector of float)
+0:?     'ing' ( in highp 2-component vector of float)
+0:?     'offsets' ( uniform 4-element array of highp 2-component vector of int)
+0:?     'sArray' ( uniform 4-element array of lowp sampler2D)
+0:?     'sIndex' ( uniform highp int)
+0:?     'auArray' (layout( binding=0 offset=0) uniform 2-element array of highp atomic_uint)
+0:?     'ubInst' (layout( column_major shared) uniform 4-element array of block{layout( column_major shared) uniform highp int i})
+0:?     'bbInst' (layout( column_major shared) buffer 4-element array of block{layout( column_major shared) buffer highp int i})
+0:?     'iArray' ( writeonly uniform 5-element array of highp image2D)
+0:?     'constOffsets' ( const 4-element array of highp 2-component vector of int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?       0 (const int)
+0:?     'noPreSamp1' ( uniform mediump samplerBuffer)
+0:?     'noPreSamp2' ( uniform mediump isamplerBuffer)
+0:?     'noPreSamp3' ( uniform mediump usamplerBuffer)
+0:?     'noPreSamp4' ( writeonly uniform mediump imageBuffer)
+0:?     'noPreSamp5' ( writeonly uniform mediump iimageBuffer)
+0:?     'noPreSamp6' ( writeonly uniform mediump uimageBuffer)
+0:?     'bufSamp1' ( uniform highp samplerBuffer)
+0:?     'bufSamp2' ( uniform highp isamplerBuffer)
+0:?     'bufSamp3' ( uniform highp usamplerBuffer)
+0:?     'bufSamp4' ( writeonly uniform highp imageBuffer)
+0:?     'bufSamp5' ( writeonly uniform highp iimageBuffer)
+0:?     'bufSamp6' ( writeonly uniform highp uimageBuffer)
+0:?     'noPreCA1' ( writeonly uniform mediump imageCubeArray)
+0:?     'noPreCA2' ( writeonly uniform mediump iimageCubeArray)
+0:?     'noPreCA3' ( writeonly uniform mediump uimageCubeArray)
+0:?     'noPreCA4' ( uniform mediump samplerCubeArray)
+0:?     'noPreCA5' ( uniform mediump samplerCubeArrayShadow)
+0:?     'noPreCA6' ( uniform mediump isamplerCubeArray)
+0:?     'noPreCA7' ( uniform mediump usamplerCubeArray)
+0:?     'CA1' ( writeonly uniform highp imageCubeArray)
+0:?     'CA2' ( writeonly uniform highp iimageCubeArray)
+0:?     'CA3' ( writeonly uniform highp uimageCubeArray)
+0:?     'rCA1' (layout( rgba16f) readonly uniform highp imageCubeArray)
+0:?     'rCA2' (layout( rgba32i) readonly uniform highp iimageCubeArray)
+0:?     'rCA3' (layout( r32ui) readonly uniform highp uimageCubeArray)
+0:?     'CA4' ( uniform highp samplerCubeArray)
+0:?     'CA5' ( uniform highp samplerCubeArrayShadow)
+0:?     'CA6' ( uniform highp isamplerCubeArray)
+0:?     'CA7' ( uniform highp usamplerCubeArray)
+0:?     'noPrec2DMS' ( uniform mediump sampler2DMSArray)
+0:?     'noPrec2DMSi' ( uniform mediump isampler2DMSArray)
+0:?     'noPrec2DMSu' ( uniform mediump usampler2DMSArray)
+0:?     'samp2DMSA' ( uniform highp sampler2DMSArray)
+0:?     'samp2DMSAi' ( uniform highp isampler2DMSArray)
+0:?     'samp2DMSAu' ( uniform highp usampler2DMSArray)
+0:?     'im2Df' (layout( r32f) uniform highp image2D)
+0:?     'im2Du' (layout( r32ui) uniform highp uimage2D)
+0:?     'im2Di' (layout( r32i) uniform highp iimage2D)
+0:?     'P' ( uniform highp 2-component vector of int)
+0:?     'colorSample' ( smooth sample out highp 4-component vector of float)
+0:?     'colorfsi' ( flat sample out highp 4-component vector of float)
+0:?     'sampInArray' ( smooth sample out 4-element array of highp 3-component vector of float)
+0:?     'inv4' ( in highp 4-component vector of float)
+0:?     'gl_VertexID' ( gl_VertexId highp int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
+

+ 25 - 0
3rdparty/glslang/Test/baseResults/435.vert.out

@@ -0,0 +1,25 @@
+435.vert
+ERROR: version not supported
+ERROR: 1 compilation errors.  No code generated.
+
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:2  Function Definition: main( ( global void)
+0:2    Function Parameters: 
+0:?   Linker Objects
+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:2  Function Definition: main( ( global void)
+0:2    Function Parameters: 
+0:?   Linker Objects
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+

+ 2 - 0
3rdparty/glslang/Test/baseResults/hlsl.clipdistance-4.vert.out

@@ -130,6 +130,7 @@ Shader version: 500
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out structure{})
 0:?     'Position' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
 
 
 Linked vertex stage:
@@ -266,6 +267,7 @@ Shader version: 500
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out structure{})
 0:?     'Position' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001

+ 2 - 0
3rdparty/glslang/Test/baseResults/hlsl.clipdistance-5.vert.out

@@ -154,6 +154,7 @@ Shader version: 500
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out structure{})
 0:?     'Position' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
 
 
 Linked vertex stage:
@@ -314,6 +315,7 @@ Shader version: 500
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out structure{})
 0:?     'Position' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001

+ 562 - 0
3rdparty/glslang/Test/baseResults/hlsl.clipdistance-6.vert.out

@@ -0,0 +1,562 @@
+hlsl.clipdistance-6.vert
+Shader version: 500
+0:? Sequence
+0:8  Function Definition: @main( ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8    Function Parameters: 
+0:?     Sequence
+0:10      move second child to first child ( temp 4-component vector of float)
+0:10        Position: direct index for structure ( temp 4-component vector of float)
+0:10          'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:10          Constant:
+0:10            0 (const int)
+0:10        Constant:
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:12      move second child to first child ( temp float)
+0:12        direct index ( temp float)
+0:12          clip0: direct index for structure ( temp 4-component vector of float)
+0:12            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:12            Constant:
+0:12              1 (const int)
+0:12          Constant:
+0:12            0 (const int)
+0:12        Constant:
+0:12          0.000000
+0:13      move second child to first child ( temp float)
+0:13        direct index ( temp float)
+0:13          clip0: direct index for structure ( temp 4-component vector of float)
+0:13            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:13            Constant:
+0:13              1 (const int)
+0:13          Constant:
+0:13            1 (const int)
+0:13        Constant:
+0:13          1.000000
+0:14      move second child to first child ( temp float)
+0:14        direct index ( temp float)
+0:14          clip0: direct index for structure ( temp 4-component vector of float)
+0:14            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:14            Constant:
+0:14              1 (const int)
+0:14          Constant:
+0:14            2 (const int)
+0:14        Constant:
+0:14          2.000000
+0:15      move second child to first child ( temp float)
+0:15        direct index ( temp float)
+0:15          clip0: direct index for structure ( temp 4-component vector of float)
+0:15            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:15            Constant:
+0:15              1 (const int)
+0:15          Constant:
+0:15            3 (const int)
+0:15        Constant:
+0:15          3.000000
+0:17      move second child to first child ( temp float)
+0:17        direct index ( temp float)
+0:17          clip1: direct index for structure ( temp 4-component vector of float)
+0:17            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:17            Constant:
+0:17              2 (const int)
+0:17          Constant:
+0:17            0 (const int)
+0:17        Constant:
+0:17          4.000000
+0:18      move second child to first child ( temp float)
+0:18        direct index ( temp float)
+0:18          clip1: direct index for structure ( temp 4-component vector of float)
+0:18            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:18            Constant:
+0:18              2 (const int)
+0:18          Constant:
+0:18            1 (const int)
+0:18        Constant:
+0:18          5.000000
+0:19      move second child to first child ( temp float)
+0:19        direct index ( temp float)
+0:19          clip1: direct index for structure ( temp 4-component vector of float)
+0:19            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:19            Constant:
+0:19              2 (const int)
+0:19          Constant:
+0:19            2 (const int)
+0:19        Constant:
+0:19          6.000000
+0:20      move second child to first child ( temp float)
+0:20        direct index ( temp float)
+0:20          clip1: direct index for structure ( temp 4-component vector of float)
+0:20            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:20            Constant:
+0:20              2 (const int)
+0:20          Constant:
+0:20            3 (const int)
+0:20        Constant:
+0:20          7.000000
+0:22      Branch: Return with expression
+0:22        'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                3 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                4 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                5 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                6 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                7 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+
+
+Linked vertex stage:
+
+
+Shader version: 500
+0:? Sequence
+0:8  Function Definition: @main( ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8    Function Parameters: 
+0:?     Sequence
+0:10      move second child to first child ( temp 4-component vector of float)
+0:10        Position: direct index for structure ( temp 4-component vector of float)
+0:10          'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:10          Constant:
+0:10            0 (const int)
+0:10        Constant:
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:12      move second child to first child ( temp float)
+0:12        direct index ( temp float)
+0:12          clip0: direct index for structure ( temp 4-component vector of float)
+0:12            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:12            Constant:
+0:12              1 (const int)
+0:12          Constant:
+0:12            0 (const int)
+0:12        Constant:
+0:12          0.000000
+0:13      move second child to first child ( temp float)
+0:13        direct index ( temp float)
+0:13          clip0: direct index for structure ( temp 4-component vector of float)
+0:13            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:13            Constant:
+0:13              1 (const int)
+0:13          Constant:
+0:13            1 (const int)
+0:13        Constant:
+0:13          1.000000
+0:14      move second child to first child ( temp float)
+0:14        direct index ( temp float)
+0:14          clip0: direct index for structure ( temp 4-component vector of float)
+0:14            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:14            Constant:
+0:14              1 (const int)
+0:14          Constant:
+0:14            2 (const int)
+0:14        Constant:
+0:14          2.000000
+0:15      move second child to first child ( temp float)
+0:15        direct index ( temp float)
+0:15          clip0: direct index for structure ( temp 4-component vector of float)
+0:15            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:15            Constant:
+0:15              1 (const int)
+0:15          Constant:
+0:15            3 (const int)
+0:15        Constant:
+0:15          3.000000
+0:17      move second child to first child ( temp float)
+0:17        direct index ( temp float)
+0:17          clip1: direct index for structure ( temp 4-component vector of float)
+0:17            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:17            Constant:
+0:17              2 (const int)
+0:17          Constant:
+0:17            0 (const int)
+0:17        Constant:
+0:17          4.000000
+0:18      move second child to first child ( temp float)
+0:18        direct index ( temp float)
+0:18          clip1: direct index for structure ( temp 4-component vector of float)
+0:18            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:18            Constant:
+0:18              2 (const int)
+0:18          Constant:
+0:18            1 (const int)
+0:18        Constant:
+0:18          5.000000
+0:19      move second child to first child ( temp float)
+0:19        direct index ( temp float)
+0:19          clip1: direct index for structure ( temp 4-component vector of float)
+0:19            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:19            Constant:
+0:19              2 (const int)
+0:19          Constant:
+0:19            2 (const int)
+0:19        Constant:
+0:19          6.000000
+0:20      move second child to first child ( temp float)
+0:20        direct index ( temp float)
+0:20          clip1: direct index for structure ( temp 4-component vector of float)
+0:20            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:20            Constant:
+0:20              2 (const int)
+0:20          Constant:
+0:20            3 (const int)
+0:20        Constant:
+0:20          7.000000
+0:22      Branch: Return with expression
+0:22        'Output' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                3 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                4 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                5 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                6 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                7 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 89
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 49 55 88
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 8  "VS_OUTPUT"
+                              MemberName 8(VS_OUTPUT) 0  "Position"
+                              MemberName 8(VS_OUTPUT) 1  "clip0"
+                              MemberName 8(VS_OUTPUT) 2  "clip1"
+                              Name 10  "@main("
+                              Name 13  "Output"
+                              Name 46  "flattenTemp"
+                              Name 49  "@entryPointOutput_Position"
+                              Name 55  "@entryPointOutput_clip1"
+                              Name 86  "VS_OUTPUT"
+                              Name 88  "@entryPointOutput"
+                              Decorate 49(@entryPointOutput_Position) BuiltIn Position
+                              Decorate 55(@entryPointOutput_clip1) BuiltIn ClipDistance
+                              Decorate 88(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+    8(VS_OUTPUT):             TypeStruct 7(fvec4) 7(fvec4) 7(fvec4)
+               9:             TypeFunction 8(VS_OUTPUT)
+              12:             TypePointer Function 8(VS_OUTPUT)
+              14:             TypeInt 32 1
+              15:     14(int) Constant 0
+              16:    6(float) Constant 0
+              17:    7(fvec4) ConstantComposite 16 16 16 16
+              18:             TypePointer Function 7(fvec4)
+              20:     14(int) Constant 1
+              21:             TypeInt 32 0
+              22:     21(int) Constant 0
+              23:             TypePointer Function 6(float)
+              25:    6(float) Constant 1065353216
+              26:     21(int) Constant 1
+              28:    6(float) Constant 1073741824
+              29:     21(int) Constant 2
+              31:    6(float) Constant 1077936128
+              32:     21(int) Constant 3
+              34:     14(int) Constant 2
+              35:    6(float) Constant 1082130432
+              37:    6(float) Constant 1084227584
+              39:    6(float) Constant 1086324736
+              41:    6(float) Constant 1088421888
+              48:             TypePointer Output 7(fvec4)
+49(@entryPointOutput_Position):     48(ptr) Variable Output
+              52:     21(int) Constant 8
+              53:             TypeArray 6(float) 52
+              54:             TypePointer Output 53
+55(@entryPointOutput_clip1):     54(ptr) Variable Output
+              58:             TypePointer Output 6(float)
+              66:     14(int) Constant 3
+              70:     14(int) Constant 4
+              74:     14(int) Constant 5
+              78:     14(int) Constant 6
+              82:     14(int) Constant 7
+   86(VS_OUTPUT):             TypeStruct
+              87:             TypePointer Output 86(VS_OUTPUT)
+88(@entryPointOutput):     87(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+ 46(flattenTemp):     12(ptr) Variable Function
+              47:8(VS_OUTPUT) FunctionCall 10(@main()
+                              Store 46(flattenTemp) 47
+              50:     18(ptr) AccessChain 46(flattenTemp) 15
+              51:    7(fvec4) Load 50
+                              Store 49(@entryPointOutput_Position) 51
+              56:     23(ptr) AccessChain 46(flattenTemp) 20 22
+              57:    6(float) Load 56
+              59:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 15
+                              Store 59 57
+              60:     23(ptr) AccessChain 46(flattenTemp) 20 26
+              61:    6(float) Load 60
+              62:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 20
+                              Store 62 61
+              63:     23(ptr) AccessChain 46(flattenTemp) 20 29
+              64:    6(float) Load 63
+              65:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 34
+                              Store 65 64
+              67:     23(ptr) AccessChain 46(flattenTemp) 20 32
+              68:    6(float) Load 67
+              69:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 66
+                              Store 69 68
+              71:     23(ptr) AccessChain 46(flattenTemp) 34 22
+              72:    6(float) Load 71
+              73:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 70
+                              Store 73 72
+              75:     23(ptr) AccessChain 46(flattenTemp) 34 26
+              76:    6(float) Load 75
+              77:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 74
+                              Store 77 76
+              79:     23(ptr) AccessChain 46(flattenTemp) 34 29
+              80:    6(float) Load 79
+              81:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 78
+                              Store 81 80
+              83:     23(ptr) AccessChain 46(flattenTemp) 34 32
+              84:    6(float) Load 83
+              85:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 82
+                              Store 85 84
+                              Return
+                              FunctionEnd
+      10(@main():8(VS_OUTPUT) Function None 9
+              11:             Label
+      13(Output):     12(ptr) Variable Function
+              19:     18(ptr) AccessChain 13(Output) 15
+                              Store 19 17
+              24:     23(ptr) AccessChain 13(Output) 20 22
+                              Store 24 16
+              27:     23(ptr) AccessChain 13(Output) 20 26
+                              Store 27 25
+              30:     23(ptr) AccessChain 13(Output) 20 29
+                              Store 30 28
+              33:     23(ptr) AccessChain 13(Output) 20 32
+                              Store 33 31
+              36:     23(ptr) AccessChain 13(Output) 34 22
+                              Store 36 35
+              38:     23(ptr) AccessChain 13(Output) 34 26
+                              Store 38 37
+              40:     23(ptr) AccessChain 13(Output) 34 29
+                              Store 40 39
+              42:     23(ptr) AccessChain 13(Output) 34 32
+                              Store 42 41
+              43:8(VS_OUTPUT) Load 13(Output)
+                              ReturnValue 43
+                              FunctionEnd

+ 511 - 0
3rdparty/glslang/Test/baseResults/hlsl.clipdistance-7.vert.out

@@ -0,0 +1,511 @@
+hlsl.clipdistance-7.vert
+Shader version: 500
+0:? Sequence
+0:8  Function Definition: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8    Function Parameters: 
+0:?     Sequence
+0:10      move second child to first child ( temp 4-component vector of float)
+0:10        Position: direct index for structure ( temp 4-component vector of float)
+0:10          'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:10          Constant:
+0:10            0 (const int)
+0:10        Constant:
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:12      move second child to first child ( temp float)
+0:12        direct index ( temp float)
+0:12          clip0: direct index for structure ( temp 3-component vector of float)
+0:12            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:12            Constant:
+0:12              1 (const int)
+0:12          Constant:
+0:12            0 (const int)
+0:12        Constant:
+0:12          0.000000
+0:13      move second child to first child ( temp float)
+0:13        direct index ( temp float)
+0:13          clip0: direct index for structure ( temp 3-component vector of float)
+0:13            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:13            Constant:
+0:13              1 (const int)
+0:13          Constant:
+0:13            1 (const int)
+0:13        Constant:
+0:13          1.000000
+0:14      move second child to first child ( temp float)
+0:14        direct index ( temp float)
+0:14          clip0: direct index for structure ( temp 3-component vector of float)
+0:14            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:14            Constant:
+0:14              1 (const int)
+0:14          Constant:
+0:14            2 (const int)
+0:14        Constant:
+0:14          2.000000
+0:17      move second child to first child ( temp float)
+0:17        direct index ( temp float)
+0:17          clip1: direct index for structure ( temp 4-component vector of float)
+0:17            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:17            Constant:
+0:17              2 (const int)
+0:17          Constant:
+0:17            0 (const int)
+0:17        Constant:
+0:17          4.000000
+0:18      move second child to first child ( temp float)
+0:18        direct index ( temp float)
+0:18          clip1: direct index for structure ( temp 4-component vector of float)
+0:18            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:18            Constant:
+0:18              2 (const int)
+0:18          Constant:
+0:18            1 (const int)
+0:18        Constant:
+0:18          5.000000
+0:19      move second child to first child ( temp float)
+0:19        direct index ( temp float)
+0:19          clip1: direct index for structure ( temp 4-component vector of float)
+0:19            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:19            Constant:
+0:19              2 (const int)
+0:19          Constant:
+0:19            2 (const int)
+0:19        Constant:
+0:19          6.000000
+0:20      move second child to first child ( temp float)
+0:20        direct index ( temp float)
+0:20          clip1: direct index for structure ( temp 4-component vector of float)
+0:20            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:20            Constant:
+0:20              2 (const int)
+0:20          Constant:
+0:20            3 (const int)
+0:20        Constant:
+0:20          7.000000
+0:22      Branch: Return with expression
+0:22        'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                4 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                5 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                6 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                7 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+
+
+Linked vertex stage:
+
+
+Shader version: 500
+0:? Sequence
+0:8  Function Definition: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8    Function Parameters: 
+0:?     Sequence
+0:10      move second child to first child ( temp 4-component vector of float)
+0:10        Position: direct index for structure ( temp 4-component vector of float)
+0:10          'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:10          Constant:
+0:10            0 (const int)
+0:10        Constant:
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:12      move second child to first child ( temp float)
+0:12        direct index ( temp float)
+0:12          clip0: direct index for structure ( temp 3-component vector of float)
+0:12            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:12            Constant:
+0:12              1 (const int)
+0:12          Constant:
+0:12            0 (const int)
+0:12        Constant:
+0:12          0.000000
+0:13      move second child to first child ( temp float)
+0:13        direct index ( temp float)
+0:13          clip0: direct index for structure ( temp 3-component vector of float)
+0:13            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:13            Constant:
+0:13              1 (const int)
+0:13          Constant:
+0:13            1 (const int)
+0:13        Constant:
+0:13          1.000000
+0:14      move second child to first child ( temp float)
+0:14        direct index ( temp float)
+0:14          clip0: direct index for structure ( temp 3-component vector of float)
+0:14            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:14            Constant:
+0:14              1 (const int)
+0:14          Constant:
+0:14            2 (const int)
+0:14        Constant:
+0:14          2.000000
+0:17      move second child to first child ( temp float)
+0:17        direct index ( temp float)
+0:17          clip1: direct index for structure ( temp 4-component vector of float)
+0:17            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:17            Constant:
+0:17              2 (const int)
+0:17          Constant:
+0:17            0 (const int)
+0:17        Constant:
+0:17          4.000000
+0:18      move second child to first child ( temp float)
+0:18        direct index ( temp float)
+0:18          clip1: direct index for structure ( temp 4-component vector of float)
+0:18            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:18            Constant:
+0:18              2 (const int)
+0:18          Constant:
+0:18            1 (const int)
+0:18        Constant:
+0:18          5.000000
+0:19      move second child to first child ( temp float)
+0:19        direct index ( temp float)
+0:19          clip1: direct index for structure ( temp 4-component vector of float)
+0:19            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:19            Constant:
+0:19              2 (const int)
+0:19          Constant:
+0:19            2 (const int)
+0:19        Constant:
+0:19          6.000000
+0:20      move second child to first child ( temp float)
+0:20        direct index ( temp float)
+0:20          clip1: direct index for structure ( temp 4-component vector of float)
+0:20            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:20            Constant:
+0:20              2 (const int)
+0:20          Constant:
+0:20            3 (const int)
+0:20        Constant:
+0:20          7.000000
+0:22      Branch: Return with expression
+0:22        'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                4 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                5 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                6 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                7 (const int)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 84
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 48 54 83
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 9  "VS_OUTPUT"
+                              MemberName 9(VS_OUTPUT) 0  "Position"
+                              MemberName 9(VS_OUTPUT) 1  "clip0"
+                              MemberName 9(VS_OUTPUT) 2  "clip1"
+                              Name 11  "@main("
+                              Name 14  "Output"
+                              Name 45  "flattenTemp"
+                              Name 48  "@entryPointOutput_Position"
+                              Name 54  "@entryPointOutput_clip1"
+                              Name 81  "VS_OUTPUT"
+                              Name 83  "@entryPointOutput"
+                              Decorate 48(@entryPointOutput_Position) BuiltIn Position
+                              Decorate 54(@entryPointOutput_clip1) BuiltIn ClipDistance
+                              Decorate 83(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeVector 6(float) 3
+    9(VS_OUTPUT):             TypeStruct 7(fvec4) 8(fvec3) 7(fvec4)
+              10:             TypeFunction 9(VS_OUTPUT)
+              13:             TypePointer Function 9(VS_OUTPUT)
+              15:             TypeInt 32 1
+              16:     15(int) Constant 0
+              17:    6(float) Constant 0
+              18:    7(fvec4) ConstantComposite 17 17 17 17
+              19:             TypePointer Function 7(fvec4)
+              21:     15(int) Constant 1
+              22:             TypeInt 32 0
+              23:     22(int) Constant 0
+              24:             TypePointer Function 6(float)
+              26:    6(float) Constant 1065353216
+              27:     22(int) Constant 1
+              29:    6(float) Constant 1073741824
+              30:     22(int) Constant 2
+              32:     15(int) Constant 2
+              33:    6(float) Constant 1082130432
+              35:    6(float) Constant 1084227584
+              37:    6(float) Constant 1086324736
+              39:    6(float) Constant 1088421888
+              40:     22(int) Constant 3
+              47:             TypePointer Output 7(fvec4)
+48(@entryPointOutput_Position):     47(ptr) Variable Output
+              51:     22(int) Constant 8
+              52:             TypeArray 6(float) 51
+              53:             TypePointer Output 52
+54(@entryPointOutput_clip1):     53(ptr) Variable Output
+              57:             TypePointer Output 6(float)
+              65:     15(int) Constant 4
+              69:     15(int) Constant 5
+              73:     15(int) Constant 6
+              77:     15(int) Constant 7
+   81(VS_OUTPUT):             TypeStruct
+              82:             TypePointer Output 81(VS_OUTPUT)
+83(@entryPointOutput):     82(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+ 45(flattenTemp):     13(ptr) Variable Function
+              46:9(VS_OUTPUT) FunctionCall 11(@main()
+                              Store 45(flattenTemp) 46
+              49:     19(ptr) AccessChain 45(flattenTemp) 16
+              50:    7(fvec4) Load 49
+                              Store 48(@entryPointOutput_Position) 50
+              55:     24(ptr) AccessChain 45(flattenTemp) 21 23
+              56:    6(float) Load 55
+              58:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 16
+                              Store 58 56
+              59:     24(ptr) AccessChain 45(flattenTemp) 21 27
+              60:    6(float) Load 59
+              61:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 21
+                              Store 61 60
+              62:     24(ptr) AccessChain 45(flattenTemp) 21 30
+              63:    6(float) Load 62
+              64:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 32
+                              Store 64 63
+              66:     24(ptr) AccessChain 45(flattenTemp) 32 23
+              67:    6(float) Load 66
+              68:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 65
+                              Store 68 67
+              70:     24(ptr) AccessChain 45(flattenTemp) 32 27
+              71:    6(float) Load 70
+              72:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 69
+                              Store 72 71
+              74:     24(ptr) AccessChain 45(flattenTemp) 32 30
+              75:    6(float) Load 74
+              76:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 73
+                              Store 76 75
+              78:     24(ptr) AccessChain 45(flattenTemp) 32 40
+              79:    6(float) Load 78
+              80:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 77
+                              Store 80 79
+                              Return
+                              FunctionEnd
+      11(@main():9(VS_OUTPUT) Function None 10
+              12:             Label
+      14(Output):     13(ptr) Variable Function
+              20:     19(ptr) AccessChain 14(Output) 16
+                              Store 20 18
+              25:     24(ptr) AccessChain 14(Output) 21 23
+                              Store 25 17
+              28:     24(ptr) AccessChain 14(Output) 21 27
+                              Store 28 26
+              31:     24(ptr) AccessChain 14(Output) 21 30
+                              Store 31 29
+              34:     24(ptr) AccessChain 14(Output) 32 23
+                              Store 34 33
+              36:     24(ptr) AccessChain 14(Output) 32 27
+                              Store 36 35
+              38:     24(ptr) AccessChain 14(Output) 32 30
+                              Store 38 37
+              41:     24(ptr) AccessChain 14(Output) 32 40
+                              Store 41 39
+              42:9(VS_OUTPUT) Load 14(Output)
+                              ReturnValue 42
+                              FunctionEnd

+ 342 - 0
3rdparty/glslang/Test/baseResults/hlsl.clipdistance-8.vert.out

@@ -0,0 +1,342 @@
+hlsl.clipdistance-8.vert
+Shader version: 500
+0:? Sequence
+0:8  Function Definition: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8    Function Parameters: 
+0:?     Sequence
+0:10      move second child to first child ( temp 4-component vector of float)
+0:10        Position: direct index for structure ( temp 4-component vector of float)
+0:10          'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:10          Constant:
+0:10            0 (const int)
+0:10        Constant:
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:12      move second child to first child ( temp float)
+0:12        direct index ( temp float)
+0:12          clip0: direct index for structure ( temp 3-component vector of float)
+0:12            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:12            Constant:
+0:12              1 (const int)
+0:12          Constant:
+0:12            0 (const int)
+0:12        Constant:
+0:12          0.000000
+0:13      move second child to first child ( temp float)
+0:13        direct index ( temp float)
+0:13          clip0: direct index for structure ( temp 3-component vector of float)
+0:13            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:13            Constant:
+0:13              1 (const int)
+0:13          Constant:
+0:13            1 (const int)
+0:13        Constant:
+0:13          1.000000
+0:14      move second child to first child ( temp float)
+0:14        direct index ( temp float)
+0:14          clip0: direct index for structure ( temp 3-component vector of float)
+0:14            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:14            Constant:
+0:14              1 (const int)
+0:14          Constant:
+0:14            2 (const int)
+0:14        Constant:
+0:14          2.000000
+0:17      move second child to first child ( temp float)
+0:17        clip1: direct index for structure ( temp float)
+0:17          'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:17          Constant:
+0:17            2 (const int)
+0:17        Constant:
+0:17          3.000000
+0:19      Branch: Return with expression
+0:19        'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                3 (const int)
+0:8            clip1: direct index for structure ( temp float)
+0:8              'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8              Constant:
+0:8                2 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+
+
+Linked vertex stage:
+
+
+Shader version: 500
+0:? Sequence
+0:8  Function Definition: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8    Function Parameters: 
+0:?     Sequence
+0:10      move second child to first child ( temp 4-component vector of float)
+0:10        Position: direct index for structure ( temp 4-component vector of float)
+0:10          'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:10          Constant:
+0:10            0 (const int)
+0:10        Constant:
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:10          0.000000
+0:12      move second child to first child ( temp float)
+0:12        direct index ( temp float)
+0:12          clip0: direct index for structure ( temp 3-component vector of float)
+0:12            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:12            Constant:
+0:12              1 (const int)
+0:12          Constant:
+0:12            0 (const int)
+0:12        Constant:
+0:12          0.000000
+0:13      move second child to first child ( temp float)
+0:13        direct index ( temp float)
+0:13          clip0: direct index for structure ( temp 3-component vector of float)
+0:13            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:13            Constant:
+0:13              1 (const int)
+0:13          Constant:
+0:13            1 (const int)
+0:13        Constant:
+0:13          1.000000
+0:14      move second child to first child ( temp float)
+0:14        direct index ( temp float)
+0:14          clip0: direct index for structure ( temp 3-component vector of float)
+0:14            'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:14            Constant:
+0:14              1 (const int)
+0:14          Constant:
+0:14            2 (const int)
+0:14        Constant:
+0:14          2.000000
+0:17      move second child to first child ( temp float)
+0:17        clip1: direct index for structure ( temp float)
+0:17          'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:17          Constant:
+0:17            2 (const int)
+0:17        Constant:
+0:17          3.000000
+0:19      Branch: Return with expression
+0:19        'Output' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:8                'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                3 (const int)
+0:8            clip1: direct index for structure ( temp float)
+0:8              'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8              Constant:
+0:8                2 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 65
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 41 47 64
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 9  "VS_OUTPUT"
+                              MemberName 9(VS_OUTPUT) 0  "Position"
+                              MemberName 9(VS_OUTPUT) 1  "clip0"
+                              MemberName 9(VS_OUTPUT) 2  "clip1"
+                              Name 11  "@main("
+                              Name 14  "Output"
+                              Name 38  "flattenTemp"
+                              Name 41  "@entryPointOutput_Position"
+                              Name 47  "@entryPointOutput_clip1"
+                              Name 62  "VS_OUTPUT"
+                              Name 64  "@entryPointOutput"
+                              Decorate 41(@entryPointOutput_Position) BuiltIn Position
+                              Decorate 47(@entryPointOutput_clip1) BuiltIn ClipDistance
+                              Decorate 64(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeVector 6(float) 3
+    9(VS_OUTPUT):             TypeStruct 7(fvec4) 8(fvec3) 6(float)
+              10:             TypeFunction 9(VS_OUTPUT)
+              13:             TypePointer Function 9(VS_OUTPUT)
+              15:             TypeInt 32 1
+              16:     15(int) Constant 0
+              17:    6(float) Constant 0
+              18:    7(fvec4) ConstantComposite 17 17 17 17
+              19:             TypePointer Function 7(fvec4)
+              21:     15(int) Constant 1
+              22:             TypeInt 32 0
+              23:     22(int) Constant 0
+              24:             TypePointer Function 6(float)
+              26:    6(float) Constant 1065353216
+              27:     22(int) Constant 1
+              29:    6(float) Constant 1073741824
+              30:     22(int) Constant 2
+              32:     15(int) Constant 2
+              33:    6(float) Constant 1077936128
+              40:             TypePointer Output 7(fvec4)
+41(@entryPointOutput_Position):     40(ptr) Variable Output
+              44:     22(int) Constant 4
+              45:             TypeArray 6(float) 44
+              46:             TypePointer Output 45
+47(@entryPointOutput_clip1):     46(ptr) Variable Output
+              50:             TypePointer Output 6(float)
+              58:     15(int) Constant 3
+   62(VS_OUTPUT):             TypeStruct
+              63:             TypePointer Output 62(VS_OUTPUT)
+64(@entryPointOutput):     63(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+ 38(flattenTemp):     13(ptr) Variable Function
+              39:9(VS_OUTPUT) FunctionCall 11(@main()
+                              Store 38(flattenTemp) 39
+              42:     19(ptr) AccessChain 38(flattenTemp) 16
+              43:    7(fvec4) Load 42
+                              Store 41(@entryPointOutput_Position) 43
+              48:     24(ptr) AccessChain 38(flattenTemp) 21 23
+              49:    6(float) Load 48
+              51:     50(ptr) AccessChain 47(@entryPointOutput_clip1) 16
+                              Store 51 49
+              52:     24(ptr) AccessChain 38(flattenTemp) 21 27
+              53:    6(float) Load 52
+              54:     50(ptr) AccessChain 47(@entryPointOutput_clip1) 21
+                              Store 54 53
+              55:     24(ptr) AccessChain 38(flattenTemp) 21 30
+              56:    6(float) Load 55
+              57:     50(ptr) AccessChain 47(@entryPointOutput_clip1) 32
+                              Store 57 56
+              59:     24(ptr) AccessChain 38(flattenTemp) 32
+              60:    6(float) Load 59
+              61:     50(ptr) AccessChain 47(@entryPointOutput_clip1) 58
+                              Store 61 60
+                              Return
+                              FunctionEnd
+      11(@main():9(VS_OUTPUT) Function None 10
+              12:             Label
+      14(Output):     13(ptr) Variable Function
+              20:     19(ptr) AccessChain 14(Output) 16
+                              Store 20 18
+              25:     24(ptr) AccessChain 14(Output) 21 23
+                              Store 25 17
+              28:     24(ptr) AccessChain 14(Output) 21 27
+                              Store 28 26
+              31:     24(ptr) AccessChain 14(Output) 21 30
+                              Store 31 29
+              34:     24(ptr) AccessChain 14(Output) 32
+                              Store 34 33
+              35:9(VS_OUTPUT) Load 14(Output)
+                              ReturnValue 35
+                              FunctionEnd

+ 305 - 0
3rdparty/glslang/Test/baseResults/hlsl.clipdistance-9.vert.out

@@ -0,0 +1,305 @@
+hlsl.clipdistance-9.vert
+Shader version: 500
+0:? Sequence
+0:7  Function Definition: @main(vf3;f1; ( temp structure{ temp 4-component vector of float Position})
+0:7    Function Parameters: 
+0:7      'clip0' ( out 3-component vector of float)
+0:7      'clip1' ( out float)
+0:?     Sequence
+0:9      move second child to first child ( temp 4-component vector of float)
+0:9        Position: direct index for structure ( temp 4-component vector of float)
+0:9          'Output' ( temp structure{ temp 4-component vector of float Position})
+0:9          Constant:
+0:9            0 (const int)
+0:9        Constant:
+0:9          0.000000
+0:9          0.000000
+0:9          0.000000
+0:9          0.000000
+0:11      move second child to first child ( temp float)
+0:11        direct index ( temp float)
+0:11          'clip0' ( out 3-component vector of float)
+0:11          Constant:
+0:11            0 (const int)
+0:11        Constant:
+0:11          0.000000
+0:12      move second child to first child ( temp float)
+0:12        direct index ( temp float)
+0:12          'clip0' ( out 3-component vector of float)
+0:12          Constant:
+0:12            1 (const int)
+0:12        Constant:
+0:12          1.000000
+0:13      move second child to first child ( temp float)
+0:13        direct index ( temp float)
+0:13          'clip0' ( out 3-component vector of float)
+0:13          Constant:
+0:13            2 (const int)
+0:13        Constant:
+0:13          2.000000
+0:16      move second child to first child ( temp float)
+0:16        'clip1' ( out float)
+0:16        Constant:
+0:16          3.000000
+0:18      Branch: Return with expression
+0:18        'Output' ( temp structure{ temp 4-component vector of float Position})
+0:7  Function Definition: main( ( temp void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:7      Sequence
+0:7        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:7          Position: direct index for structure ( temp 4-component vector of float)
+0:7            Function Call: @main(vf3;f1; ( temp structure{ temp 4-component vector of float Position})
+0:?               'clip0' ( temp 3-component vector of float)
+0:?               'clip1' ( temp float)
+0:7            Constant:
+0:7              0 (const int)
+0:?       Sequence
+0:7        move second child to first child ( temp float)
+0:7          direct index ( temp float)
+0:?             'clip0' ( out 4-element array of float ClipDistance)
+0:7            Constant:
+0:7              0 (const int)
+0:7          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:7            Constant:
+0:7              0 (const int)
+0:7        move second child to first child ( temp float)
+0:7          direct index ( temp float)
+0:?             'clip0' ( out 4-element array of float ClipDistance)
+0:7            Constant:
+0:7              1 (const int)
+0:7          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:7            Constant:
+0:7              1 (const int)
+0:7        move second child to first child ( temp float)
+0:7          direct index ( temp float)
+0:?             'clip0' ( out 4-element array of float ClipDistance)
+0:7            Constant:
+0:7              2 (const int)
+0:7          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:7            Constant:
+0:7              2 (const int)
+0:?       Sequence
+0:7        move second child to first child ( temp float)
+0:7          direct index ( temp float)
+0:?             'clip0' ( out 4-element array of float ClipDistance)
+0:7            Constant:
+0:7              3 (const int)
+0:?           'clip1' ( temp float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     'clip0' ( out 4-element array of float ClipDistance)
+
+
+Linked vertex stage:
+
+
+Shader version: 500
+0:? Sequence
+0:7  Function Definition: @main(vf3;f1; ( temp structure{ temp 4-component vector of float Position})
+0:7    Function Parameters: 
+0:7      'clip0' ( out 3-component vector of float)
+0:7      'clip1' ( out float)
+0:?     Sequence
+0:9      move second child to first child ( temp 4-component vector of float)
+0:9        Position: direct index for structure ( temp 4-component vector of float)
+0:9          'Output' ( temp structure{ temp 4-component vector of float Position})
+0:9          Constant:
+0:9            0 (const int)
+0:9        Constant:
+0:9          0.000000
+0:9          0.000000
+0:9          0.000000
+0:9          0.000000
+0:11      move second child to first child ( temp float)
+0:11        direct index ( temp float)
+0:11          'clip0' ( out 3-component vector of float)
+0:11          Constant:
+0:11            0 (const int)
+0:11        Constant:
+0:11          0.000000
+0:12      move second child to first child ( temp float)
+0:12        direct index ( temp float)
+0:12          'clip0' ( out 3-component vector of float)
+0:12          Constant:
+0:12            1 (const int)
+0:12        Constant:
+0:12          1.000000
+0:13      move second child to first child ( temp float)
+0:13        direct index ( temp float)
+0:13          'clip0' ( out 3-component vector of float)
+0:13          Constant:
+0:13            2 (const int)
+0:13        Constant:
+0:13          2.000000
+0:16      move second child to first child ( temp float)
+0:16        'clip1' ( out float)
+0:16        Constant:
+0:16          3.000000
+0:18      Branch: Return with expression
+0:18        'Output' ( temp structure{ temp 4-component vector of float Position})
+0:7  Function Definition: main( ( temp void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:7      Sequence
+0:7        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:7          Position: direct index for structure ( temp 4-component vector of float)
+0:7            Function Call: @main(vf3;f1; ( temp structure{ temp 4-component vector of float Position})
+0:?               'clip0' ( temp 3-component vector of float)
+0:?               'clip1' ( temp float)
+0:7            Constant:
+0:7              0 (const int)
+0:?       Sequence
+0:7        move second child to first child ( temp float)
+0:7          direct index ( temp float)
+0:?             'clip0' ( out 4-element array of float ClipDistance)
+0:7            Constant:
+0:7              0 (const int)
+0:7          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:7            Constant:
+0:7              0 (const int)
+0:7        move second child to first child ( temp float)
+0:7          direct index ( temp float)
+0:?             'clip0' ( out 4-element array of float ClipDistance)
+0:7            Constant:
+0:7              1 (const int)
+0:7          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:7            Constant:
+0:7              1 (const int)
+0:7        move second child to first child ( temp float)
+0:7          direct index ( temp float)
+0:?             'clip0' ( out 4-element array of float ClipDistance)
+0:7            Constant:
+0:7              2 (const int)
+0:7          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:7            Constant:
+0:7              2 (const int)
+0:?       Sequence
+0:7        move second child to first child ( temp float)
+0:7          direct index ( temp float)
+0:?             'clip0' ( out 4-element array of float ClipDistance)
+0:7            Constant:
+0:7              3 (const int)
+0:?           'clip1' ( temp float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     'clip0' ( out 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 70
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 39 51 69
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 11  "VS_OUTPUT"
+                              MemberName 11(VS_OUTPUT) 0  "Position"
+                              Name 15  "@main(vf3;f1;"
+                              Name 13  "clip0"
+                              Name 14  "clip1"
+                              Name 18  "Output"
+                              Name 39  "@entryPointOutput_Position"
+                              Name 40  "clip0"
+                              Name 41  "clip1"
+                              Name 42  "param"
+                              Name 43  "param"
+                              Name 51  "clip0"
+                              Name 67  "VS_OUTPUT"
+                              Name 69  "@entryPointOutput"
+                              Decorate 39(@entryPointOutput_Position) BuiltIn Position
+                              Decorate 51(clip0) BuiltIn ClipDistance
+                              Decorate 69(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 3
+               8:             TypePointer Function 7(fvec3)
+               9:             TypePointer Function 6(float)
+              10:             TypeVector 6(float) 4
+   11(VS_OUTPUT):             TypeStruct 10(fvec4)
+              12:             TypeFunction 11(VS_OUTPUT) 8(ptr) 9(ptr)
+              17:             TypePointer Function 11(VS_OUTPUT)
+              19:             TypeInt 32 1
+              20:     19(int) Constant 0
+              21:    6(float) Constant 0
+              22:   10(fvec4) ConstantComposite 21 21 21 21
+              23:             TypePointer Function 10(fvec4)
+              25:             TypeInt 32 0
+              26:     25(int) Constant 0
+              28:    6(float) Constant 1065353216
+              29:     25(int) Constant 1
+              31:    6(float) Constant 1073741824
+              32:     25(int) Constant 2
+              34:    6(float) Constant 1077936128
+              38:             TypePointer Output 10(fvec4)
+39(@entryPointOutput_Position):     38(ptr) Variable Output
+              48:     25(int) Constant 4
+              49:             TypeArray 6(float) 48
+              50:             TypePointer Output 49
+       51(clip0):     50(ptr) Variable Output
+              54:             TypePointer Output 6(float)
+              56:     19(int) Constant 1
+              60:     19(int) Constant 2
+              64:     19(int) Constant 3
+   67(VS_OUTPUT):             TypeStruct
+              68:             TypePointer Output 67(VS_OUTPUT)
+69(@entryPointOutput):     68(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+       40(clip0):      8(ptr) Variable Function
+       41(clip1):      9(ptr) Variable Function
+       42(param):      8(ptr) Variable Function
+       43(param):      9(ptr) Variable Function
+              44:11(VS_OUTPUT) FunctionCall 15(@main(vf3;f1;) 42(param) 43(param)
+              45:    7(fvec3) Load 42(param)
+                              Store 40(clip0) 45
+              46:    6(float) Load 43(param)
+                              Store 41(clip1) 46
+              47:   10(fvec4) CompositeExtract 44 0
+                              Store 39(@entryPointOutput_Position) 47
+              52:      9(ptr) AccessChain 40(clip0) 26
+              53:    6(float) Load 52
+              55:     54(ptr) AccessChain 51(clip0) 20
+                              Store 55 53
+              57:      9(ptr) AccessChain 40(clip0) 29
+              58:    6(float) Load 57
+              59:     54(ptr) AccessChain 51(clip0) 56
+                              Store 59 58
+              61:      9(ptr) AccessChain 40(clip0) 32
+              62:    6(float) Load 61
+              63:     54(ptr) AccessChain 51(clip0) 60
+                              Store 63 62
+              65:    6(float) Load 41(clip1)
+              66:     54(ptr) AccessChain 51(clip0) 64
+                              Store 66 65
+                              Return
+                              FunctionEnd
+15(@main(vf3;f1;):11(VS_OUTPUT) Function None 12
+       13(clip0):      8(ptr) FunctionParameter
+       14(clip1):      9(ptr) FunctionParameter
+              16:             Label
+      18(Output):     17(ptr) Variable Function
+              24:     23(ptr) AccessChain 18(Output) 20
+                              Store 24 22
+              27:      9(ptr) AccessChain 13(clip0) 26
+                              Store 27 21
+              30:      9(ptr) AccessChain 13(clip0) 29
+                              Store 30 28
+              33:      9(ptr) AccessChain 13(clip0) 32
+                              Store 33 31
+                              Store 14(clip1) 34
+              35:11(VS_OUTPUT) Load 18(Output)
+                              ReturnValue 35
+                              FunctionEnd

+ 3 - 3
3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out

@@ -713,7 +713,7 @@ gl_FragCoord origin is upper left
              127:    6(float) CompositeExtract 124 2
              128:    6(float) CompositeExtract 124 3
              129:    7(fvec4) CompositeConstruct 125 126 127 128
-             130:    6(float) ImageSampleDrefExplicitLod 122 129 29 Lod 29
+             130:    6(float) ImageSampleDrefExplicitLod 122 129 29 Lod 34
                               Store 114(r60) 130
              135:         132 Load 134(g_tTexcdi4a)
              136:          18 Load 20(g_sSamp)
@@ -723,7 +723,7 @@ gl_FragCoord origin is upper left
              142:    6(float) CompositeExtract 124 2
              143:    6(float) CompositeExtract 124 3
              144:    7(fvec4) CompositeConstruct 140 141 142 143
-             145:    6(float) ImageSampleDrefExplicitLod 139 144 29 Lod 29
+             145:    6(float) ImageSampleDrefExplicitLod 139 144 29 Lod 34
                               Store 131(r62) 145
              150:         147 Load 149(g_tTexcdu4a)
              151:          18 Load 20(g_sSamp)
@@ -733,7 +733,7 @@ gl_FragCoord origin is upper left
              157:    6(float) CompositeExtract 124 2
              158:    6(float) CompositeExtract 124 3
              159:    7(fvec4) CompositeConstruct 155 156 157 158
-             160:    6(float) ImageSampleDrefExplicitLod 154 159 29 Lod 29
+             160:    6(float) ImageSampleDrefExplicitLod 154 159 29 Lod 34
                               Store 146(r64) 160
              167:    166(ptr) AccessChain 162(psout) 163
                               Store 167 165

+ 4 - 0
3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out

@@ -69,6 +69,8 @@ output primitive = line_strip
 0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
 0:?     'VertexID' (layout( location=0) in 3-element array of uint)
 0:?     'OutputStream' (layout( location=1) out structure{ temp int ii})
+0:?     'OutputStream_clip0' ( out 1-element array of float ClipDistance)
+0:?     'OutputStream_cull0' ( out 1-element array of float CullDistance)
 0:?     'OutputStream_vpai' ( out uint ViewportIndex)
 
 
@@ -145,6 +147,8 @@ output primitive = line_strip
 0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
 0:?     'VertexID' (layout( location=0) in 3-element array of uint)
 0:?     'OutputStream' (layout( location=1) out structure{ temp int ii})
+0:?     'OutputStream_clip0' ( out 1-element array of float ClipDistance)
+0:?     'OutputStream_cull0' ( out 1-element array of float CullDistance)
 0:?     'OutputStream_vpai' ( out uint ViewportIndex)
 
 // Module Version 10000

+ 266 - 354
3rdparty/glslang/Test/baseResults/hlsl.semantic.vert.out

@@ -1,141 +1,109 @@
 hlsl.semantic.vert
 Shader version: 500
 0:? Sequence
-0:12  Function Definition: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12    Function Parameters: 
-0:12      'ins' ( in structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
+0:10  Function Definition: @main(struct-S-f1-f1-f1-f1-i11; ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10    Function Parameters: 
+0:10      'ins' ( in structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:?     Sequence
-0:14      Branch: Return with expression
-0:14        's' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12  Function Definition: main( ( temp void)
-0:12    Function Parameters: 
+0:12      Branch: Return with expression
+0:12        's' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10  Function Definition: main( ( temp void)
+0:10    Function Parameters: 
 0:?     Sequence
-0:12      Sequence
-0:12        move second child to first child ( temp float)
-0:12          clip: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              0 (const int)
-0:?           'clip' (layout( location=0) in float)
-0:12        move second child to first child ( temp float)
-0:12          clip0: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              1 (const int)
-0:?           'clip0' (layout( location=1) in float)
-0:12        move second child to first child ( temp float)
-0:12          clip7: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              2 (const int)
-0:?           'clip7' (layout( location=2) in float)
-0:12        move second child to first child ( temp float)
-0:12          cull: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              3 (const int)
-0:?           'cull' (layout( location=3) in float)
-0:12        move second child to first child ( temp float)
-0:12          cull2: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              4 (const int)
-0:?           'cull2' (layout( location=4) in float)
-0:12        move second child to first child ( temp float)
-0:12          cull5: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              5 (const int)
-0:?           'cull5' (layout( location=5) in float)
-0:12        move second child to first child ( temp int)
-0:12          ii: direct index for structure ( temp int)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              6 (const int)
+0:10      Sequence
+0:10        move second child to first child ( temp float)
+0:10          clip0: direct index for structure ( temp float)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              0 (const int)
+0:?           'clip0' (layout( location=0) in float)
+0:10        move second child to first child ( temp float)
+0:10          clip1: direct index for structure ( temp float)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              1 (const int)
+0:?           'clip1' (layout( location=1) in float)
+0:10        move second child to first child ( temp float)
+0:10          cull0: direct index for structure ( temp float)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              2 (const int)
+0:?           'cull0' (layout( location=2) in float)
+0:10        move second child to first child ( temp float)
+0:10          cull1: direct index for structure ( temp float)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              3 (const int)
+0:?           'cull1' (layout( location=3) in float)
+0:10        move second child to first child ( temp int)
+0:10          ii: direct index for structure ( temp int)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              4 (const int)
 0:?           'ii' ( in int InstanceIndex)
-0:12      Sequence
-0:12        move second child to first child ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12          'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12          Function Call: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
+0:10      Sequence
+0:10        move second child to first child ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10          'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10          Function Call: @main(struct-S-f1-f1-f1-f1-i11; ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_clip7' ( out 1-element array of float ClipDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            clip: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                0 (const int)
+0:10          move second child to first child ( temp float)
+0:10            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:10              Constant:
+0:10                0 (const int)
+0:10            clip0: direct index for structure ( temp float)
+0:10              'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10              Constant:
+0:10                0 (const int)
 0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_clip7' ( out 1-element array of float ClipDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            clip0: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                1 (const int)
+0:10          move second child to first child ( temp float)
+0:10            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:10              Constant:
+0:10                1 (const int)
+0:10            clip1: direct index for structure ( temp float)
+0:10              'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10              Constant:
+0:10                1 (const int)
 0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_clip7' ( out 1-element array of float ClipDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            clip7: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                2 (const int)
+0:10          move second child to first child ( temp float)
+0:10            direct index ( temp float)
+0:?               '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:10              Constant:
+0:10                0 (const int)
+0:10            cull0: direct index for structure ( temp float)
+0:10              'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10              Constant:
+0:10                2 (const int)
 0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_cull5' ( out 1-element array of float CullDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            cull: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                3 (const int)
-0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_cull5' ( out 1-element array of float CullDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            cull2: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                4 (const int)
-0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_cull5' ( out 1-element array of float CullDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            cull5: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                5 (const int)
-0:12        move second child to first child ( temp int)
-0:12          ii: direct index for structure ( temp int)
-0:12            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:12            Constant:
-0:12              0 (const int)
-0:12          ii: direct index for structure ( temp int)
-0:12            'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              6 (const int)
+0:10          move second child to first child ( temp float)
+0:10            direct index ( temp float)
+0:?               '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:10              Constant:
+0:10                1 (const int)
+0:10            cull1: direct index for structure ( temp float)
+0:10              'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10              Constant:
+0:10                3 (const int)
+0:10        move second child to first child ( temp int)
+0:10          ii: direct index for structure ( temp int)
+0:10            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
+0:10            Constant:
+0:10              0 (const int)
+0:10          ii: direct index for structure ( temp int)
+0:10            'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              4 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:?     'clip' (layout( location=0) in float)
-0:?     'clip0' (layout( location=1) in float)
-0:?     'clip7' (layout( location=2) in float)
-0:?     'cull' (layout( location=3) in float)
-0:?     'cull2' (layout( location=4) in float)
-0:?     'cull5' (layout( location=5) in float)
+0:?     'clip0' (layout( location=0) in float)
+0:?     'clip1' (layout( location=1) in float)
+0:?     'cull0' (layout( location=2) in float)
+0:?     'cull1' (layout( location=3) in float)
 0:?     'ii' ( in int InstanceIndex)
+0:?     '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:?     '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
 
 
 Linked vertex stage:
@@ -143,287 +111,231 @@ Linked vertex stage:
 
 Shader version: 500
 0:? Sequence
-0:12  Function Definition: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12    Function Parameters: 
-0:12      'ins' ( in structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
+0:10  Function Definition: @main(struct-S-f1-f1-f1-f1-i11; ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10    Function Parameters: 
+0:10      'ins' ( in structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:?     Sequence
-0:14      Branch: Return with expression
-0:14        's' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12  Function Definition: main( ( temp void)
-0:12    Function Parameters: 
+0:12      Branch: Return with expression
+0:12        's' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10  Function Definition: main( ( temp void)
+0:10    Function Parameters: 
 0:?     Sequence
-0:12      Sequence
-0:12        move second child to first child ( temp float)
-0:12          clip: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              0 (const int)
-0:?           'clip' (layout( location=0) in float)
-0:12        move second child to first child ( temp float)
-0:12          clip0: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              1 (const int)
-0:?           'clip0' (layout( location=1) in float)
-0:12        move second child to first child ( temp float)
-0:12          clip7: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              2 (const int)
-0:?           'clip7' (layout( location=2) in float)
-0:12        move second child to first child ( temp float)
-0:12          cull: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              3 (const int)
-0:?           'cull' (layout( location=3) in float)
-0:12        move second child to first child ( temp float)
-0:12          cull2: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              4 (const int)
-0:?           'cull2' (layout( location=4) in float)
-0:12        move second child to first child ( temp float)
-0:12          cull5: direct index for structure ( temp float)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              5 (const int)
-0:?           'cull5' (layout( location=5) in float)
-0:12        move second child to first child ( temp int)
-0:12          ii: direct index for structure ( temp int)
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              6 (const int)
+0:10      Sequence
+0:10        move second child to first child ( temp float)
+0:10          clip0: direct index for structure ( temp float)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              0 (const int)
+0:?           'clip0' (layout( location=0) in float)
+0:10        move second child to first child ( temp float)
+0:10          clip1: direct index for structure ( temp float)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              1 (const int)
+0:?           'clip1' (layout( location=1) in float)
+0:10        move second child to first child ( temp float)
+0:10          cull0: direct index for structure ( temp float)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              2 (const int)
+0:?           'cull0' (layout( location=2) in float)
+0:10        move second child to first child ( temp float)
+0:10          cull1: direct index for structure ( temp float)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              3 (const int)
+0:?           'cull1' (layout( location=3) in float)
+0:10        move second child to first child ( temp int)
+0:10          ii: direct index for structure ( temp int)
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              4 (const int)
 0:?           'ii' ( in int InstanceIndex)
-0:12      Sequence
-0:12        move second child to first child ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12          'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12          Function Call: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:?             'ins' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_clip7' ( out 1-element array of float ClipDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            clip: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                0 (const int)
-0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_clip7' ( out 1-element array of float ClipDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            clip0: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                1 (const int)
+0:10      Sequence
+0:10        move second child to first child ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10          'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10          Function Call: @main(struct-S-f1-f1-f1-f1-i11; ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_clip7' ( out 1-element array of float ClipDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            clip7: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                2 (const int)
+0:10          move second child to first child ( temp float)
+0:10            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:10              Constant:
+0:10                0 (const int)
+0:10            clip0: direct index for structure ( temp float)
+0:10              'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10              Constant:
+0:10                0 (const int)
 0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_cull5' ( out 1-element array of float CullDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            cull: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                3 (const int)
+0:10          move second child to first child ( temp float)
+0:10            direct index ( temp float)
+0:?               '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:10              Constant:
+0:10                1 (const int)
+0:10            clip1: direct index for structure ( temp float)
+0:10              'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10              Constant:
+0:10                1 (const int)
 0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_cull5' ( out 1-element array of float CullDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            cull2: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                4 (const int)
+0:10          move second child to first child ( temp float)
+0:10            direct index ( temp float)
+0:?               '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:10              Constant:
+0:10                0 (const int)
+0:10            cull0: direct index for structure ( temp float)
+0:10              'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10              Constant:
+0:10                2 (const int)
 0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               '@entryPointOutput_cull5' ( out 1-element array of float CullDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            cull5: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12              Constant:
-0:12                5 (const int)
-0:12        move second child to first child ( temp int)
-0:12          ii: direct index for structure ( temp int)
-0:12            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:12            Constant:
-0:12              0 (const int)
-0:12          ii: direct index for structure ( temp int)
-0:12            'flattenTemp' ( temp structure{ temp float clip,  temp float clip0,  temp float clip7,  temp float cull,  temp float cull2,  temp float cull5,  temp int ii})
-0:12            Constant:
-0:12              6 (const int)
+0:10          move second child to first child ( temp float)
+0:10            direct index ( temp float)
+0:?               '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:10              Constant:
+0:10                1 (const int)
+0:10            cull1: direct index for structure ( temp float)
+0:10              'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10              Constant:
+0:10                3 (const int)
+0:10        move second child to first child ( temp int)
+0:10          ii: direct index for structure ( temp int)
+0:10            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
+0:10            Constant:
+0:10              0 (const int)
+0:10          ii: direct index for structure ( temp int)
+0:10            'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
+0:10            Constant:
+0:10              4 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:?     'clip' (layout( location=0) in float)
-0:?     'clip0' (layout( location=1) in float)
-0:?     'clip7' (layout( location=2) in float)
-0:?     'cull' (layout( location=3) in float)
-0:?     'cull2' (layout( location=4) in float)
-0:?     'cull5' (layout( location=5) in float)
+0:?     'clip0' (layout( location=0) in float)
+0:?     'clip1' (layout( location=1) in float)
+0:?     'cull0' (layout( location=2) in float)
+0:?     'cull1' (layout( location=3) in float)
 0:?     'ii' ( in int InstanceIndex)
+0:?     '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:?     '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 87
+// Id's are bound by 73
 
                               Capability Shader
                               Capability ClipDistance
                               Capability CullDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 21 26 30 34 38 42 47 59 70 82
+                              EntryPoint Vertex 4  "main" 21 26 30 34 39 51 59 68
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "S"
-                              MemberName 8(S) 0  "clip"
-                              MemberName 8(S) 1  "clip0"
-                              MemberName 8(S) 2  "clip7"
-                              MemberName 8(S) 3  "cull"
-                              MemberName 8(S) 4  "cull2"
-                              MemberName 8(S) 5  "cull5"
-                              MemberName 8(S) 6  "ii"
-                              Name 12  "@main(struct-S-f1-f1-f1-f1-f1-f1-i11;"
+                              MemberName 8(S) 0  "clip0"
+                              MemberName 8(S) 1  "clip1"
+                              MemberName 8(S) 2  "cull0"
+                              MemberName 8(S) 3  "cull1"
+                              MemberName 8(S) 4  "ii"
+                              Name 12  "@main(struct-S-f1-f1-f1-f1-i11;"
                               Name 11  "ins"
                               Name 14  "s"
                               Name 18  "ins"
-                              Name 21  "clip"
-                              Name 26  "clip0"
-                              Name 30  "clip7"
-                              Name 34  "cull"
-                              Name 38  "cull2"
-                              Name 42  "cull5"
-                              Name 47  "ii"
-                              Name 51  "flattenTemp"
-                              Name 52  "param"
-                              Name 59  "@entryPointOutput_clip7"
-                              Name 70  "@entryPointOutput_cull5"
-                              Name 80  "S"
-                              MemberName 80(S) 0  "ii"
-                              Name 82  "@entryPointOutput"
-                              Decorate 21(clip) Location 0
-                              Decorate 26(clip0) Location 1
-                              Decorate 30(clip7) Location 2
-                              Decorate 34(cull) Location 3
-                              Decorate 38(cull2) Location 4
-                              Decorate 42(cull5) Location 5
-                              Decorate 47(ii) BuiltIn InstanceIndex
-                              Decorate 59(@entryPointOutput_clip7) BuiltIn ClipDistance
-                              Decorate 70(@entryPointOutput_cull5) BuiltIn CullDistance
-                              Decorate 82(@entryPointOutput) Location 0
+                              Name 21  "clip0"
+                              Name 26  "clip1"
+                              Name 30  "cull0"
+                              Name 34  "cull1"
+                              Name 39  "ii"
+                              Name 43  "flattenTemp"
+                              Name 44  "param"
+                              Name 51  "@entryPointOutput_clip1"
+                              Name 59  "@entryPointOutput_cull1"
+                              Name 66  "S"
+                              MemberName 66(S) 0  "ii"
+                              Name 68  "@entryPointOutput"
+                              Decorate 21(clip0) Location 0
+                              Decorate 26(clip1) Location 1
+                              Decorate 30(cull0) Location 2
+                              Decorate 34(cull1) Location 3
+                              Decorate 39(ii) BuiltIn InstanceIndex
+                              Decorate 51(@entryPointOutput_clip1) BuiltIn ClipDistance
+                              Decorate 59(@entryPointOutput_cull1) BuiltIn CullDistance
+                              Decorate 68(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
                7:             TypeInt 32 1
-            8(S):             TypeStruct 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 7(int)
+            8(S):             TypeStruct 6(float) 6(float) 6(float) 6(float) 7(int)
                9:             TypePointer Function 8(S)
               10:             TypeFunction 8(S) 9(ptr)
               19:      7(int) Constant 0
               20:             TypePointer Input 6(float)
-        21(clip):     20(ptr) Variable Input
+       21(clip0):     20(ptr) Variable Input
               23:             TypePointer Function 6(float)
               25:      7(int) Constant 1
-       26(clip0):     20(ptr) Variable Input
+       26(clip1):     20(ptr) Variable Input
               29:      7(int) Constant 2
-       30(clip7):     20(ptr) Variable Input
+       30(cull0):     20(ptr) Variable Input
               33:      7(int) Constant 3
-        34(cull):     20(ptr) Variable Input
+       34(cull1):     20(ptr) Variable Input
               37:      7(int) Constant 4
-       38(cull2):     20(ptr) Variable Input
-              41:      7(int) Constant 5
-       42(cull5):     20(ptr) Variable Input
-              45:      7(int) Constant 6
-              46:             TypePointer Input 7(int)
-          47(ii):     46(ptr) Variable Input
-              49:             TypePointer Function 7(int)
-              55:             TypeInt 32 0
-              56:     55(int) Constant 1
-              57:             TypeArray 6(float) 56
-              58:             TypePointer Output 57
-59(@entryPointOutput_clip7):     58(ptr) Variable Output
-              62:             TypePointer Output 6(float)
-70(@entryPointOutput_cull5):     58(ptr) Variable Output
-           80(S):             TypeStruct 7(int)
-              81:             TypePointer Output 80(S)
-82(@entryPointOutput):     81(ptr) Variable Output
-              85:             TypePointer Output 7(int)
+              38:             TypePointer Input 7(int)
+          39(ii):     38(ptr) Variable Input
+              41:             TypePointer Function 7(int)
+              47:             TypeInt 32 0
+              48:     47(int) Constant 2
+              49:             TypeArray 6(float) 48
+              50:             TypePointer Output 49
+51(@entryPointOutput_clip1):     50(ptr) Variable Output
+              54:             TypePointer Output 6(float)
+59(@entryPointOutput_cull1):     50(ptr) Variable Output
+           66(S):             TypeStruct 7(int)
+              67:             TypePointer Output 66(S)
+68(@entryPointOutput):     67(ptr) Variable Output
+              71:             TypePointer Output 7(int)
          4(main):           2 Function None 3
                5:             Label
          18(ins):      9(ptr) Variable Function
- 51(flattenTemp):      9(ptr) Variable Function
-       52(param):      9(ptr) Variable Function
-              22:    6(float) Load 21(clip)
+ 43(flattenTemp):      9(ptr) Variable Function
+       44(param):      9(ptr) Variable Function
+              22:    6(float) Load 21(clip0)
               24:     23(ptr) AccessChain 18(ins) 19
                               Store 24 22
-              27:    6(float) Load 26(clip0)
+              27:    6(float) Load 26(clip1)
               28:     23(ptr) AccessChain 18(ins) 25
                               Store 28 27
-              31:    6(float) Load 30(clip7)
+              31:    6(float) Load 30(cull0)
               32:     23(ptr) AccessChain 18(ins) 29
                               Store 32 31
-              35:    6(float) Load 34(cull)
+              35:    6(float) Load 34(cull1)
               36:     23(ptr) AccessChain 18(ins) 33
                               Store 36 35
-              39:    6(float) Load 38(cull2)
-              40:     23(ptr) AccessChain 18(ins) 37
-                              Store 40 39
-              43:    6(float) Load 42(cull5)
-              44:     23(ptr) AccessChain 18(ins) 41
-                              Store 44 43
-              48:      7(int) Load 47(ii)
-              50:     49(ptr) AccessChain 18(ins) 45
-                              Store 50 48
-              53:        8(S) Load 18(ins)
-                              Store 52(param) 53
-              54:        8(S) FunctionCall 12(@main(struct-S-f1-f1-f1-f1-f1-f1-i11;) 52(param)
-                              Store 51(flattenTemp) 54
-              60:     23(ptr) AccessChain 51(flattenTemp) 19
+              40:      7(int) Load 39(ii)
+              42:     41(ptr) AccessChain 18(ins) 37
+                              Store 42 40
+              45:        8(S) Load 18(ins)
+                              Store 44(param) 45
+              46:        8(S) FunctionCall 12(@main(struct-S-f1-f1-f1-f1-i11;) 44(param)
+                              Store 43(flattenTemp) 46
+              52:     23(ptr) AccessChain 43(flattenTemp) 19
+              53:    6(float) Load 52
+              55:     54(ptr) AccessChain 51(@entryPointOutput_clip1) 19
+                              Store 55 53
+              56:     23(ptr) AccessChain 43(flattenTemp) 25
+              57:    6(float) Load 56
+              58:     54(ptr) AccessChain 51(@entryPointOutput_clip1) 25
+                              Store 58 57
+              60:     23(ptr) AccessChain 43(flattenTemp) 29
               61:    6(float) Load 60
-              63:     62(ptr) AccessChain 59(@entryPointOutput_clip7) 19
-                              Store 63 61
-              64:     23(ptr) AccessChain 51(flattenTemp) 25
-              65:    6(float) Load 64
-              66:     62(ptr) AccessChain 59(@entryPointOutput_clip7) 19
-                              Store 66 65
-              67:     23(ptr) AccessChain 51(flattenTemp) 29
-              68:    6(float) Load 67
-              69:     62(ptr) AccessChain 59(@entryPointOutput_clip7) 19
-                              Store 69 68
-              71:     23(ptr) AccessChain 51(flattenTemp) 33
-              72:    6(float) Load 71
-              73:     62(ptr) AccessChain 70(@entryPointOutput_cull5) 19
-                              Store 73 72
-              74:     23(ptr) AccessChain 51(flattenTemp) 37
-              75:    6(float) Load 74
-              76:     62(ptr) AccessChain 70(@entryPointOutput_cull5) 19
-                              Store 76 75
-              77:     23(ptr) AccessChain 51(flattenTemp) 41
-              78:    6(float) Load 77
-              79:     62(ptr) AccessChain 70(@entryPointOutput_cull5) 19
-                              Store 79 78
-              83:     49(ptr) AccessChain 51(flattenTemp) 45
-              84:      7(int) Load 83
-              86:     85(ptr) AccessChain 82(@entryPointOutput) 19
-                              Store 86 84
+              62:     54(ptr) AccessChain 59(@entryPointOutput_cull1) 19
+                              Store 62 61
+              63:     23(ptr) AccessChain 43(flattenTemp) 33
+              64:    6(float) Load 63
+              65:     54(ptr) AccessChain 59(@entryPointOutput_cull1) 25
+                              Store 65 64
+              69:     41(ptr) AccessChain 43(flattenTemp) 37
+              70:      7(int) Load 69
+              72:     71(ptr) AccessChain 68(@entryPointOutput) 19
+                              Store 72 70
                               Return
                               FunctionEnd
-12(@main(struct-S-f1-f1-f1-f1-f1-f1-i11;):        8(S) Function None 10
+12(@main(struct-S-f1-f1-f1-f1-i11;):        8(S) Function None 10
          11(ins):      9(ptr) FunctionParameter
               13:             Label
            14(s):      9(ptr) Variable Function

+ 0 - 2
3rdparty/glslang/Test/baseResults/hlsl.structbuffer.coherent.frag.out

@@ -208,9 +208,7 @@ gl_FragCoord origin is upper left
                               MemberDecorate 15(sbuf2) 0 Offset 0
                               Decorate 15(sbuf2) BufferBlock
                               Decorate 17(sbuf2) DescriptorSet 0
-                              MemberDecorate 28(sb_t) 0 Coherent
                               MemberDecorate 28(sb_t) 0 Offset 0
-                              MemberDecorate 28(sb_t) 1 Coherent
                               MemberDecorate 28(sb_t) 1 Offset 12
                               Decorate 29 ArrayStride 16
                               MemberDecorate 30(sbuf) 0 Coherent

+ 0 - 3
3rdparty/glslang/Test/baseResults/hlsl.structbuffer.frag.out

@@ -221,11 +221,8 @@ gl_FragCoord origin is upper left
                               Name 89  "pos"
                               Name 92  "@entryPointOutput"
                               Name 93  "param"
-                              MemberDecorate 19(sb_t) 0 NonWritable
                               MemberDecorate 19(sb_t) 0 Offset 0
-                              MemberDecorate 19(sb_t) 1 NonWritable
                               MemberDecorate 19(sb_t) 1 Offset 12
-                              MemberDecorate 19(sb_t) 2 NonWritable
                               MemberDecorate 19(sb_t) 2 Offset 16
                               Decorate 20 ArrayStride 32
                               MemberDecorate 21(sbuf) 0 NonWritable

+ 9 - 0
3rdparty/glslang/Test/baseResults/reflection.vert.out

@@ -70,6 +70,10 @@ deepD[1].d2.d1[3].b: offset -1, type 8b56, size 1, index -1, binding -1
 deepD[1].v3: offset -1, type 8b54, size 1, index -1, binding -1
 abl.foo: offset 0, type 1406, size 1, index 7, binding -1
 abl2.foo: offset 0, type 1406, size 1, index 11, binding -1
+buf1.runtimeArray: offset 4, type 1406, size 4, index 12, binding -1
+buf2.runtimeArray.c: offset 8, type 1406, size 1, index 13, binding -1
+buf3.runtimeArray: offset 4, type 1406, size 0, index 14, binding -1
+buf4.runtimeArray.c: offset 8, type 1406, size 1, index 15, binding -1
 anonMember1: offset 0, type 8b51, size 1, index 0, binding -1
 uf1: offset -1, type 1406, size 1, index -1, binding -1
 uf2: offset -1, type 1406, size 1, index -1, binding -1
@@ -88,6 +92,10 @@ abl2[0]: offset -1, type ffffffff, size 4, index -1, binding -1
 abl2[1]: offset -1, type ffffffff, size 4, index -1, binding -1
 abl2[2]: offset -1, type ffffffff, size 4, index -1, binding -1
 abl2[3]: offset -1, type ffffffff, size 4, index -1, binding -1
+buf1: offset -1, type ffffffff, size 4, index -1, binding -1
+buf2: offset -1, type ffffffff, size 4, index -1, binding -1
+buf3: offset -1, type ffffffff, size 4, index -1, binding -1
+buf4: offset -1, type ffffffff, size 4, index -1, binding -1
 
 Vertex attribute reflection:
 attributeFloat: offset 0, type 1406, size 0, index 0, binding -1
@@ -95,4 +103,5 @@ attributeFloat2: offset 0, type 8b50, size 0, index 0, binding -1
 attributeFloat3: offset 0, type 8b51, size 0, index 0, binding -1
 attributeFloat4: offset 0, type 8b52, size 0, index 0, binding -1
 attributeMat4: offset 0, type 8b5c, size 0, index 0, binding -1
+gl_InstanceID: offset 0, type 1404, size 0, index 0, binding -1
 

+ 0 - 2
3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out

@@ -44,9 +44,7 @@ spv.memoryQualifier.frag
                               Decorate 44(iCube) DescriptorSet 0
                               Decorate 44(iCube) Binding 3
                               Decorate 44(iCube) NonReadable
-                              MemberDecorate 49(Data) 0 Coherent
                               MemberDecorate 49(Data) 0 Offset 0
-                              MemberDecorate 49(Data) 1 Coherent
                               MemberDecorate 49(Data) 1 Offset 8
                               MemberDecorate 50(Buffer) 0 Coherent
                               MemberDecorate 50(Buffer) 0 Volatile

+ 0 - 2
3rdparty/glslang/Test/baseResults/spv.ssbo.autoassign.frag.out

@@ -30,9 +30,7 @@ spv.ssbo.autoassign.frag
                               Name 92  "pos"
                               Name 95  "@entryPointOutput"
                               Name 96  "param"
-                              MemberDecorate 14(BufType) 0 NonWritable
                               MemberDecorate 14(BufType) 0 Offset 0
-                              MemberDecorate 14(BufType) 1 NonWritable
                               MemberDecorate 14(BufType) 1 Offset 16
                               Decorate 15 ArrayStride 32
                               MemberDecorate 16(SB0) 0 NonWritable

+ 23 - 0
3rdparty/glslang/Test/hlsl.clipdistance-6.vert

@@ -0,0 +1,23 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+    float4 clip0                : SV_ClipDistance0;  // multiple semantic IDs, two vec4s (no extra packing)
+    float4 clip1                : SV_ClipDistance1;  // ...
+};
+
+VS_OUTPUT main()
+{
+    VS_OUTPUT           Output;
+    Output.Position     = 0;
+
+    Output.clip0.x = 0;
+    Output.clip0.y = 1;
+    Output.clip0.z = 2;
+    Output.clip0.w = 3;
+
+    Output.clip1.x = 4;
+    Output.clip1.y = 5;
+    Output.clip1.z = 6;
+    Output.clip1.w = 7;
+
+    return Output;
+}

+ 23 - 0
3rdparty/glslang/Test/hlsl.clipdistance-7.vert

@@ -0,0 +1,23 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+    float3 clip0                : SV_ClipDistance0;  // multiple semantic IDs, vec3+vec4 (skip)
+    float4 clip1                : SV_ClipDistance1;  // ...
+};
+
+VS_OUTPUT main()
+{
+    VS_OUTPUT           Output;
+    Output.Position     = 0;
+
+    Output.clip0.x = 0;
+    Output.clip0.y = 1;
+    Output.clip0.z = 2;
+    // Position 3 is skipped
+
+    Output.clip1.x = 4;
+    Output.clip1.y = 5;
+    Output.clip1.z = 6;
+    Output.clip1.w = 7;
+
+    return Output;
+}

+ 20 - 0
3rdparty/glslang/Test/hlsl.clipdistance-8.vert

@@ -0,0 +1,20 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+    float3 clip0                : SV_ClipDistance0;  // multiple semantic IDs, vec3+float (pack)
+    float  clip1                : SV_ClipDistance1;  // ...
+};
+
+VS_OUTPUT main()
+{
+    VS_OUTPUT           Output;
+    Output.Position     = 0;
+
+    Output.clip0.x = 0;
+    Output.clip0.y = 1;
+    Output.clip0.z = 2;
+
+    // Position 3 is packed from clip1's float
+    Output.clip1   = 3;
+
+    return Output;
+}

+ 19 - 0
3rdparty/glslang/Test/hlsl.clipdistance-9.vert

@@ -0,0 +1,19 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+};
+
+// Test packing 0 and 1 semantics into single array[4] output, from out fn params.
+VS_OUTPUT main(out float3 clip0 : SV_ClipDistance0, out float clip1 : SV_ClipDistance1)
+{
+    VS_OUTPUT           Output;
+    Output.Position     = 0;
+
+    clip0.x = 0;
+    clip0.y = 1;
+    clip0.z = 2;
+
+    // Position 3 is packed from clip1's float
+    clip1   = 3;
+
+    return Output;
+}

+ 3 - 5
3rdparty/glslang/Test/hlsl.semantic.vert

@@ -1,10 +1,8 @@
 struct S {
-    float clip  : SV_ClipDistance;
     float clip0 : SV_ClipDistance0;
-    float clip7 : SV_ClipDistance7;
-    float cull  : SV_CullDistance;
-    float cull2 : SV_CullDistance2;
-    float cull5 : SV_CullDistance5;
+    float clip1 : SV_ClipDistance1;
+    float cull0 : SV_CullDistance0;
+    float cull1 : SV_CullDistance1;
     int ii      : SV_InstanceID;
 };
 

+ 24 - 0
3rdparty/glslang/Test/reflection.vert

@@ -133,6 +133,26 @@ uniform abl2 {
     float foo;
 } arrBl2[4];
 
+buffer buf1 {
+    float scalar;
+    float runtimeArray[];
+} buf1i;
+
+buffer buf2 {
+    float scalar;
+    N2 runtimeArray[];
+} buf2i;
+
+buffer buf3 {
+    float scalar;
+    float runtimeArray[];
+} buf3i;
+
+buffer buf4 {
+    float scalar;
+    N2 runtimeArray[];
+} buf4i;
+
 void main()
 {
     liveFunction1(image_ui2D, sampler_2D, sampler_2DMSArray);
@@ -179,4 +199,8 @@ void main()
     f += attributeFloat3.x;
     f += attributeFloat4.x;
     f += attributeMat4[0][1];
+    f += buf1i.runtimeArray[3];
+    f += buf2i.runtimeArray[3].c;
+    f += buf3i.runtimeArray[gl_InstanceID];
+    f += buf4i.runtimeArray[gl_InstanceID].c;
 }

+ 13 - 9
3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp

@@ -5316,13 +5316,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
                 symbolTable.setFunctionExtensions("texture2DGradEXT",     1, &E_GL_EXT_shader_texture_lod);
                 symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod);
                 symbolTable.setFunctionExtensions("textureCubeGradEXT",   1, &E_GL_EXT_shader_texture_lod);
-                symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5);
+                if (version == 310)
+                    symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5);
             }
-            if (version >= 310)
+            if (version == 310)
                 symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5);
         }
 
-        if (profile == EEsProfile) {
+        if (profile == EEsProfile && version < 320) {
             symbolTable.setFunctionExtensions("imageAtomicAdd",      1, &E_GL_OES_shader_image_atomic);
             symbolTable.setFunctionExtensions("imageAtomicMin",      1, &E_GL_OES_shader_image_atomic);
             symbolTable.setFunctionExtensions("imageAtomicMax",      1, &E_GL_OES_shader_image_atomic);
@@ -5357,8 +5358,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
 
     case EShLangTessControl:
         if (profile == EEsProfile && version >= 310) {
-            symbolTable.setVariableExtensions("gl_BoundingBoxOES", Num_AEP_primitive_bounding_box, AEP_primitive_bounding_box);
             BuiltInVariable("gl_BoundingBoxOES", EbvBoundingBox, symbolTable);
+            if (version < 320)
+                symbolTable.setVariableExtensions("gl_BoundingBoxOES", Num_AEP_primitive_bounding_box,
+                                                  AEP_primitive_bounding_box);
         }
 
         // Fall through
@@ -5505,7 +5508,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
             BuiltInVariable("gl_SamplePosition",  EbvSamplePosition, symbolTable);
             BuiltInVariable("gl_SampleMaskIn",    EbvSampleMask,     symbolTable);
             BuiltInVariable("gl_SampleMask",      EbvSampleMask,     symbolTable);
-            if (profile == EEsProfile) {
+            if (profile == EEsProfile && version < 320) {
                 symbolTable.setVariableExtensions("gl_SampleID",       1, &E_GL_OES_sample_variables);
                 symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_OES_sample_variables);
                 symbolTable.setVariableExtensions("gl_SampleMaskIn",   1, &E_GL_OES_sample_variables);
@@ -5539,14 +5542,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
                 symbolTable.setFunctionExtensions("texture2DGradEXT",     1, &E_GL_EXT_shader_texture_lod);
                 symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod);
                 symbolTable.setFunctionExtensions("textureCubeGradEXT",   1, &E_GL_EXT_shader_texture_lod);
-                symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5);
+                if (version < 320)
+                    symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5);
             }
             if (version == 100) {
                 symbolTable.setFunctionExtensions("dFdx",   1, &E_GL_OES_standard_derivatives);
                 symbolTable.setFunctionExtensions("dFdy",   1, &E_GL_OES_standard_derivatives);
                 symbolTable.setFunctionExtensions("fwidth", 1, &E_GL_OES_standard_derivatives);
             }
-            if (version >= 310) {
+            if (version == 310) {
                 symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5);
                 symbolTable.setFunctionExtensions("interpolateAtCentroid", 1, &E_GL_OES_shader_multisample_interpolation);
                 symbolTable.setFunctionExtensions("interpolateAtSample",   1, &E_GL_OES_shader_multisample_interpolation);
@@ -5675,12 +5679,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
 
         symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth);
 
-        if (profile == EEsProfile) {
+        if (profile == EEsProfile && version < 320) {
             symbolTable.setVariableExtensions("gl_PrimitiveID",  Num_AEP_geometry_shader, AEP_geometry_shader);
             symbolTable.setVariableExtensions("gl_Layer",        Num_AEP_geometry_shader, AEP_geometry_shader);
         }
 
-        if (profile == EEsProfile) {
+        if (profile == EEsProfile && version < 320) {
             symbolTable.setFunctionExtensions("imageAtomicAdd",      1, &E_GL_OES_shader_image_atomic);
             symbolTable.setFunctionExtensions("imageAtomicMin",      1, &E_GL_OES_shader_image_atomic);
             symbolTable.setFunctionExtensions("imageAtomicMax",      1, &E_GL_OES_shader_image_atomic);

+ 21 - 13
3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp

@@ -383,7 +383,8 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
                 if (base->getQualifier().storage == EvqBuffer)
                     requireProfile(base->getLoc(), ~EEsProfile, "variable indexing buffer block array");
                 else if (base->getQualifier().storage == EvqUniform)
-                    profileRequires(base->getLoc(), EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "variable indexing uniform block array");
+                    profileRequires(base->getLoc(), EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5,
+                                    "variable indexing uniform block array");
                 else {
                     // input/output blocks either don't exist or can be variable indexed
                 }
@@ -392,7 +393,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
             else if (base->getBasicType() == EbtSampler && version >= 130) {
                 const char* explanation = "variable indexing sampler array";
                 requireProfile(base->getLoc(), EEsProfile | ECoreProfile | ECompatibilityProfile, explanation);
-                profileRequires(base->getLoc(), EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, explanation);
+                profileRequires(base->getLoc(), EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, explanation);
                 profileRequires(base->getLoc(), ECoreProfile | ECompatibilityProfile, 400, nullptr, explanation);
             }
 
@@ -1417,7 +1418,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
             else
                 profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
             if (! (*argp)[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion())
-                profileRequires(loc, EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument");
+                profileRequires(loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5,
+                                "non-constant offset argument");
             if (! fnCandidate[0].type->getSampler().shadow)
                 compArg = 3;
             break;
@@ -1631,7 +1633,8 @@ void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fn
                     profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
                 int offsetArg = fnCandidate[0].type->getSampler().shadow ? 3 : 2;
                 if (! callNode.getSequence()[offsetArg]->getAsConstantUnion())
-                    profileRequires(loc, EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument");
+                    profileRequires(loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5,
+                                    "non-constant offset argument");
                 if (! fnCandidate[0].type->getSampler().shadow)
                     compArg = 3;
             } else if (fnCandidate.getName().compare("textureGatherOffsets") == 0) {
@@ -3016,19 +3019,22 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua
     switch (language) {
     case EShLangGeometry:
         if (qualifier.storage == EvqVaryingIn)
-            if (extensionsTurnedOn(Num_AEP_geometry_shader, AEP_geometry_shader))
+            if ((profile == EEsProfile && version >= 320) ||
+                extensionsTurnedOn(Num_AEP_geometry_shader, AEP_geometry_shader))
                 return;
         break;
     case EShLangTessControl:
         if ( qualifier.storage == EvqVaryingIn ||
             (qualifier.storage == EvqVaryingOut && ! qualifier.patch))
-            if (extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
+            if ((profile == EEsProfile && version >= 320) ||
+                extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
                 return;
         break;
     case EShLangTessEvaluation:
         if ((qualifier.storage == EvqVaryingIn && ! qualifier.patch) ||
              qualifier.storage == EvqVaryingOut)
-            if (extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
+            if ((profile == EEsProfile && version >= 320) ||
+                extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
                 return;
         break;
     default:
@@ -3267,7 +3273,8 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
         return nullptr;
 
     bool nonEsRedecls = (profile != EEsProfile && (version >= 130 || identifier == "gl_TexCoord"));
-    bool    esRedecls = (profile == EEsProfile && extensionsTurnedOn(Num_AEP_shader_io_blocks, AEP_shader_io_blocks));
+    bool    esRedecls = (profile == EEsProfile &&
+                         (version >= 320 || extensionsTurnedOn(Num_AEP_shader_io_blocks, AEP_shader_io_blocks)));
     if (! esRedecls && ! nonEsRedecls)
         return nullptr;
 
@@ -3406,7 +3413,7 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
 void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes)
 {
     const char* feature = "built-in block redeclaration";
-    profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature);
+    profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature);
     profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature);
 
     if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment") {
@@ -4040,7 +4047,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
             bool found = false;
             for (TBlendEquationShift be = (TBlendEquationShift)0; be < EBlendCount; be = (TBlendEquationShift)(be + 1)) {
                 if (id == TQualifier::getBlendEquationString(be)) {
-                    requireExtensions(loc, 1, &E_GL_KHR_blend_equation_advanced, "blend equation");
+                    profileRequires(loc, EEsProfile, 320, E_GL_KHR_blend_equation_advanced, "blend equation");
+                    profileRequires(loc, ~EEsProfile, 0, E_GL_KHR_blend_equation_advanced, "blend equation");
                     intermediate.addBlendEquation(be);
                     publicType.shaderQualifiers.blendEquation = true;
                     found = true;
@@ -5807,7 +5815,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
             case EvqVaryingOut:
                 requireProfile(memberLoc, ECoreProfile | ECompatibilityProfile | EEsProfile, feature);
                 profileRequires(memberLoc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, feature);
-                profileRequires(memberLoc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature);
+                profileRequires(memberLoc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature);
                 memberWithLocation = true;
                 break;
             default:
@@ -5931,14 +5939,14 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
         // "Compute shaders do not permit user-defined input variables..."
         requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask|EShLangFragmentMask), "input block");
         if (language == EShLangFragment)
-            profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block");
+            profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block");
         break;
     case EvqVaryingOut:
         profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "output block");
         requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask), "output block");
         // ES 310 can have a block before shader_io is turned on, so skip this test for built-ins
         if (language == EShLangVertex && ! parsingBuiltins)
-            profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block");
+            profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block");
         break;
     default:
         error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), "");

+ 19 - 9
3rdparty/glslang/glslang/MachineIndependent/Scan.cpp

@@ -864,14 +864,17 @@ int TScanContext::tokenizeIdentifier()
 
     case PATCH:
         if (parseContext.symbolTable.atBuiltInLevel() ||
-            (parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) ||
+            (parseContext.profile == EEsProfile &&
+             (parseContext.version >= 320 || 
+              parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))) ||
             (parseContext.profile != EEsProfile && parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader)))
             return keyword;
 
         return es30ReservedFromGLSL(400);
 
     case SAMPLE:
-        if (parseContext.extensionsTurnedOn(1, &E_GL_OES_shader_multisample_interpolation))
+        if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+            parseContext.extensionsTurnedOn(1, &E_GL_OES_shader_multisample_interpolation))
             return keyword;
         return es30ReservedFromGLSL(400);
 
@@ -925,7 +928,8 @@ int TScanContext::tokenizeIdentifier()
     case IIMAGEBUFFER:
     case UIMAGEBUFFER:
         afterType = true;
-        if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
+        if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+            parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
             return keyword;
         return firstGenerationImage(false);
 
@@ -948,7 +952,8 @@ int TScanContext::tokenizeIdentifier()
     case IIMAGECUBEARRAY:
     case UIMAGECUBEARRAY:
         afterType = true;
-        if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
+        if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+            parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
             return keyword;
         return secondGenerationImage();
 
@@ -1030,7 +1035,8 @@ int TScanContext::tokenizeIdentifier()
     case ISAMPLERCUBEARRAY:
     case USAMPLERCUBEARRAY:
         afterType = true;
-        if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
+        if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+            parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
             return keyword;
         if (parseContext.profile == EEsProfile || (parseContext.version < 400 && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array)))
             reservedWord();
@@ -1069,14 +1075,16 @@ int TScanContext::tokenizeIdentifier()
 
     case SAMPLERBUFFER:
         afterType = true;
-        if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
+        if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+            parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
             return keyword;
         return es30ReservedFromGLSL(130);
 
     case ISAMPLERBUFFER:
     case USAMPLERBUFFER:
         afterType = true;
-        if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
+        if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+            parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
             return keyword;
         return es30ReservedFromGLSL(140);
 
@@ -1092,7 +1100,8 @@ int TScanContext::tokenizeIdentifier()
     case ISAMPLER2DMSARRAY:
     case USAMPLER2DMSARRAY:
         afterType = true;
-        if (parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array))
+        if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+            parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array))
             return keyword;
         return es30ReservedFromGLSL(150);
 
@@ -1228,7 +1237,8 @@ int TScanContext::tokenizeIdentifier()
         return keyword;
 
     case PRECISE:
-        if ((parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5)) ||
+        if ((parseContext.profile == EEsProfile &&
+             (parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5))) ||
             (parseContext.profile != EEsProfile && parseContext.version >= 400))
             return keyword;
         if (parseContext.profile == EEsProfile && parseContext.version == 310) {

+ 46 - 9
3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp

@@ -1,7 +1,7 @@
 //
 // Copyright (C) 2002-2005  3Dlabs Inc. Ltd.
 // Copyright (C) 2013-2016 LunarG, Inc.
-// Copyright (C) 2015-2016 Google, Inc.
+// Copyright (C) 2015-2017 Google, Inc.
 //
 // All rights reserved.
 //
@@ -116,7 +116,7 @@ TParseContextBase* CreateParseContext(TSymbolTable& symbolTable, TIntermediate&
 
 // Local mapping functions for making arrays of symbol tables....
 
-const int VersionCount = 15;  // index range in MapVersionToIndex
+const int VersionCount = 16;  // index range in MapVersionToIndex
 
 int MapVersionToIndex(int version)
 {
@@ -138,7 +138,9 @@ int MapVersionToIndex(int version)
     case 440: index = 12; break;
     case 310: index = 13; break;
     case 450: index = 14; break;
-    default:              break;
+    case 500: index =  0; break; // HLSL
+    case 320: index = 15; break;
+    default:  assert(0);  break;
     }
 
     assert(index < VersionCount);
@@ -447,7 +449,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
         return correct;
     }
 
-    // Get a good version...
+    // Get a version...
     if (version == 0) {
         version = defaultVersion;
         // infoSink.info.message(EPrefixWarning, "#version: statement missing; use #version on first line of shader");
@@ -455,9 +457,9 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
 
     // Get a good profile...
     if (profile == ENoProfile) {
-        if (version == 300 || version == 310) {
+        if (version == 300 || version == 310 || version == 320) {
             correct = false;
-            infoSink.info.message(EPrefixError, "#version: versions 300 and 310 require specifying the 'es' profile");
+            infoSink.info.message(EPrefixError, "#version: versions 300, 310, and 320 require specifying the 'es' profile");
             profile = EEsProfile;
         } else if (version == 100)
             profile = EEsProfile;
@@ -474,16 +476,16 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
                 profile = EEsProfile;
             else
                 profile = ENoProfile;
-        } else if (version == 300 || version == 310) {
+        } else if (version == 300 || version == 310 || version == 320) {
             if (profile != EEsProfile) {
                 correct = false;
-                infoSink.info.message(EPrefixError, "#version: versions 300 and 310 support only the es profile");
+                infoSink.info.message(EPrefixError, "#version: versions 300, 310, and 320 support only the es profile");
             }
             profile = EEsProfile;
         } else {
             if (profile == EEsProfile) {
                 correct = false;
-                infoSink.info.message(EPrefixError, "#version: only version 300 and 310 support the es profile");
+                infoSink.info.message(EPrefixError, "#version: only version 300, 310, and 320 support the es profile");
                 if (version >= FirstProfileVersion)
                     profile = ECoreProfile;
                 else
@@ -493,6 +495,41 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
         }
     }
 
+    // Fix version...
+    switch (version) {
+    // ES versions
+    case 100: break;
+    case 300: break;
+    case 310: break;
+    case 320: break;
+
+    // desktop versions
+    case 110: break;
+    case 120: break;
+    case 130: break;
+    case 140: break;
+    case 150: break;
+    case 330: break;
+    case 400: break;
+    case 410: break;
+    case 420: break;
+    case 430: break;
+    case 440: break;
+    case 450: break;
+
+    // unknown version
+    default:
+        correct = false;
+        infoSink.info.message(EPrefixError, "version not supported");
+        if (profile == EEsProfile)
+            version = 310;
+        else {
+            version = 450;
+            profile = ECoreProfile;
+        }
+        break;
+    }
+
     // Correct for stage type...
     switch (stage) {
     case EShLangGeometry:

+ 19 - 11
3rdparty/glslang/glslang/MachineIndependent/reflection.cpp

@@ -131,8 +131,11 @@ public:
         for (int m = 0; m <= index; ++m) {
             // modify just the children's view of matrix layout, if there is one for this member
             TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix;
-            int memberAlignment = intermediate.getBaseAlignment(*memberList[m].type, memberSize, dummyStride, type.getQualifier().layoutPacking == ElpStd140,
-                                                                subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : type.getQualifier().layoutMatrix == ElmRowMajor);
+            int memberAlignment = intermediate.getBaseAlignment(*memberList[m].type, memberSize, dummyStride,
+                                                                type.getQualifier().layoutPacking == ElpStd140,
+                                                                subMatrixLayout != ElmNone
+                                                                    ? subMatrixLayout == ElmRowMajor
+                                                                    : type.getQualifier().layoutMatrix == ElmRowMajor);
             RoundToPow2(offset, memberAlignment);
             if (m < index)
                 offset += memberSize;
@@ -151,7 +154,8 @@ public:
 
         int lastMemberSize;
         int dummyStride;
-        intermediate.getBaseAlignment(*memberList[lastIndex].type, lastMemberSize, dummyStride, blockType.getQualifier().layoutPacking == ElpStd140,
+        intermediate.getBaseAlignment(*memberList[lastIndex].type, lastMemberSize, dummyStride,
+                                      blockType.getQualifier().layoutPacking == ElpStd140,
                                       blockType.getQualifier().layoutMatrix == ElmRowMajor);
 
         return lastOffset + lastMemberSize;
@@ -167,7 +171,7 @@ public:
     void blowUpActiveAggregate(const TType& baseType, const TString& baseName, const TList<TIntermBinary*>& derefs,
                                TList<TIntermBinary*>::const_iterator deref, int offset, int blockIndex, int arraySize)
     {
-        // process the part of the derefence chain that was explicit in the shader
+        // process the part of the dereference chain that was explicit in the shader
         TString name = baseName;
         const TType* terminalType = &baseType;
         for (; deref != derefs.end(); ++deref) {
@@ -177,7 +181,7 @@ public:
             switch (visitNode->getOp()) {
             case EOpIndexIndirect:
                 // Visit all the indices of this array, and for each one add on the remaining dereferencing
-                for (int i = 0; i < visitNode->getLeft()->getType().getOuterArraySize(); ++i) {
+                for (int i = 0; i < std::max(visitNode->getLeft()->getType().getOuterArraySize(), 1); ++i) {
                     TString newBaseName = name;
                     if (baseType.getBasicType() != EbtBlock)
                         newBaseName.append(TString("[") + String(i) + "]");
@@ -212,7 +216,7 @@ public:
             if (terminalType->isArray()) {
                 // Visit all the indices of this array, and for each one,
                 // fully explode the remaining aggregate to dereference
-                for (int i = 0; i < terminalType->getOuterArraySize(); ++i) {
+                for (int i = 0; i < std::max(terminalType->getOuterArraySize(), 1); ++i) {
                     TString newBaseName = name;
                     newBaseName.append(TString("[") + String(i) + "]");
                     TType derefType(*terminalType, 0);
@@ -235,7 +239,7 @@ public:
         }
 
         // Finally, add a full string to the reflection database, and update the array size if necessary.
-        // If the derefenced entity to record is an array, compute the size and update the maximum size.
+        // If the dereferenced entity to record is an array, compute the size and update the maximum size.
 
         // there might not be a final array dereference, it could have been copied as an array object
         if (arraySize == 0)
@@ -244,7 +248,8 @@ public:
         TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name);
         if (it == reflection.nameToIndex.end()) {
             reflection.nameToIndex[name] = (int)reflection.indexToUniform.size();
-            reflection.indexToUniform.push_back(TObjectReflection(name, *terminalType, offset, mapToGlType(*terminalType),
+            reflection.indexToUniform.push_back(TObjectReflection(name, *terminalType, offset,
+                                                                  mapToGlType(*terminalType),
                                                                   arraySize, blockIndex));
         } else if (arraySize > 1) {
             int& reflectedArraySize = reflection.indexToUniform[it->second].size;
@@ -417,7 +422,8 @@ public:
                 case Esd2D:
                     switch ((int)sampler.ms) {
                     case false:  return sampler.arrayed ? GL_INT_SAMPLER_2D_ARRAY : GL_INT_SAMPLER_2D;
-                    case true:   return sampler.arrayed ? GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_INT_SAMPLER_2D_MULTISAMPLE;
+                    case true:   return sampler.arrayed ? GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY
+                                                        : GL_INT_SAMPLER_2D_MULTISAMPLE;
                     }
                 case Esd3D:
                     return GL_INT_SAMPLER_3D;
@@ -435,7 +441,8 @@ public:
                 case Esd2D:
                     switch ((int)sampler.ms) {
                     case false:  return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_ARRAY : GL_UNSIGNED_INT_SAMPLER_2D;
-                    case true:   return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE;
+                    case true:   return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY
+                                                        : GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE;
                     }
                 case Esd3D:
                     return GL_UNSIGNED_INT_SAMPLER_3D;
@@ -495,7 +502,8 @@ public:
                 case Esd2D:
                     switch ((int)sampler.ms) {
                     case false:  return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_ARRAY : GL_UNSIGNED_INT_IMAGE_2D;
-                    case true:   return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY : GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE;
+                    case true:   return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY
+                                                        : GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE;
                     }
                 case Esd3D:
                     return GL_UNSIGNED_INT_IMAGE_3D;

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

@@ -101,6 +101,12 @@ INSTANTIATE_TEST_CASE_P(
         "310.tese",
         "310implicitSizeArrayError.vert",
         "310AofA.vert",
+        "320.comp",
+        "320.vert",
+        "320.geom",
+        "320.frag",
+        "320.tesc",
+        "320.tese",
         "330.frag",
         "330comp.frag",
         "constErrors.frag",
@@ -136,6 +142,7 @@ INSTANTIATE_TEST_CASE_P(
         "430.vert",
         "430.comp",
         "430AofA.frag",
+        "435.vert",
         "440.vert",
         "440.frag",
         "450.vert",

+ 4 - 0
3rdparty/glslang/gtests/Hlsl.FromFile.cpp

@@ -102,6 +102,10 @@ INSTANTIATE_TEST_CASE_P(
         {"hlsl.clipdistance-3.vert", "main"},
         {"hlsl.clipdistance-4.vert", "main"},
         {"hlsl.clipdistance-5.vert", "main"},
+        {"hlsl.clipdistance-6.vert", "main"},
+        {"hlsl.clipdistance-7.vert", "main"},
+        {"hlsl.clipdistance-8.vert", "main"},
+        {"hlsl.clipdistance-9.vert", "main"},
         {"hlsl.comparison.vec.frag", "main"},
         {"hlsl.conditional.frag", "PixelShaderFunction"},
         {"hlsl.constantbuffer.frag", "main"},

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 308 - 122
3rdparty/glslang/hlsl/hlslParseHelper.cpp


+ 14 - 2
3rdparty/glslang/hlsl/hlslParseHelper.h

@@ -39,6 +39,8 @@
 #include "../glslang/MachineIndependent/parseVersions.h"
 #include "../glslang/MachineIndependent/ParseHelper.h"
 
+#include <array>
+
 namespace glslang {
 
 class TAttributeMap; // forward declare
@@ -91,7 +93,7 @@ public:
     TIntermTyped* handleAssign(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right);
     TIntermTyped* handleAssignToMatrixSwizzle(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right);
     TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermTyped*);
-    TIntermAggregate* assignClipCullDistance(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right);
+    TIntermAggregate* assignClipCullDistance(const TSourceLoc&, TOperator, int semanticId, TIntermTyped* left, TIntermTyped* right);
     void decomposeIntrinsic(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
     void decomposeSampleMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
     void decomposeStructBufferMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
@@ -308,6 +310,10 @@ protected:
     // Finalization step: remove unused buffer blocks from linkage (we don't know until the
     // shader is entirely compiled)
     void removeUnusedStructBufferCounters();
+ 
+    static bool isClipOrCullDistance(TBuiltInVariable);
+    static bool isClipOrCullDistance(const TQualifier& qual) { return isClipOrCullDistance(qual.builtIn); }
+    static bool isClipOrCullDistance(const TType& type) { return isClipOrCullDistance(type.getQualifier()); }
 
     // Pass through to base class after remembering builtin mappings.
     using TParseContextBase::trackLinkage;
@@ -368,7 +374,6 @@ protected:
     TVector<TSymbol*> ioArraySymbolResizeList;
 
     TMap<int, TFlattenData> flattenMap;
-    TVector<int> flattenLevel;  // nested postfix operator level for flattening
 
     // IO-type map. Maps a pure symbol-table form of a structure-member list into
     // each of the (up to) three kinds of IO, as each as different allowed decorations,
@@ -432,6 +437,13 @@ protected:
 
     TVariable* gsStreamOutput;               // geometry shader stream outputs, for emit (Append method)
 
+    TVariable* clipDistanceOutput;           // synthesized clip distance output variable (shader might have >1)
+    TVariable* cullDistanceOutput;           // synthesized cull distance output variable (shader might have >1)
+
+    static const int maxClipCullRegs = 2;
+    std::array<int, maxClipCullRegs> clipSemanticNSize; // vector, indexed by clip semantic ID
+    std::array<int, maxClipCullRegs> cullSemanticNSize; // vector, indexed by cull semantic ID
+
     // This tracks the first (mip level) argument to the .mips[][] operator.  Since this can be nested as
     // in tx.mips[tx.mips[0][1].x][2], we need a stack.  We also track the TSourceLoc for error reporting 
     // purposes.

+ 0 - 26
3rdparty/glslang/hlsl/hlslScanContext.cpp

@@ -420,32 +420,6 @@ void HlslScanContext::fillInKeywordMap()
     }
 
     (*SemanticMap)["SV_POSITION"] =               EbvPosition;
-    (*SemanticMap)["SV_CLIPDISTANCE"] =           EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE0"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE1"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE2"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE3"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE4"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE5"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE6"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE7"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE8"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE9"] =          EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE10"] =         EbvClipDistance;
-    (*SemanticMap)["SV_CLIPDISTANCE11"] =         EbvClipDistance;
-    (*SemanticMap)["SV_CULLDISTANCE"] =           EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE0"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE1"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE2"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE3"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE4"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE5"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE6"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE7"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE8"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE9"] =          EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE10"] =         EbvCullDistance;
-    (*SemanticMap)["SV_CULLDISTANCE11"] =         EbvCullDistance;
     (*SemanticMap)["SV_VERTEXID"] =               EbvVertexIndex;
     (*SemanticMap)["SV_VIEWPORTARRAYINDEX"] =     EbvViewportIndex;
     (*SemanticMap)["SV_TESSFACTOR"] =             EbvTessLevelOuter;

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.