Kaynağa Gözat

Updated glslang.

Branimir Karadžić 7 yıl önce
ebeveyn
işleme
d0950f2b48

+ 30 - 4
3rdparty/glslang/SPIRV/GlslangToSpv.cpp

@@ -2479,17 +2479,29 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
                                    node->getType().containsBasicType(glslang::EbtInt16)   ||
                                    node->getType().containsBasicType(glslang::EbtUint16);
     if (contains16BitType) {
-        if (storageClass == spv::StorageClassInput || storageClass == spv::StorageClassOutput) {
+        switch (storageClass) {
+        case spv::StorageClassInput:
+        case spv::StorageClassOutput:
             addPre13Extension(spv::E_SPV_KHR_16bit_storage);
             builder.addCapability(spv::CapabilityStorageInputOutput16);
-        } else if (storageClass == spv::StorageClassPushConstant) {
+            break;
+        case spv::StorageClassPushConstant:
             addPre13Extension(spv::E_SPV_KHR_16bit_storage);
             builder.addCapability(spv::CapabilityStoragePushConstant16);
-        } else if (storageClass == spv::StorageClassUniform) {
+            break;
+        case spv::StorageClassUniform:
             addPre13Extension(spv::E_SPV_KHR_16bit_storage);
-            builder.addCapability(spv::CapabilityStorageUniform16);
             if (node->getType().getQualifier().storage == glslang::EvqBuffer)
                 builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
+            else
+                builder.addCapability(spv::CapabilityStorageUniform16);
+            break;
+        case spv::StorageClassStorageBuffer:
+            addPre13Extension(spv::E_SPV_KHR_16bit_storage);
+            builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
+            break;
+        default:
+            break;
         }
     }
 
@@ -4618,6 +4630,10 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
         unaryOp = spv::OpFwidthCoarse;
         break;
     case glslang::EOpInterpolateAtCentroid:
+#ifdef AMD_EXTENSIONS
+        if (typeProxy == glslang::EbtFloat16)
+            builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
+#endif
         builder.addCapability(spv::CapabilityInterpolationFunction);
         libCall = spv::GLSLstd450InterpolateAtCentroid;
         break;
@@ -6085,10 +6101,18 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
         libCall = spv::GLSLstd450Refract;
         break;
     case glslang::EOpInterpolateAtSample:
+#ifdef AMD_EXTENSIONS
+        if (typeProxy == glslang::EbtFloat16)
+            builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
+#endif
         builder.addCapability(spv::CapabilityInterpolationFunction);
         libCall = spv::GLSLstd450InterpolateAtSample;
         break;
     case glslang::EOpInterpolateAtOffset:
+#ifdef AMD_EXTENSIONS
+        if (typeProxy == glslang::EbtFloat16)
+            builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
+#endif
         builder.addCapability(spv::CapabilityInterpolationFunction);
         libCall = spv::GLSLstd450InterpolateAtOffset;
         break;
@@ -6239,6 +6263,8 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
         break;
 
     case glslang::EOpInterpolateAtVertex:
+        if (typeProxy == glslang::EbtFloat16)
+            builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
         extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
         libCall = spv::InterpolateAtVertexAMD;
         break;

+ 4 - 4
3rdparty/glslang/Test/400.geom

@@ -285,10 +285,10 @@ void doubles()
     dvec3v  += reflect(dvec3v, dvec3v);
     dvec4v  += reflect(dvec4v, dvec4v);
 
-    doublev += refract(doublev, doublev, doublev);
-    dvec2v  += refract(dvec2v, dvec2v, doublev);
-    dvec3v  += refract(dvec3v, dvec3v, doublev);
-    dvec4v  += refract(dvec4v, dvec4v, doublev);
+    doublev += refract(doublev, doublev, 1.3);
+    dvec2v  += refract(dvec2v, dvec2v,   1.3);
+    dvec3v  += refract(dvec3v, dvec3v,   1.3);
+    dvec4v  += refract(dvec4v, dvec4v,   1.3);
 
     dmat2   dmat2v   = outerProduct(dvec2v, dvec2v);
     dmat3   dmat3v   = outerProduct(dvec3v, dvec3v);

+ 8 - 4
3rdparty/glslang/Test/baseResults/400.geom.out

@@ -844,25 +844,29 @@ ERROR: node is still EOpNull!
 0:288        refract ( global double)
 0:288          'doublev' ( temp double)
 0:288          'doublev' ( temp double)
-0:288          'doublev' ( temp double)
+0:288          Constant:
+0:288            1.300000
 0:289      add second child into first child ( temp 2-component vector of double)
 0:289        'dvec2v' ( temp 2-component vector of double)
 0:289        refract ( global 2-component vector of double)
 0:289          'dvec2v' ( temp 2-component vector of double)
 0:289          'dvec2v' ( temp 2-component vector of double)
-0:289          'doublev' ( temp double)
+0:289          Constant:
+0:289            1.300000
 0:290      add second child into first child ( temp 3-component vector of double)
 0:290        'dvec3v' ( temp 3-component vector of double)
 0:290        refract ( global 3-component vector of double)
 0:290          'dvec3v' ( temp 3-component vector of double)
 0:290          'dvec3v' ( temp 3-component vector of double)
-0:290          'doublev' ( temp double)
+0:290          Constant:
+0:290            1.300000
 0:291      add second child into first child ( temp 4-component vector of double)
 0:291        'dvec4v' ( temp 4-component vector of double)
 0:291        refract ( global 4-component vector of double)
 0:291          'dvec4v' ( temp 4-component vector of double)
 0:291          'dvec4v' ( temp 4-component vector of double)
-0:291          'doublev' ( temp double)
+0:291          Constant:
+0:291            1.300000
 0:293      Sequence
 0:293        move second child to first child ( temp 2X2 matrix of double)
 0:293          'dmat2v' ( temp 2X2 matrix of double)

+ 47 - 40
3rdparty/glslang/Test/baseResults/hlsl.basic.comp.out

@@ -15,17 +15,19 @@ local_size = (1, 1, 1)
 0:?     Sequence
 0:4      move second child to first child ( temp int)
 0:?         'dti' ( temp int)
-0:?         'dti' ( in int GlobalInvocationID)
+0:?         Construct int ( temp int)
+0:?           'dti' ( in 3-component vector of int GlobalInvocationID)
 0:4      move second child to first child ( temp int)
 0:?         'gti' ( temp int)
-0:?         'gti' ( in int LocalInvocationID)
+0:?         Construct int ( temp int)
+0:?           'gti' ( in 3-component vector of int LocalInvocationID)
 0:4      Function Call: @main(i1;i1; ( temp void)
 0:?         'dti' ( temp int)
 0:?         'gti' ( temp int)
 0:?   Linker Objects
 0:?     'a' ( shared 100-element array of 4-component vector of float)
-0:?     'dti' ( in int GlobalInvocationID)
-0:?     'gti' ( in int LocalInvocationID)
+0:?     'dti' ( in 3-component vector of int GlobalInvocationID)
+0:?     'gti' ( in 3-component vector of int LocalInvocationID)
 
 
 Linked compute stage:
@@ -47,26 +49,28 @@ local_size = (1, 1, 1)
 0:?     Sequence
 0:4      move second child to first child ( temp int)
 0:?         'dti' ( temp int)
-0:?         'dti' ( in int GlobalInvocationID)
+0:?         Construct int ( temp int)
+0:?           'dti' ( in 3-component vector of int GlobalInvocationID)
 0:4      move second child to first child ( temp int)
 0:?         'gti' ( temp int)
-0:?         'gti' ( in int LocalInvocationID)
+0:?         Construct int ( temp int)
+0:?           'gti' ( in 3-component vector of int LocalInvocationID)
 0:4      Function Call: @main(i1;i1; ( temp void)
 0:?         'dti' ( temp int)
 0:?         'gti' ( temp int)
 0:?   Linker Objects
 0:?     'a' ( shared 100-element array of 4-component vector of float)
-0:?     'dti' ( in int GlobalInvocationID)
-0:?     'gti' ( in int LocalInvocationID)
+0:?     'dti' ( in 3-component vector of int GlobalInvocationID)
+0:?     'gti' ( in 3-component vector of int LocalInvocationID)
 
 // Module Version 10000
 // Generated by (magic number): 80006
-// Id's are bound by 35
+// Id's are bound by 38
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint GLCompute 4  "main" 18 21
+                              EntryPoint GLCompute 4  "main" 19 23
                               ExecutionMode 4 LocalSize 1 1 1
                               Source HLSL 500
                               Name 4  "main"
@@ -74,44 +78,47 @@ local_size = (1, 1, 1)
                               Name 9  "dti"
                               Name 10  "gti"
                               Name 16  "dti"
-                              Name 18  "dti"
-                              Name 20  "gti"
-                              Name 21  "gti"
-                              Name 23  "param"
-                              Name 25  "param"
-                              Name 34  "a"
-                              Decorate 18(dti) BuiltIn GlobalInvocationId
-                              Decorate 21(gti) BuiltIn LocalInvocationId
+                              Name 19  "dti"
+                              Name 22  "gti"
+                              Name 23  "gti"
+                              Name 26  "param"
+                              Name 28  "param"
+                              Name 37  "a"
+                              Decorate 19(dti) BuiltIn GlobalInvocationId
+                              Decorate 23(gti) BuiltIn LocalInvocationId
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
                7:             TypePointer Function 6(int)
                8:             TypeFunction 2 7(ptr) 7(ptr)
-              17:             TypePointer Input 6(int)
-         18(dti):     17(ptr) Variable Input
-         21(gti):     17(ptr) Variable Input
-              28:             TypeFloat 32
-              29:             TypeVector 28(float) 4
-              30:             TypeInt 32 0
-              31:     30(int) Constant 100
-              32:             TypeArray 29(fvec4) 31
-              33:             TypePointer Workgroup 32
-           34(a):     33(ptr) Variable Workgroup
+              17:             TypeVector 6(int) 3
+              18:             TypePointer Input 17(ivec3)
+         19(dti):     18(ptr) Variable Input
+         23(gti):     18(ptr) Variable Input
+              31:             TypeFloat 32
+              32:             TypeVector 31(float) 4
+              33:             TypeInt 32 0
+              34:     33(int) Constant 100
+              35:             TypeArray 32(fvec4) 34
+              36:             TypePointer Workgroup 35
+           37(a):     36(ptr) Variable Workgroup
          4(main):           2 Function None 3
                5:             Label
          16(dti):      7(ptr) Variable Function
-         20(gti):      7(ptr) Variable Function
-       23(param):      7(ptr) Variable Function
-       25(param):      7(ptr) Variable Function
-              19:      6(int) Load 18(dti)
-                              Store 16(dti) 19
-              22:      6(int) Load 21(gti)
-                              Store 20(gti) 22
-              24:      6(int) Load 16(dti)
-                              Store 23(param) 24
-              26:      6(int) Load 20(gti)
-                              Store 25(param) 26
-              27:           2 FunctionCall 11(@main(i1;i1;) 23(param) 25(param)
+         22(gti):      7(ptr) Variable Function
+       26(param):      7(ptr) Variable Function
+       28(param):      7(ptr) Variable Function
+              20:   17(ivec3) Load 19(dti)
+              21:      6(int) CompositeExtract 20 0
+                              Store 16(dti) 21
+              24:   17(ivec3) Load 23(gti)
+              25:      6(int) CompositeExtract 24 0
+                              Store 22(gti) 25
+              27:      6(int) Load 16(dti)
+                              Store 26(param) 27
+              29:      6(int) Load 22(gti)
+                              Store 28(param) 29
+              30:           2 FunctionCall 11(@main(i1;i1;) 26(param) 28(param)
                               Return
                               FunctionEnd
 11(@main(i1;i1;):           2 Function None 8

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

@@ -0,0 +1,204 @@
+hlsl.coverage.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:15  Function Definition: @main(struct-PS_INPUT1; ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15    Function Parameters: 
+0:15      'i' ( in structure{})
+0:?     Sequence
+0:17      move second child to first child ( temp 4-component vector of float)
+0:17        vColor: direct index for structure ( temp 4-component vector of float)
+0:17          'o' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:17          Constant:
+0:17            0 (const int)
+0:?         Constant:
+0:?           1.000000
+0:?           0.000000
+0:?           0.000000
+0:?           1.000000
+0:18      move second child to first child ( temp uint)
+0:18        nCoverageMask: direct index for structure ( temp uint)
+0:18          'o' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:18          Constant:
+0:18            1 (const int)
+0:18        Constant:
+0:18          0 (const uint)
+0:19      Branch: Return with expression
+0:19        'o' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15  Function Definition: main( ( temp void)
+0:15    Function Parameters: 
+0:?     Sequence
+0:15      Sequence
+0:15        move second child to first child ( temp structure{})
+0:?           'i' ( temp structure{})
+0:?           'i' ( in structure{})
+0:15      Sequence
+0:15        move second child to first child ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15          'flattenTemp' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15          Function Call: @main(struct-PS_INPUT1; ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:?             'i' ( temp structure{})
+0:15        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.vColor' (layout( location=0) out 4-component vector of float)
+0:15          vColor: direct index for structure ( temp 4-component vector of float)
+0:15            'flattenTemp' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15            Constant:
+0:15              0 (const int)
+0:15        move second child to first child ( temp uint)
+0:15          direct index ( out uint SampleMaskIn)
+0:?             '@entryPointOutput.nCoverageMask' ( out 1-element array of uint SampleMaskIn)
+0:15            Constant:
+0:15              0 (const int)
+0:15          nCoverageMask: direct index for structure ( temp uint)
+0:15            'flattenTemp' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15            Constant:
+0:15              1 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput.nCoverageMask' ( out 1-element array of uint SampleMaskIn)
+0:?     '@entryPointOutput.vColor' (layout( location=0) out 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:15  Function Definition: @main(struct-PS_INPUT1; ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15    Function Parameters: 
+0:15      'i' ( in structure{})
+0:?     Sequence
+0:17      move second child to first child ( temp 4-component vector of float)
+0:17        vColor: direct index for structure ( temp 4-component vector of float)
+0:17          'o' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:17          Constant:
+0:17            0 (const int)
+0:?         Constant:
+0:?           1.000000
+0:?           0.000000
+0:?           0.000000
+0:?           1.000000
+0:18      move second child to first child ( temp uint)
+0:18        nCoverageMask: direct index for structure ( temp uint)
+0:18          'o' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:18          Constant:
+0:18            1 (const int)
+0:18        Constant:
+0:18          0 (const uint)
+0:19      Branch: Return with expression
+0:19        'o' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15  Function Definition: main( ( temp void)
+0:15    Function Parameters: 
+0:?     Sequence
+0:15      Sequence
+0:15        move second child to first child ( temp structure{})
+0:?           'i' ( temp structure{})
+0:?           'i' ( in structure{})
+0:15      Sequence
+0:15        move second child to first child ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15          'flattenTemp' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15          Function Call: @main(struct-PS_INPUT1; ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:?             'i' ( temp structure{})
+0:15        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.vColor' (layout( location=0) out 4-component vector of float)
+0:15          vColor: direct index for structure ( temp 4-component vector of float)
+0:15            'flattenTemp' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15            Constant:
+0:15              0 (const int)
+0:15        move second child to first child ( temp uint)
+0:15          direct index ( out uint SampleMaskIn)
+0:?             '@entryPointOutput.nCoverageMask' ( out 1-element array of uint SampleMaskIn)
+0:15            Constant:
+0:15              0 (const int)
+0:15          nCoverageMask: direct index for structure ( temp uint)
+0:15            'flattenTemp' ( temp structure{ temp 4-component vector of float vColor,  temp uint nCoverageMask})
+0:15            Constant:
+0:15              1 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput.nCoverageMask' ( out 1-element array of uint SampleMaskIn)
+0:?     '@entryPointOutput.vColor' (layout( location=0) out 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80006
+// Id's are bound by 52
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 41 47
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 6  "PS_INPUT"
+                              Name 11  "PS_OUTPUT"
+                              MemberName 11(PS_OUTPUT) 0  "vColor"
+                              MemberName 11(PS_OUTPUT) 1  "nCoverageMask"
+                              Name 14  "@main(struct-PS_INPUT1;"
+                              Name 13  "i"
+                              Name 17  "o"
+                              Name 32  "i"
+                              Name 34  "i"
+                              Name 36  "flattenTemp"
+                              Name 37  "param"
+                              Name 41  "@entryPointOutput.vColor"
+                              Name 47  "@entryPointOutput.nCoverageMask"
+                              Decorate 41(@entryPointOutput.vColor) Location 0
+                              Decorate 47(@entryPointOutput.nCoverageMask) BuiltIn SampleMask
+               2:             TypeVoid
+               3:             TypeFunction 2
+     6(PS_INPUT):             TypeStruct
+               7:             TypePointer Function 6(PS_INPUT)
+               8:             TypeFloat 32
+               9:             TypeVector 8(float) 4
+              10:             TypeInt 32 0
+   11(PS_OUTPUT):             TypeStruct 9(fvec4) 10(int)
+              12:             TypeFunction 11(PS_OUTPUT) 7(ptr)
+              16:             TypePointer Function 11(PS_OUTPUT)
+              18:             TypeInt 32 1
+              19:     18(int) Constant 0
+              20:    8(float) Constant 1065353216
+              21:    8(float) Constant 0
+              22:    9(fvec4) ConstantComposite 20 21 21 20
+              23:             TypePointer Function 9(fvec4)
+              25:     18(int) Constant 1
+              26:     10(int) Constant 0
+              27:             TypePointer Function 10(int)
+              33:             TypePointer Input 6(PS_INPUT)
+           34(i):     33(ptr) Variable Input
+              40:             TypePointer Output 9(fvec4)
+41(@entryPointOutput.vColor):     40(ptr) Variable Output
+              44:     10(int) Constant 1
+              45:             TypeArray 10(int) 44
+              46:             TypePointer Output 45
+47(@entryPointOutput.nCoverageMask):     46(ptr) Variable Output
+              50:             TypePointer Output 10(int)
+         4(main):           2 Function None 3
+               5:             Label
+           32(i):      7(ptr) Variable Function
+ 36(flattenTemp):     16(ptr) Variable Function
+       37(param):      7(ptr) Variable Function
+              35: 6(PS_INPUT) Load 34(i)
+                              Store 32(i) 35
+              38: 6(PS_INPUT) Load 32(i)
+                              Store 37(param) 38
+              39:11(PS_OUTPUT) FunctionCall 14(@main(struct-PS_INPUT1;) 37(param)
+                              Store 36(flattenTemp) 39
+              42:     23(ptr) AccessChain 36(flattenTemp) 19
+              43:    9(fvec4) Load 42
+                              Store 41(@entryPointOutput.vColor) 43
+              48:     27(ptr) AccessChain 36(flattenTemp) 25
+              49:     10(int) Load 48
+              51:     50(ptr) AccessChain 47(@entryPointOutput.nCoverageMask) 19
+                              Store 51 49
+                              Return
+                              FunctionEnd
+14(@main(struct-PS_INPUT1;):11(PS_OUTPUT) Function None 12
+           13(i):      7(ptr) FunctionParameter
+              15:             Label
+           17(o):     16(ptr) Variable Function
+              24:     23(ptr) AccessChain 17(o) 19
+                              Store 24 22
+              28:     27(ptr) AccessChain 17(o) 25
+                              Store 28 26
+              29:11(PS_OUTPUT) Load 17(o)
+                              ReturnValue 29
+                              FunctionEnd

+ 146 - 0
3rdparty/glslang/Test/baseResults/hlsl.groupid.comp.out

@@ -0,0 +1,146 @@
+hlsl.groupid.comp
+Shader version: 500
+local_size = (8, 8, 1)
+0:? Sequence
+0:7  Function Definition: @main(vu2; ( temp void)
+0:7    Function Parameters: 
+0:7      'vGroupId' ( in 2-component vector of uint)
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp 4-component vector of float)
+0:8          'storeTemp' ( temp 4-component vector of float)
+0:?           Constant:
+0:?             1.000000
+0:?             0.000000
+0:?             0.000000
+0:?             1.000000
+0:8        imageStore ( temp void)
+0:8          'OutputTexture' (layout( rgba32f) uniform image2D)
+0:8          vector swizzle ( temp 2-component vector of uint)
+0:8            'vGroupId' ( in 2-component vector of uint)
+0:8            Sequence
+0:8              Constant:
+0:8                0 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          'storeTemp' ( temp 4-component vector of float)
+0:8        'storeTemp' ( temp 4-component vector of float)
+0:7  Function Definition: main( ( temp void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:7      move second child to first child ( temp 2-component vector of uint)
+0:?         'vGroupId' ( temp 2-component vector of uint)
+0:?         Construct uvec2 ( temp 2-component vector of uint)
+0:?           'vGroupId' ( in 3-component vector of uint WorkGroupID)
+0:7      Function Call: @main(vu2; ( temp void)
+0:?         'vGroupId' ( temp 2-component vector of uint)
+0:?   Linker Objects
+0:?     'OutputTexture' (layout( rgba32f) uniform image2D)
+0:?     'vGroupId' ( in 3-component vector of uint WorkGroupID)
+
+
+Linked compute stage:
+
+
+Shader version: 500
+local_size = (8, 8, 1)
+0:? Sequence
+0:7  Function Definition: @main(vu2; ( temp void)
+0:7    Function Parameters: 
+0:7      'vGroupId' ( in 2-component vector of uint)
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp 4-component vector of float)
+0:8          'storeTemp' ( temp 4-component vector of float)
+0:?           Constant:
+0:?             1.000000
+0:?             0.000000
+0:?             0.000000
+0:?             1.000000
+0:8        imageStore ( temp void)
+0:8          'OutputTexture' (layout( rgba32f) uniform image2D)
+0:8          vector swizzle ( temp 2-component vector of uint)
+0:8            'vGroupId' ( in 2-component vector of uint)
+0:8            Sequence
+0:8              Constant:
+0:8                0 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8          'storeTemp' ( temp 4-component vector of float)
+0:8        'storeTemp' ( temp 4-component vector of float)
+0:7  Function Definition: main( ( temp void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:7      move second child to first child ( temp 2-component vector of uint)
+0:?         'vGroupId' ( temp 2-component vector of uint)
+0:?         Construct uvec2 ( temp 2-component vector of uint)
+0:?           'vGroupId' ( in 3-component vector of uint WorkGroupID)
+0:7      Function Call: @main(vu2; ( temp void)
+0:?         'vGroupId' ( temp 2-component vector of uint)
+0:?   Linker Objects
+0:?     'OutputTexture' (layout( rgba32f) uniform image2D)
+0:?     'vGroupId' ( in 3-component vector of uint WorkGroupID)
+
+// Module Version 10000
+// Generated by (magic number): 80006
+// Id's are bound by 37
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint GLCompute 4  "main" 29
+                              ExecutionMode 4 LocalSize 8 8 1
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 11  "@main(vu2;"
+                              Name 10  "vGroupId"
+                              Name 16  "storeTemp"
+                              Name 22  "OutputTexture"
+                              Name 26  "vGroupId"
+                              Name 29  "vGroupId"
+                              Name 34  "param"
+                              Decorate 22(OutputTexture) DescriptorSet 0
+                              Decorate 29(vGroupId) BuiltIn WorkgroupId
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 32 0
+               7:             TypeVector 6(int) 2
+               8:             TypePointer Function 7(ivec2)
+               9:             TypeFunction 2 8(ptr)
+              13:             TypeFloat 32
+              14:             TypeVector 13(float) 4
+              15:             TypePointer Function 14(fvec4)
+              17:   13(float) Constant 1065353216
+              18:   13(float) Constant 0
+              19:   14(fvec4) ConstantComposite 17 18 18 17
+              20:             TypeImage 13(float) 2D nonsampled format:Rgba32f
+              21:             TypePointer UniformConstant 20
+22(OutputTexture):     21(ptr) Variable UniformConstant
+              27:             TypeVector 6(int) 3
+              28:             TypePointer Input 27(ivec3)
+    29(vGroupId):     28(ptr) Variable Input
+         4(main):           2 Function None 3
+               5:             Label
+    26(vGroupId):      8(ptr) Variable Function
+       34(param):      8(ptr) Variable Function
+              30:   27(ivec3) Load 29(vGroupId)
+              31:      6(int) CompositeExtract 30 0
+              32:      6(int) CompositeExtract 30 1
+              33:    7(ivec2) CompositeConstruct 31 32
+                              Store 26(vGroupId) 33
+              35:    7(ivec2) Load 26(vGroupId)
+                              Store 34(param) 35
+              36:           2 FunctionCall 11(@main(vu2;) 34(param)
+                              Return
+                              FunctionEnd
+  11(@main(vu2;):           2 Function None 9
+    10(vGroupId):      8(ptr) FunctionParameter
+              12:             Label
+   16(storeTemp):     15(ptr) Variable Function
+                              Store 16(storeTemp) 19
+              23:          20 Load 22(OutputTexture)
+              24:    7(ivec2) Load 10(vGroupId)
+              25:   14(fvec4) Load 16(storeTemp)
+                              ImageWrite 23 24 25
+                              Return
+                              FunctionEnd

+ 22 - 12
3rdparty/glslang/Test/baseResults/hlsl.inoutquals.frag.out

@@ -93,13 +93,16 @@ using depth_any
 0:16            Constant:
 0:16              1 (const int)
 0:16      move second child to first child ( temp int)
-0:?         'sampleMask' ( out int SampleMaskIn)
+0:16        direct index ( out int SampleMaskIn)
+0:?           'sampleMask' ( out 1-element array of int SampleMaskIn)
+0:16          Constant:
+0:16            0 (const int)
 0:?         'sampleMask' ( temp int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.Depth' ( out float FragDepth)
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:?     'inpos' ( noperspective in 4-component vector of float FragCoord)
-0:?     'sampleMask' ( out int SampleMaskIn)
+0:?     'sampleMask' ( out 1-element array of int SampleMaskIn)
 
 
 Linked fragment stage:
@@ -199,22 +202,25 @@ using depth_any
 0:16            Constant:
 0:16              1 (const int)
 0:16      move second child to first child ( temp int)
-0:?         'sampleMask' ( out int SampleMaskIn)
+0:16        direct index ( out int SampleMaskIn)
+0:?           'sampleMask' ( out 1-element array of int SampleMaskIn)
+0:16          Constant:
+0:16            0 (const int)
 0:?         'sampleMask' ( temp int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.Depth' ( out float FragDepth)
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:?     'inpos' ( noperspective in 4-component vector of float FragCoord)
-0:?     'sampleMask' ( out int SampleMaskIn)
+0:?     'sampleMask' ( out 1-element array of int SampleMaskIn)
 
 // Module Version 10000
 // Generated by (magic number): 80006
-// Id's are bound by 88
+// Id's are bound by 92
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 68 78 82 86
+                              EntryPoint Fragment 4  "main" 68 78 82 88
                               ExecutionMode 4 OriginUpperLeft
                               ExecutionMode 4 DepthReplacing
                               Source HLSL 500
@@ -246,12 +252,12 @@ using depth_any
                               Name 74  "param"
                               Name 78  "@entryPointOutput.Color"
                               Name 82  "@entryPointOutput.Depth"
-                              Name 86  "sampleMask"
+                              Name 88  "sampleMask"
                               Decorate 68(inpos) NoPerspective
                               Decorate 68(inpos) BuiltIn FragCoord
                               Decorate 78(@entryPointOutput.Color) Location 0
                               Decorate 82(@entryPointOutput.Depth) BuiltIn FragDepth
-                              Decorate 86(sampleMask) BuiltIn SampleMask
+                              Decorate 88(sampleMask) BuiltIn SampleMask
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -278,8 +284,11 @@ using depth_any
 78(@entryPointOutput.Color):     77(ptr) Variable Output
               81:             TypePointer Output 6(float)
 82(@entryPointOutput.Depth):     81(ptr) Variable Output
-              85:             TypePointer Output 17(int)
-  86(sampleMask):     85(ptr) Variable Output
+              85:     42(int) Constant 1
+              86:             TypeArray 17(int) 85
+              87:             TypePointer Output 86
+  88(sampleMask):     87(ptr) Variable Output
+              90:             TypePointer Output 17(int)
          4(main):           2 Function None 3
                5:             Label
        66(inpos):     16(ptr) Variable Function
@@ -301,8 +310,9 @@ using depth_any
               83:      7(ptr) AccessChain 70(flattenTemp) 59
               84:    6(float) Load 83
                               Store 82(@entryPointOutput.Depth) 84
-              87:     17(int) Load 71(sampleMask)
-                              Store 86(sampleMask) 87
+              89:     17(int) Load 71(sampleMask)
+              91:     90(ptr) AccessChain 88(sampleMask) 53
+                              Store 91 89
                               Return
                               FunctionEnd
 13(MyFunc(f1;f1;f1;f1;):           2 Function None 8

+ 21 - 17
3rdparty/glslang/Test/baseResults/hlsl.structbuffer.fn2.comp.out

@@ -56,13 +56,14 @@ local_size = (256, 1, 1)
 0:?     Sequence
 0:12      move second child to first child ( temp uint)
 0:?         'dispatchId' ( temp uint)
-0:?         'dispatchId' ( in uint GlobalInvocationID)
+0:?         Construct uint ( temp uint)
+0:?           'dispatchId' ( in 3-component vector of uint GlobalInvocationID)
 0:12      Function Call: @main(u1; ( temp void)
 0:?         'dispatchId' ( temp uint)
 0:?   Linker Objects
 0:?     'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
 0:?     'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
-0:?     'dispatchId' ( in uint GlobalInvocationID)
+0:?     'dispatchId' ( in 3-component vector of uint GlobalInvocationID)
 
 
 Linked compute stage:
@@ -125,24 +126,25 @@ local_size = (256, 1, 1)
 0:?     Sequence
 0:12      move second child to first child ( temp uint)
 0:?         'dispatchId' ( temp uint)
-0:?         'dispatchId' ( in uint GlobalInvocationID)
+0:?         Construct uint ( temp uint)
+0:?           'dispatchId' ( in 3-component vector of uint GlobalInvocationID)
 0:12      Function Call: @main(u1; ( temp void)
 0:?         'dispatchId' ( temp uint)
 0:?   Linker Objects
 0:?     'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
 0:?     'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
-0:?     'dispatchId' ( in uint GlobalInvocationID)
+0:?     'dispatchId' ( in 3-component vector of uint GlobalInvocationID)
 
 // Module Version 10000
 // Generated by (magic number): 80006
-// Id's are bound by 61
+// Id's are bound by 63
 
                               Capability Shader
                               Capability ImageBuffer
                               Capability StorageImageExtendedFormats
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint GLCompute 4  "main" 56
+                              EntryPoint GLCompute 4  "main" 57
                               ExecutionMode 4 LocalSize 256 1 1
                               Source HLSL 500
                               Name 4  "main"
@@ -160,8 +162,8 @@ local_size = (256, 1, 1)
                               Name 45  "param"
                               Name 50  "g_output"
                               Name 54  "dispatchId"
-                              Name 56  "dispatchId"
-                              Name 58  "param"
+                              Name 57  "dispatchId"
+                              Name 60  "param"
                               Decorate 8 ArrayStride 4
                               MemberDecorate 9 0 NonWritable
                               MemberDecorate 9 0 Offset 0
@@ -171,7 +173,7 @@ local_size = (256, 1, 1)
                               Decorate 44(g_input) Binding 0
                               Decorate 50(g_output) DescriptorSet 0
                               Decorate 50(g_output) Binding 1
-                              Decorate 56(dispatchId) BuiltIn GlobalInvocationId
+                              Decorate 57(dispatchId) BuiltIn GlobalInvocationId
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 0
@@ -193,17 +195,19 @@ local_size = (256, 1, 1)
               48:             TypeImage 6(int) Buffer nonsampled format:Rg32ui
               49:             TypePointer UniformConstant 48
     50(g_output):     49(ptr) Variable UniformConstant
-              55:             TypePointer Input 6(int)
-  56(dispatchId):     55(ptr) Variable Input
+              55:             TypeVector 6(int) 3
+              56:             TypePointer Input 55(ivec3)
+  57(dispatchId):     56(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
   54(dispatchId):      7(ptr) Variable Function
-       58(param):      7(ptr) Variable Function
-              57:      6(int) Load 56(dispatchId)
-                              Store 54(dispatchId) 57
-              59:      6(int) Load 54(dispatchId)
-                              Store 58(param) 59
-              60:           2 FunctionCall 19(@main(u1;) 58(param)
+       60(param):      7(ptr) Variable Function
+              58:   55(ivec3) Load 57(dispatchId)
+              59:      6(int) CompositeExtract 58 0
+                              Store 54(dispatchId) 59
+              61:      6(int) Load 54(dispatchId)
+                              Store 60(param) 61
+              62:           2 FunctionCall 19(@main(u1;) 60(param)
                               Return
                               FunctionEnd
 15(testLoad(u1;block--u1[0]1;):   11(ivec2) Function None 12

+ 212 - 0
3rdparty/glslang/Test/baseResults/hlsl.tristream-append.geom.out

@@ -0,0 +1,212 @@
+hlsl.tristream-append.geom
+Shader version: 500
+invocations = -1
+max_vertices = 3
+input primitive = triangles
+output primitive = triangle_strip
+0:? Sequence
+0:8  Function Definition: EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1; ( temp void)
+0:8    Function Parameters: 
+0:8      'output' ( in structure{})
+0:8      'TriStream' ( out structure{})
+0:?     Sequence
+0:9      Sequence
+0:9        Sequence
+0:9          move second child to first child ( temp structure{})
+0:9            'TriStream' ( out structure{})
+0:9            'output' ( in structure{})
+0:9        EmitVertex ( temp void)
+0:14  Function Definition: @main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1; ( temp void)
+0:14    Function Parameters: 
+0:14      'input' ( in 3-element array of structure{})
+0:14      'TriStream' ( out structure{})
+0:?     Sequence
+0:15      Function Call: EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1; ( temp void)
+0:15        direct index ( temp structure{})
+0:15          'input' ( in 3-element array of structure{})
+0:15          Constant:
+0:15            0 (const int)
+0:15        'TriStream' ( out structure{})
+0:16      Function Call: EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1; ( temp void)
+0:16        direct index ( temp structure{})
+0:16          'input' ( in 3-element array of structure{})
+0:16          Constant:
+0:16            1 (const int)
+0:16        'TriStream' ( out structure{})
+0:17      Function Call: EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1; ( temp void)
+0:17        direct index ( temp structure{})
+0:17          'input' ( in 3-element array of structure{})
+0:17          Constant:
+0:17            2 (const int)
+0:17        'TriStream' ( out structure{})
+0:14  Function Definition: main( ( temp void)
+0:14    Function Parameters: 
+0:?     Sequence
+0:14      move second child to first child ( temp 3-element array of structure{})
+0:?         'input' ( temp 3-element array of structure{})
+0:?         'input' ( in 3-element array of structure{})
+0:14      Function Call: @main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1; ( temp void)
+0:?         'input' ( temp 3-element array of structure{})
+0:?         'TriStream' ( temp structure{})
+0:?   Linker Objects
+
+
+Linked geometry stage:
+
+
+Shader version: 500
+invocations = 1
+max_vertices = 3
+input primitive = triangles
+output primitive = triangle_strip
+0:? Sequence
+0:8  Function Definition: EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1; ( temp void)
+0:8    Function Parameters: 
+0:8      'output' ( in structure{})
+0:8      'TriStream' ( out structure{})
+0:?     Sequence
+0:9      Sequence
+0:9        Sequence
+0:9          move second child to first child ( temp structure{})
+0:9            'TriStream' ( out structure{})
+0:9            'output' ( in structure{})
+0:9        EmitVertex ( temp void)
+0:14  Function Definition: @main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1; ( temp void)
+0:14    Function Parameters: 
+0:14      'input' ( in 3-element array of structure{})
+0:14      'TriStream' ( out structure{})
+0:?     Sequence
+0:15      Function Call: EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1; ( temp void)
+0:15        direct index ( temp structure{})
+0:15          'input' ( in 3-element array of structure{})
+0:15          Constant:
+0:15            0 (const int)
+0:15        'TriStream' ( out structure{})
+0:16      Function Call: EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1; ( temp void)
+0:16        direct index ( temp structure{})
+0:16          'input' ( in 3-element array of structure{})
+0:16          Constant:
+0:16            1 (const int)
+0:16        'TriStream' ( out structure{})
+0:17      Function Call: EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1; ( temp void)
+0:17        direct index ( temp structure{})
+0:17          'input' ( in 3-element array of structure{})
+0:17          Constant:
+0:17            2 (const int)
+0:17        'TriStream' ( out structure{})
+0:14  Function Definition: main( ( temp void)
+0:14    Function Parameters: 
+0:?     Sequence
+0:14      move second child to first child ( temp 3-element array of structure{})
+0:?         'input' ( temp 3-element array of structure{})
+0:?         'input' ( in 3-element array of structure{})
+0:14      Function Call: @main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1; ( temp void)
+0:?         'input' ( temp 3-element array of structure{})
+0:?         'TriStream' ( temp structure{})
+0:?   Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80006
+// Id's are bound by 57
+
+                              Capability Geometry
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Geometry 4  "main"
+                              ExecutionMode 4 Triangles
+                              ExecutionMode 4 Invocations 1
+                              ExecutionMode 4 OutputTriangleStrip
+                              ExecutionMode 4 OutputVertices 3
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 6  "GSPS_INPUT"
+                              Name 11  "EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1;"
+                              Name 9  "output"
+                              Name 10  "TriStream"
+                              Name 20  "@main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1;"
+                              Name 18  "input"
+                              Name 19  "TriStream"
+                              Name 23  "TriStream"
+                              Name 27  "param"
+                              Name 30  "param"
+                              Name 34  "param"
+                              Name 37  "param"
+                              Name 41  "param"
+                              Name 44  "param"
+                              Name 47  "input"
+                              Name 49  "input"
+                              Name 51  "TriStream"
+                              Name 52  "param"
+                              Name 54  "param"
+               2:             TypeVoid
+               3:             TypeFunction 2
+   6(GSPS_INPUT):             TypeStruct
+               7:             TypePointer Function 6(GSPS_INPUT)
+               8:             TypeFunction 2 7(ptr) 7(ptr)
+              13:             TypeInt 32 0
+              14:     13(int) Constant 3
+              15:             TypeArray 6(GSPS_INPUT) 14
+              16:             TypePointer Function 15
+              17:             TypeFunction 2 16(ptr) 7(ptr)
+              22:             TypePointer Output 6(GSPS_INPUT)
+   23(TriStream):     22(ptr) Variable Output
+              25:             TypeInt 32 1
+              26:     25(int) Constant 0
+              33:     25(int) Constant 1
+              40:     25(int) Constant 2
+              48:             TypePointer Input 15
+       49(input):     48(ptr) Variable Input
+         4(main):           2 Function None 3
+               5:             Label
+       47(input):     16(ptr) Variable Function
+   51(TriStream):      7(ptr) Variable Function
+       52(param):     16(ptr) Variable Function
+       54(param):      7(ptr) Variable Function
+              50:          15 Load 49(input)
+                              Store 47(input) 50
+              53:          15 Load 47(input)
+                              Store 52(param) 53
+              55:           2 FunctionCall 20(@main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1;) 52(param) 54(param)
+              56:6(GSPS_INPUT) Load 54(param)
+                              Store 51(TriStream) 56
+                              Return
+                              FunctionEnd
+11(EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1;):           2 Function None 8
+       9(output):      7(ptr) FunctionParameter
+   10(TriStream):      7(ptr) FunctionParameter
+              12:             Label
+              24:6(GSPS_INPUT) Load 9(output)
+                              Store 23(TriStream) 24
+                              EmitVertex
+                              Return
+                              FunctionEnd
+20(@main(struct-GSPS_INPUT1[3];struct-GSPS_INPUT1;):           2 Function None 17
+       18(input):     16(ptr) FunctionParameter
+   19(TriStream):      7(ptr) FunctionParameter
+              21:             Label
+       27(param):      7(ptr) Variable Function
+       30(param):      7(ptr) Variable Function
+       34(param):      7(ptr) Variable Function
+       37(param):      7(ptr) Variable Function
+       41(param):      7(ptr) Variable Function
+       44(param):      7(ptr) Variable Function
+              28:      7(ptr) AccessChain 18(input) 26
+              29:6(GSPS_INPUT) Load 28
+                              Store 27(param) 29
+              31:           2 FunctionCall 11(EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1;) 27(param) 30(param)
+              32:6(GSPS_INPUT) Load 30(param)
+                              Store 19(TriStream) 32
+              35:      7(ptr) AccessChain 18(input) 33
+              36:6(GSPS_INPUT) Load 35
+                              Store 34(param) 36
+              38:           2 FunctionCall 11(EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1;) 34(param) 37(param)
+              39:6(GSPS_INPUT) Load 37(param)
+                              Store 19(TriStream) 39
+              42:      7(ptr) AccessChain 18(input) 40
+              43:6(GSPS_INPUT) Load 42
+                              Store 41(param) 43
+              45:           2 FunctionCall 11(EmitVertex(struct-GSPS_INPUT1;struct-GSPS_INPUT1;) 41(param) 44(param)
+              46:6(GSPS_INPUT) Load 44(param)
+                              Store 19(TriStream) 46
+                              Return
+                              FunctionEnd

+ 445 - 448
3rdparty/glslang/Test/baseResults/spv.400.frag.out

@@ -1,7 +1,7 @@
 spv.400.frag
 // Module Version 10000
 // Generated by (magic number): 80006
-// Id's are bound by 1118
+// Id's are bound by 1115
 
                               Capability Shader
                               Capability Geometry
@@ -11,7 +11,7 @@ spv.400.frag
                               Capability SampledRect
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 13 1027 1033 1038 1050 1076 1097 1099 1105 1107 1116
+                              EntryPoint Fragment 4  "main" 13 1024 1030 1035 1047 1073 1094 1096 1102 1104 1113
                               ExecutionMode 4 OriginUpperLeft
                               Source GLSL 400
                               SourceExtension  "GL_ARB_separate_shader_objects"
@@ -28,41 +28,41 @@ spv.400.frag
                               Name 439  "bvec2v"
                               Name 448  "bvec3v"
                               Name 457  "bvec4v"
-                              Name 739  "dmat2v"
-                              Name 745  "dmat3v"
-                              Name 751  "dmat4v"
-                              Name 757  "dmat2x3v"
-                              Name 763  "dmat3x2v"
-                              Name 769  "dmat2x4v"
-                              Name 775  "dmat4x2v"
-                              Name 781  "dmat3x4v"
-                              Name 787  "dmat4x3v"
-                              Name 1019  "v"
-                              Name 1025  "arrayedSampler"
-                              Name 1027  "i"
-                              Name 1033  "c2D"
-                              Name 1038  "gl_ClipDistance"
-                              Name 1050  "uoutp"
-                              Name 1054  "samp2dr"
-                              Name 1076  "ioutp"
-                              Name 1080  "isamp2DA"
-                              Name 1097  "gl_FragCoord"
-                              Name 1099  "vl2"
-                              Name 1105  "uo"
-                              Name 1107  "u"
-                              Name 1115  "id"
-                              Name 1116  "gl_PrimitiveID"
+                              Name 736  "dmat2v"
+                              Name 742  "dmat3v"
+                              Name 748  "dmat4v"
+                              Name 754  "dmat2x3v"
+                              Name 760  "dmat3x2v"
+                              Name 766  "dmat2x4v"
+                              Name 772  "dmat4x2v"
+                              Name 778  "dmat3x4v"
+                              Name 784  "dmat4x3v"
+                              Name 1016  "v"
+                              Name 1022  "arrayedSampler"
+                              Name 1024  "i"
+                              Name 1030  "c2D"
+                              Name 1035  "gl_ClipDistance"
+                              Name 1047  "uoutp"
+                              Name 1051  "samp2dr"
+                              Name 1073  "ioutp"
+                              Name 1077  "isamp2DA"
+                              Name 1094  "gl_FragCoord"
+                              Name 1096  "vl2"
+                              Name 1102  "uo"
+                              Name 1104  "u"
+                              Name 1112  "id"
+                              Name 1113  "gl_PrimitiveID"
                               Decorate 17(u2drs) DescriptorSet 0
-                              Decorate 1025(arrayedSampler) DescriptorSet 0
-                              Decorate 1027(i) Flat
-                              Decorate 1038(gl_ClipDistance) BuiltIn ClipDistance
-                              Decorate 1054(samp2dr) DescriptorSet 0
-                              Decorate 1080(isamp2DA) DescriptorSet 0
-                              Decorate 1097(gl_FragCoord) BuiltIn FragCoord
-                              Decorate 1099(vl2) Location 6
-                              Decorate 1107(u) Flat
-                              Decorate 1116(gl_PrimitiveID) Flat
-                              Decorate 1116(gl_PrimitiveID) BuiltIn PrimitiveId
+                              Decorate 1022(arrayedSampler) DescriptorSet 0
+                              Decorate 1024(i) Flat
+                              Decorate 1035(gl_ClipDistance) BuiltIn ClipDistance
+                              Decorate 1051(samp2dr) DescriptorSet 0
+                              Decorate 1077(isamp2DA) DescriptorSet 0
+                              Decorate 1094(gl_FragCoord) BuiltIn FragCoord
+                              Decorate 1096(vl2) Location 6
+                              Decorate 1104(u) Flat
+                              Decorate 1113(gl_PrimitiveID) Flat
+                              Decorate 1113(gl_PrimitiveID) BuiltIn PrimitiveId
                2:             TypeVoid
                3:             TypeFunction 2
               10:             TypeFloat 32
@@ -109,143 +109,144 @@ spv.400.frag
              572:  437(bvec2) ConstantComposite 563 563
              581:  446(bvec3) ConstantComposite 563 563 563
              590:  455(bvec4) ConstantComposite 563 563 563 563
-             737:             TypeMatrix 43(fvec2) 2
-             738:             TypePointer Function 737
-             743:             TypeMatrix 48(fvec3) 3
-             744:             TypePointer Function 743
-             749:             TypeMatrix 53(fvec4) 4
-             750:             TypePointer Function 749
-             755:             TypeMatrix 48(fvec3) 2
-             756:             TypePointer Function 755
-             761:             TypeMatrix 43(fvec2) 3
-             762:             TypePointer Function 761
-             767:             TypeMatrix 53(fvec4) 2
-             768:             TypePointer Function 767
-             773:             TypeMatrix 43(fvec2) 4
-             774:             TypePointer Function 773
-             779:             TypeMatrix 53(fvec4) 3
-             780:             TypePointer Function 779
-             785:             TypeMatrix 48(fvec3) 4
-             786:             TypePointer Function 785
-             954:     32(int) Constant 1
-             958:     32(int) Constant 2
-             962:     32(int) Constant 3
-             966:     23(int) Constant 1
-             970:     23(int) Constant 2
-             996:   10(float) Constant 1065353216
-            1018:             TypePointer Function 11(fvec4)
-            1020:             TypeImage 10(float) 2D sampled format:Unknown
-            1021:             TypeSampledImage 1020
-            1022:     32(int) Constant 5
-            1023:             TypeArray 1021 1022
-            1024:             TypePointer UniformConstant 1023
-1025(arrayedSampler):   1024(ptr) Variable UniformConstant
-            1026:             TypePointer Input 23(int)
-         1027(i):   1026(ptr) Variable Input
-            1029:             TypePointer UniformConstant 1021
-            1032:             TypePointer Input 20(fvec2)
-       1033(c2D):   1032(ptr) Variable Input
-            1036:             TypeArray 10(float) 958
-            1037:             TypePointer Input 1036
-1038(gl_ClipDistance):   1037(ptr) Variable Input
-            1039:             TypePointer Input 10(float)
-            1043:             TypeVector 10(float) 3
-            1048:             TypeVector 32(int) 4
-            1049:             TypePointer Output 1048(ivec4)
-     1050(uoutp):   1049(ptr) Variable Output
-            1051:             TypeImage 32(int) Rect sampled format:Unknown
-            1052:             TypeSampledImage 1051
-            1053:             TypePointer UniformConstant 1052
-   1054(samp2dr):   1053(ptr) Variable UniformConstant
-            1057:     32(int) Constant 4
-            1058:             TypeArray 24(ivec2) 1057
-            1059:   24(ivec2) ConstantComposite 966 970
-            1060:     23(int) Constant 15
-            1061:     23(int) Constant 16
+             715:   10(float) Constant 1067869798
+             734:             TypeMatrix 43(fvec2) 2
+             735:             TypePointer Function 734
+             740:             TypeMatrix 48(fvec3) 3
+             741:             TypePointer Function 740
+             746:             TypeMatrix 53(fvec4) 4
+             747:             TypePointer Function 746
+             752:             TypeMatrix 48(fvec3) 2
+             753:             TypePointer Function 752
+             758:             TypeMatrix 43(fvec2) 3
+             759:             TypePointer Function 758
+             764:             TypeMatrix 53(fvec4) 2
+             765:             TypePointer Function 764
+             770:             TypeMatrix 43(fvec2) 4
+             771:             TypePointer Function 770
+             776:             TypeMatrix 53(fvec4) 3
+             777:             TypePointer Function 776
+             782:             TypeMatrix 48(fvec3) 4
+             783:             TypePointer Function 782
+             951:     32(int) Constant 1
+             955:     32(int) Constant 2
+             959:     32(int) Constant 3
+             963:     23(int) Constant 1
+             967:     23(int) Constant 2
+             993:   10(float) Constant 1065353216
+            1015:             TypePointer Function 11(fvec4)
+            1017:             TypeImage 10(float) 2D sampled format:Unknown
+            1018:             TypeSampledImage 1017
+            1019:     32(int) Constant 5
+            1020:             TypeArray 1018 1019
+            1021:             TypePointer UniformConstant 1020
+1022(arrayedSampler):   1021(ptr) Variable UniformConstant
+            1023:             TypePointer Input 23(int)
+         1024(i):   1023(ptr) Variable Input
+            1026:             TypePointer UniformConstant 1018
+            1029:             TypePointer Input 20(fvec2)
+       1030(c2D):   1029(ptr) Variable Input
+            1033:             TypeArray 10(float) 955
+            1034:             TypePointer Input 1033
+1035(gl_ClipDistance):   1034(ptr) Variable Input
+            1036:             TypePointer Input 10(float)
+            1040:             TypeVector 10(float) 3
+            1045:             TypeVector 32(int) 4
+            1046:             TypePointer Output 1045(ivec4)
+     1047(uoutp):   1046(ptr) Variable Output
+            1048:             TypeImage 32(int) Rect sampled format:Unknown
+            1049:             TypeSampledImage 1048
+            1050:             TypePointer UniformConstant 1049
+   1051(samp2dr):   1050(ptr) Variable UniformConstant
+            1054:     32(int) Constant 4
+            1055:             TypeArray 24(ivec2) 1054
+            1056:   24(ivec2) ConstantComposite 963 967
+            1057:     23(int) Constant 15
+            1058:     23(int) Constant 16
+            1059:   24(ivec2) ConstantComposite 1057 1058
+            1060:     23(int) Constant 4294967294
+            1061:     23(int) Constant 0
             1062:   24(ivec2) ConstantComposite 1060 1061
-            1063:     23(int) Constant 4294967294
-            1064:     23(int) Constant 0
-            1065:   24(ivec2) ConstantComposite 1063 1064
-            1066:        1058 ConstantComposite 1059 27 1062 1065
-            1074:             TypeVector 23(int) 4
-            1075:             TypePointer Output 1074(ivec4)
-     1076(ioutp):   1075(ptr) Variable Output
-            1077:             TypeImage 23(int) 2D array sampled format:Unknown
-            1078:             TypeSampledImage 1077
-            1079:             TypePointer UniformConstant 1078
-  1080(isamp2DA):   1079(ptr) Variable UniformConstant
-            1082:   10(float) Constant 1036831949
-            1083: 1043(fvec3) ConstantComposite 1082 1082 1082
-            1084:   24(ivec2) ConstantComposite 966 966
-            1096:             TypePointer Input 11(fvec4)
-1097(gl_FragCoord):   1096(ptr) Variable Input
-       1099(vl2):   1096(ptr) Variable Input
-            1104:             TypePointer Output 32(int)
-        1105(uo):   1104(ptr) Variable Output
-            1106:             TypePointer Input 32(int)
-         1107(u):   1106(ptr) Variable Input
-            1114:             TypePointer Function 23(int)
-1116(gl_PrimitiveID):   1026(ptr) Variable Input
+            1063:        1055 ConstantComposite 1056 27 1059 1062
+            1071:             TypeVector 23(int) 4
+            1072:             TypePointer Output 1071(ivec4)
+     1073(ioutp):   1072(ptr) Variable Output
+            1074:             TypeImage 23(int) 2D array sampled format:Unknown
+            1075:             TypeSampledImage 1074
+            1076:             TypePointer UniformConstant 1075
+  1077(isamp2DA):   1076(ptr) Variable UniformConstant
+            1079:   10(float) Constant 1036831949
+            1080: 1040(fvec3) ConstantComposite 1079 1079 1079
+            1081:   24(ivec2) ConstantComposite 963 963
+            1093:             TypePointer Input 11(fvec4)
+1094(gl_FragCoord):   1093(ptr) Variable Input
+       1096(vl2):   1093(ptr) Variable Input
+            1101:             TypePointer Output 32(int)
+        1102(uo):   1101(ptr) Variable Output
+            1103:             TypePointer Input 32(int)
+         1104(u):   1103(ptr) Variable Input
+            1111:             TypePointer Function 23(int)
+1113(gl_PrimitiveID):   1023(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
-         1019(v):   1018(ptr) Variable Function
-        1115(id):   1114(ptr) Variable Function
-            1028:     23(int) Load 1027(i)
-            1030:   1029(ptr) AccessChain 1025(arrayedSampler) 1028
-            1031:        1021 Load 1030
-            1034:   20(fvec2) Load 1033(c2D)
-            1035:   11(fvec4) ImageSampleImplicitLod 1031 1034
-                              Store 1019(v) 1035
-            1040:   1039(ptr) AccessChain 1038(gl_ClipDistance) 966
-            1041:   10(float) Load 1040
-            1042:     34(ptr) AccessChain 13(outp) 33
-                              Store 1042 1041
-            1044:   11(fvec4) Load 1019(v)
-            1045: 1043(fvec3) VectorShuffle 1044 1044 1 2 3
-            1046:   11(fvec4) Load 13(outp)
-            1047:   11(fvec4) VectorShuffle 1046 1045 0 4 5 6
-                              Store 13(outp) 1047
-            1055:        1052 Load 1054(samp2dr)
-            1056:   20(fvec2) Load 1033(c2D)
-            1067: 1048(ivec4) ImageGather 1055 1056 970 ConstOffsets 1066
-                              Store 1050(uoutp) 1067
-            1068:   1029(ptr) AccessChain 1025(arrayedSampler) 1064
-            1069:        1021 Load 1068
-            1070:   20(fvec2) Load 1033(c2D)
-            1071:   11(fvec4) ImageGather 1069 1070 1064
-            1072:   11(fvec4) Load 13(outp)
-            1073:   11(fvec4) FAdd 1072 1071
-                              Store 13(outp) 1073
-            1081:        1078 Load 1080(isamp2DA)
-            1085: 1074(ivec4) ImageGather 1081 1083 25 ConstOffset 1084
-                              Store 1076(ioutp) 1085
-            1086:        1078 Load 1080(isamp2DA)
-            1087: 1074(ivec4) ImageGather 1086 1083 25 ConstOffset 1084
-            1088: 1074(ivec4) Load 1076(ioutp)
-            1089: 1074(ivec4) IAdd 1088 1087
-                              Store 1076(ioutp) 1089
-            1090:        1078 Load 1080(isamp2DA)
-            1091:     23(int) Load 1027(i)
-            1092:   24(ivec2) CompositeConstruct 1091 1091
-            1093: 1074(ivec4) ImageGather 1090 1083 1064 Offset 1092
-            1094: 1074(ivec4) Load 1076(ioutp)
-            1095: 1074(ivec4) IAdd 1094 1093
-                              Store 1076(ioutp) 1095
-            1098:   11(fvec4) Load 1097(gl_FragCoord)
-            1100:   11(fvec4) Load 1099(vl2)
-            1101:   11(fvec4) FAdd 1098 1100
-            1102:   11(fvec4) Load 13(outp)
-            1103:   11(fvec4) FAdd 1102 1101
-                              Store 13(outp) 1103
-            1108:     32(int) Load 1107(u)
-            1109:     23(int) Load 1027(i)
-            1110:     32(int) Bitcast 1109
-            1111:     32(int) UMod 1108 1110
-                              Store 1105(uo) 1111
-            1112:           2 FunctionCall 6(foo23()
-            1113:           2 FunctionCall 8(doubles()
-            1117:     23(int) Load 1116(gl_PrimitiveID)
-                              Store 1115(id) 1117
+         1016(v):   1015(ptr) Variable Function
+        1112(id):   1111(ptr) Variable Function
+            1025:     23(int) Load 1024(i)
+            1027:   1026(ptr) AccessChain 1022(arrayedSampler) 1025
+            1028:        1018 Load 1027
+            1031:   20(fvec2) Load 1030(c2D)
+            1032:   11(fvec4) ImageSampleImplicitLod 1028 1031
+                              Store 1016(v) 1032
+            1037:   1036(ptr) AccessChain 1035(gl_ClipDistance) 963
+            1038:   10(float) Load 1037
+            1039:     34(ptr) AccessChain 13(outp) 33
+                              Store 1039 1038
+            1041:   11(fvec4) Load 1016(v)
+            1042: 1040(fvec3) VectorShuffle 1041 1041 1 2 3
+            1043:   11(fvec4) Load 13(outp)
+            1044:   11(fvec4) VectorShuffle 1043 1042 0 4 5 6
+                              Store 13(outp) 1044
+            1052:        1049 Load 1051(samp2dr)
+            1053:   20(fvec2) Load 1030(c2D)
+            1064: 1045(ivec4) ImageGather 1052 1053 967 ConstOffsets 1063
+                              Store 1047(uoutp) 1064
+            1065:   1026(ptr) AccessChain 1022(arrayedSampler) 1061
+            1066:        1018 Load 1065
+            1067:   20(fvec2) Load 1030(c2D)
+            1068:   11(fvec4) ImageGather 1066 1067 1061
+            1069:   11(fvec4) Load 13(outp)
+            1070:   11(fvec4) FAdd 1069 1068
+                              Store 13(outp) 1070
+            1078:        1075 Load 1077(isamp2DA)
+            1082: 1071(ivec4) ImageGather 1078 1080 25 ConstOffset 1081
+                              Store 1073(ioutp) 1082
+            1083:        1075 Load 1077(isamp2DA)
+            1084: 1071(ivec4) ImageGather 1083 1080 25 ConstOffset 1081
+            1085: 1071(ivec4) Load 1073(ioutp)
+            1086: 1071(ivec4) IAdd 1085 1084
+                              Store 1073(ioutp) 1086
+            1087:        1075 Load 1077(isamp2DA)
+            1088:     23(int) Load 1024(i)
+            1089:   24(ivec2) CompositeConstruct 1088 1088
+            1090: 1071(ivec4) ImageGather 1087 1080 1061 Offset 1089
+            1091: 1071(ivec4) Load 1073(ioutp)
+            1092: 1071(ivec4) IAdd 1091 1090
+                              Store 1073(ioutp) 1092
+            1095:   11(fvec4) Load 1094(gl_FragCoord)
+            1097:   11(fvec4) Load 1096(vl2)
+            1098:   11(fvec4) FAdd 1095 1097
+            1099:   11(fvec4) Load 13(outp)
+            1100:   11(fvec4) FAdd 1099 1098
+                              Store 13(outp) 1100
+            1105:     32(int) Load 1104(u)
+            1106:     23(int) Load 1024(i)
+            1107:     32(int) Bitcast 1106
+            1108:     32(int) UMod 1105 1107
+                              Store 1102(uo) 1108
+            1109:           2 FunctionCall 6(foo23()
+            1110:           2 FunctionCall 8(doubles()
+            1114:     23(int) Load 1113(gl_PrimitiveID)
+                              Store 1112(id) 1114
                               Return
                               FunctionEnd
        6(foo23():           2 Function None 3
@@ -277,15 +278,15 @@ spv.400.frag
              566:    438(ptr) Variable Function
              575:    447(ptr) Variable Function
              584:    456(ptr) Variable Function
-     739(dmat2v):    738(ptr) Variable Function
-     745(dmat3v):    744(ptr) Variable Function
-     751(dmat4v):    750(ptr) Variable Function
-   757(dmat2x3v):    756(ptr) Variable Function
-   763(dmat3x2v):    762(ptr) Variable Function
-   769(dmat2x4v):    768(ptr) Variable Function
-   775(dmat4x2v):    774(ptr) Variable Function
-   781(dmat3x4v):    780(ptr) Variable Function
-   787(dmat4x3v):    786(ptr) Variable Function
+     736(dmat2v):    735(ptr) Variable Function
+     742(dmat3v):    741(ptr) Variable Function
+     748(dmat4v):    747(ptr) Variable Function
+   754(dmat2x3v):    753(ptr) Variable Function
+   760(dmat3x2v):    759(ptr) Variable Function
+   766(dmat2x4v):    765(ptr) Variable Function
+   772(dmat4x2v):    771(ptr) Variable Function
+   778(dmat3x4v):    777(ptr) Variable Function
+   784(dmat4x3v):    783(ptr) Variable Function
                               Store 41(doublev) 42
                               Store 45(dvec2v) 47
                               Store 50(dvec3v) 52
@@ -1079,313 +1080,309 @@ spv.400.frag
                               Store 55(dvec4v) 712
              713:   39(float) Load 41(doublev)
              714:   39(float) Load 41(doublev)
-             715:   39(float) Load 41(doublev)
              716:   39(float) ExtInst 1(GLSL.std.450) 72(Refract) 713 714 715
              717:   39(float) Load 41(doublev)
              718:   39(float) FAdd 717 716
                               Store 41(doublev) 718
              719:   43(fvec2) Load 45(dvec2v)
              720:   43(fvec2) Load 45(dvec2v)
-             721:   39(float) Load 41(doublev)
-             722:   43(fvec2) ExtInst 1(GLSL.std.450) 72(Refract) 719 720 721
-             723:   43(fvec2) Load 45(dvec2v)
-             724:   43(fvec2) FAdd 723 722
-                              Store 45(dvec2v) 724
+             721:   43(fvec2) ExtInst 1(GLSL.std.450) 72(Refract) 719 720 715
+             722:   43(fvec2) Load 45(dvec2v)
+             723:   43(fvec2) FAdd 722 721
+                              Store 45(dvec2v) 723
+             724:   48(fvec3) Load 50(dvec3v)
              725:   48(fvec3) Load 50(dvec3v)
-             726:   48(fvec3) Load 50(dvec3v)
-             727:   39(float) Load 41(doublev)
-             728:   48(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 725 726 727
-             729:   48(fvec3) Load 50(dvec3v)
-             730:   48(fvec3) FAdd 729 728
-                              Store 50(dvec3v) 730
-             731:   53(fvec4) Load 55(dvec4v)
+             726:   48(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 724 725 715
+             727:   48(fvec3) Load 50(dvec3v)
+             728:   48(fvec3) FAdd 727 726
+                              Store 50(dvec3v) 728
+             729:   53(fvec4) Load 55(dvec4v)
+             730:   53(fvec4) Load 55(dvec4v)
+             731:   53(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 729 730 715
              732:   53(fvec4) Load 55(dvec4v)
-             733:   39(float) Load 41(doublev)
-             734:   53(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 731 732 733
-             735:   53(fvec4) Load 55(dvec4v)
-             736:   53(fvec4) FAdd 735 734
-                              Store 55(dvec4v) 736
-             740:   43(fvec2) Load 45(dvec2v)
-             741:   43(fvec2) Load 45(dvec2v)
-             742:         737 OuterProduct 740 741
-                              Store 739(dmat2v) 742
-             746:   48(fvec3) Load 50(dvec3v)
-             747:   48(fvec3) Load 50(dvec3v)
-             748:         743 OuterProduct 746 747
-                              Store 745(dmat3v) 748
-             752:   53(fvec4) Load 55(dvec4v)
-             753:   53(fvec4) Load 55(dvec4v)
-             754:         749 OuterProduct 752 753
-                              Store 751(dmat4v) 754
-             758:   48(fvec3) Load 50(dvec3v)
-             759:   43(fvec2) Load 45(dvec2v)
-             760:         755 OuterProduct 758 759
-                              Store 757(dmat2x3v) 760
-             764:   43(fvec2) Load 45(dvec2v)
-             765:   48(fvec3) Load 50(dvec3v)
-             766:         761 OuterProduct 764 765
-                              Store 763(dmat3x2v) 766
-             770:   53(fvec4) Load 55(dvec4v)
-             771:   43(fvec2) Load 45(dvec2v)
-             772:         767 OuterProduct 770 771
-                              Store 769(dmat2x4v) 772
-             776:   43(fvec2) Load 45(dvec2v)
-             777:   53(fvec4) Load 55(dvec4v)
-             778:         773 OuterProduct 776 777
-                              Store 775(dmat4x2v) 778
-             782:   53(fvec4) Load 55(dvec4v)
-             783:   48(fvec3) Load 50(dvec3v)
-             784:         779 OuterProduct 782 783
-                              Store 781(dmat3x4v) 784
-             788:   48(fvec3) Load 50(dvec3v)
-             789:   53(fvec4) Load 55(dvec4v)
-             790:         785 OuterProduct 788 789
-                              Store 787(dmat4x3v) 790
-             791:         737 Load 739(dmat2v)
-             792:         737 Load 739(dmat2v)
-             793:   43(fvec2) CompositeExtract 791 0
-             794:   43(fvec2) CompositeExtract 792 0
+             733:   53(fvec4) FAdd 732 731
+                              Store 55(dvec4v) 733
+             737:   43(fvec2) Load 45(dvec2v)
+             738:   43(fvec2) Load 45(dvec2v)
+             739:         734 OuterProduct 737 738
+                              Store 736(dmat2v) 739
+             743:   48(fvec3) Load 50(dvec3v)
+             744:   48(fvec3) Load 50(dvec3v)
+             745:         740 OuterProduct 743 744
+                              Store 742(dmat3v) 745
+             749:   53(fvec4) Load 55(dvec4v)
+             750:   53(fvec4) Load 55(dvec4v)
+             751:         746 OuterProduct 749 750
+                              Store 748(dmat4v) 751
+             755:   48(fvec3) Load 50(dvec3v)
+             756:   43(fvec2) Load 45(dvec2v)
+             757:         752 OuterProduct 755 756
+                              Store 754(dmat2x3v) 757
+             761:   43(fvec2) Load 45(dvec2v)
+             762:   48(fvec3) Load 50(dvec3v)
+             763:         758 OuterProduct 761 762
+                              Store 760(dmat3x2v) 763
+             767:   53(fvec4) Load 55(dvec4v)
+             768:   43(fvec2) Load 45(dvec2v)
+             769:         764 OuterProduct 767 768
+                              Store 766(dmat2x4v) 769
+             773:   43(fvec2) Load 45(dvec2v)
+             774:   53(fvec4) Load 55(dvec4v)
+             775:         770 OuterProduct 773 774
+                              Store 772(dmat4x2v) 775
+             779:   53(fvec4) Load 55(dvec4v)
+             780:   48(fvec3) Load 50(dvec3v)
+             781:         776 OuterProduct 779 780
+                              Store 778(dmat3x4v) 781
+             785:   48(fvec3) Load 50(dvec3v)
+             786:   53(fvec4) Load 55(dvec4v)
+             787:         782 OuterProduct 785 786
+                              Store 784(dmat4x3v) 787
+             788:         734 Load 736(dmat2v)
+             789:         734 Load 736(dmat2v)
+             790:   43(fvec2) CompositeExtract 788 0
+             791:   43(fvec2) CompositeExtract 789 0
+             792:   43(fvec2) FMul 790 791
+             793:   43(fvec2) CompositeExtract 788 1
+             794:   43(fvec2) CompositeExtract 789 1
              795:   43(fvec2) FMul 793 794
-             796:   43(fvec2) CompositeExtract 791 1
-             797:   43(fvec2) CompositeExtract 792 1
-             798:   43(fvec2) FMul 796 797
-             799:         737 CompositeConstruct 795 798
-             800:         737 Load 739(dmat2v)
-             801:         737 MatrixTimesMatrix 800 799
-                              Store 739(dmat2v) 801
-             802:         743 Load 745(dmat3v)
-             803:         743 Load 745(dmat3v)
-             804:   48(fvec3) CompositeExtract 802 0
-             805:   48(fvec3) CompositeExtract 803 0
+             796:         734 CompositeConstruct 792 795
+             797:         734 Load 736(dmat2v)
+             798:         734 MatrixTimesMatrix 797 796
+                              Store 736(dmat2v) 798
+             799:         740 Load 742(dmat3v)
+             800:         740 Load 742(dmat3v)
+             801:   48(fvec3) CompositeExtract 799 0
+             802:   48(fvec3) CompositeExtract 800 0
+             803:   48(fvec3) FMul 801 802
+             804:   48(fvec3) CompositeExtract 799 1
+             805:   48(fvec3) CompositeExtract 800 1
              806:   48(fvec3) FMul 804 805
-             807:   48(fvec3) CompositeExtract 802 1
-             808:   48(fvec3) CompositeExtract 803 1
+             807:   48(fvec3) CompositeExtract 799 2
+             808:   48(fvec3) CompositeExtract 800 2
              809:   48(fvec3) FMul 807 808
-             810:   48(fvec3) CompositeExtract 802 2
-             811:   48(fvec3) CompositeExtract 803 2
-             812:   48(fvec3) FMul 810 811
-             813:         743 CompositeConstruct 806 809 812
-             814:         743 Load 745(dmat3v)
-             815:         743 MatrixTimesMatrix 814 813
-                              Store 745(dmat3v) 815
-             816:         749 Load 751(dmat4v)
-             817:         749 Load 751(dmat4v)
-             818:   53(fvec4) CompositeExtract 816 0
-             819:   53(fvec4) CompositeExtract 817 0
+             810:         740 CompositeConstruct 803 806 809
+             811:         740 Load 742(dmat3v)
+             812:         740 MatrixTimesMatrix 811 810
+                              Store 742(dmat3v) 812
+             813:         746 Load 748(dmat4v)
+             814:         746 Load 748(dmat4v)
+             815:   53(fvec4) CompositeExtract 813 0
+             816:   53(fvec4) CompositeExtract 814 0
+             817:   53(fvec4) FMul 815 816
+             818:   53(fvec4) CompositeExtract 813 1
+             819:   53(fvec4) CompositeExtract 814 1
              820:   53(fvec4) FMul 818 819
-             821:   53(fvec4) CompositeExtract 816 1
-             822:   53(fvec4) CompositeExtract 817 1
+             821:   53(fvec4) CompositeExtract 813 2
+             822:   53(fvec4) CompositeExtract 814 2
              823:   53(fvec4) FMul 821 822
-             824:   53(fvec4) CompositeExtract 816 2
-             825:   53(fvec4) CompositeExtract 817 2
+             824:   53(fvec4) CompositeExtract 813 3
+             825:   53(fvec4) CompositeExtract 814 3
              826:   53(fvec4) FMul 824 825
-             827:   53(fvec4) CompositeExtract 816 3
-             828:   53(fvec4) CompositeExtract 817 3
-             829:   53(fvec4) FMul 827 828
-             830:         749 CompositeConstruct 820 823 826 829
-             831:         749 Load 751(dmat4v)
-             832:         749 MatrixTimesMatrix 831 830
-                              Store 751(dmat4v) 832
-             833:         755 Load 757(dmat2x3v)
-             834:         755 Load 757(dmat2x3v)
-             835:   48(fvec3) CompositeExtract 833 0
-             836:   48(fvec3) CompositeExtract 834 0
+             827:         746 CompositeConstruct 817 820 823 826
+             828:         746 Load 748(dmat4v)
+             829:         746 MatrixTimesMatrix 828 827
+                              Store 748(dmat4v) 829
+             830:         752 Load 754(dmat2x3v)
+             831:         752 Load 754(dmat2x3v)
+             832:   48(fvec3) CompositeExtract 830 0
+             833:   48(fvec3) CompositeExtract 831 0
+             834:   48(fvec3) FMul 832 833
+             835:   48(fvec3) CompositeExtract 830 1
+             836:   48(fvec3) CompositeExtract 831 1
              837:   48(fvec3) FMul 835 836
-             838:   48(fvec3) CompositeExtract 833 1
-             839:   48(fvec3) CompositeExtract 834 1
-             840:   48(fvec3) FMul 838 839
-             841:         755 CompositeConstruct 837 840
-                              Store 757(dmat2x3v) 841
-             842:         767 Load 769(dmat2x4v)
-             843:         767 Load 769(dmat2x4v)
-             844:   53(fvec4) CompositeExtract 842 0
-             845:   53(fvec4) CompositeExtract 843 0
+             838:         752 CompositeConstruct 834 837
+                              Store 754(dmat2x3v) 838
+             839:         764 Load 766(dmat2x4v)
+             840:         764 Load 766(dmat2x4v)
+             841:   53(fvec4) CompositeExtract 839 0
+             842:   53(fvec4) CompositeExtract 840 0
+             843:   53(fvec4) FMul 841 842
+             844:   53(fvec4) CompositeExtract 839 1
+             845:   53(fvec4) CompositeExtract 840 1
              846:   53(fvec4) FMul 844 845
-             847:   53(fvec4) CompositeExtract 842 1
-             848:   53(fvec4) CompositeExtract 843 1
-             849:   53(fvec4) FMul 847 848
-             850:         767 CompositeConstruct 846 849
-                              Store 769(dmat2x4v) 850
-             851:         761 Load 763(dmat3x2v)
-             852:         761 Load 763(dmat3x2v)
-             853:   43(fvec2) CompositeExtract 851 0
-             854:   43(fvec2) CompositeExtract 852 0
+             847:         764 CompositeConstruct 843 846
+                              Store 766(dmat2x4v) 847
+             848:         758 Load 760(dmat3x2v)
+             849:         758 Load 760(dmat3x2v)
+             850:   43(fvec2) CompositeExtract 848 0
+             851:   43(fvec2) CompositeExtract 849 0
+             852:   43(fvec2) FMul 850 851
+             853:   43(fvec2) CompositeExtract 848 1
+             854:   43(fvec2) CompositeExtract 849 1
              855:   43(fvec2) FMul 853 854
-             856:   43(fvec2) CompositeExtract 851 1
-             857:   43(fvec2) CompositeExtract 852 1
+             856:   43(fvec2) CompositeExtract 848 2
+             857:   43(fvec2) CompositeExtract 849 2
              858:   43(fvec2) FMul 856 857
-             859:   43(fvec2) CompositeExtract 851 2
-             860:   43(fvec2) CompositeExtract 852 2
-             861:   43(fvec2) FMul 859 860
-             862:         761 CompositeConstruct 855 858 861
-                              Store 763(dmat3x2v) 862
-             863:         779 Load 781(dmat3x4v)
-             864:         779 Load 781(dmat3x4v)
-             865:   53(fvec4) CompositeExtract 863 0
-             866:   53(fvec4) CompositeExtract 864 0
+             859:         758 CompositeConstruct 852 855 858
+                              Store 760(dmat3x2v) 859
+             860:         776 Load 778(dmat3x4v)
+             861:         776 Load 778(dmat3x4v)
+             862:   53(fvec4) CompositeExtract 860 0
+             863:   53(fvec4) CompositeExtract 861 0
+             864:   53(fvec4) FMul 862 863
+             865:   53(fvec4) CompositeExtract 860 1
+             866:   53(fvec4) CompositeExtract 861 1
              867:   53(fvec4) FMul 865 866
-             868:   53(fvec4) CompositeExtract 863 1
-             869:   53(fvec4) CompositeExtract 864 1
+             868:   53(fvec4) CompositeExtract 860 2
+             869:   53(fvec4) CompositeExtract 861 2
              870:   53(fvec4) FMul 868 869
-             871:   53(fvec4) CompositeExtract 863 2
-             872:   53(fvec4) CompositeExtract 864 2
-             873:   53(fvec4) FMul 871 872
-             874:         779 CompositeConstruct 867 870 873
-                              Store 781(dmat3x4v) 874
-             875:         773 Load 775(dmat4x2v)
-             876:         773 Load 775(dmat4x2v)
-             877:   43(fvec2) CompositeExtract 875 0
-             878:   43(fvec2) CompositeExtract 876 0
+             871:         776 CompositeConstruct 864 867 870
+                              Store 778(dmat3x4v) 871
+             872:         770 Load 772(dmat4x2v)
+             873:         770 Load 772(dmat4x2v)
+             874:   43(fvec2) CompositeExtract 872 0
+             875:   43(fvec2) CompositeExtract 873 0
+             876:   43(fvec2) FMul 874 875
+             877:   43(fvec2) CompositeExtract 872 1
+             878:   43(fvec2) CompositeExtract 873 1
              879:   43(fvec2) FMul 877 878
-             880:   43(fvec2) CompositeExtract 875 1
-             881:   43(fvec2) CompositeExtract 876 1
+             880:   43(fvec2) CompositeExtract 872 2
+             881:   43(fvec2) CompositeExtract 873 2
              882:   43(fvec2) FMul 880 881
-             883:   43(fvec2) CompositeExtract 875 2
-             884:   43(fvec2) CompositeExtract 876 2
+             883:   43(fvec2) CompositeExtract 872 3
+             884:   43(fvec2) CompositeExtract 873 3
              885:   43(fvec2) FMul 883 884
-             886:   43(fvec2) CompositeExtract 875 3
-             887:   43(fvec2) CompositeExtract 876 3
-             888:   43(fvec2) FMul 886 887
-             889:         773 CompositeConstruct 879 882 885 888
-                              Store 775(dmat4x2v) 889
-             890:         785 Load 787(dmat4x3v)
-             891:         785 Load 787(dmat4x3v)
-             892:   48(fvec3) CompositeExtract 890 0
-             893:   48(fvec3) CompositeExtract 891 0
+             886:         770 CompositeConstruct 876 879 882 885
+                              Store 772(dmat4x2v) 886
+             887:         782 Load 784(dmat4x3v)
+             888:         782 Load 784(dmat4x3v)
+             889:   48(fvec3) CompositeExtract 887 0
+             890:   48(fvec3) CompositeExtract 888 0
+             891:   48(fvec3) FMul 889 890
+             892:   48(fvec3) CompositeExtract 887 1
+             893:   48(fvec3) CompositeExtract 888 1
              894:   48(fvec3) FMul 892 893
-             895:   48(fvec3) CompositeExtract 890 1
-             896:   48(fvec3) CompositeExtract 891 1
+             895:   48(fvec3) CompositeExtract 887 2
+             896:   48(fvec3) CompositeExtract 888 2
              897:   48(fvec3) FMul 895 896
-             898:   48(fvec3) CompositeExtract 890 2
-             899:   48(fvec3) CompositeExtract 891 2
+             898:   48(fvec3) CompositeExtract 887 3
+             899:   48(fvec3) CompositeExtract 888 3
              900:   48(fvec3) FMul 898 899
-             901:   48(fvec3) CompositeExtract 890 3
-             902:   48(fvec3) CompositeExtract 891 3
-             903:   48(fvec3) FMul 901 902
-             904:         785 CompositeConstruct 894 897 900 903
-                              Store 787(dmat4x3v) 904
-             905:         737 Load 739(dmat2v)
-             906:         737 Transpose 905
-             907:         737 Load 739(dmat2v)
-             908:         737 MatrixTimesMatrix 907 906
-                              Store 739(dmat2v) 908
-             909:         743 Load 745(dmat3v)
-             910:         743 Transpose 909
-             911:         743 Load 745(dmat3v)
-             912:         743 MatrixTimesMatrix 911 910
-                              Store 745(dmat3v) 912
-             913:         749 Load 751(dmat4v)
-             914:         749 Transpose 913
-             915:         749 Load 751(dmat4v)
-             916:         749 MatrixTimesMatrix 915 914
-                              Store 751(dmat4v) 916
-             917:         761 Load 763(dmat3x2v)
-             918:         755 Transpose 917
-                              Store 757(dmat2x3v) 918
-             919:         755 Load 757(dmat2x3v)
-             920:         761 Transpose 919
-                              Store 763(dmat3x2v) 920
-             921:         773 Load 775(dmat4x2v)
-             922:         767 Transpose 921
-                              Store 769(dmat2x4v) 922
-             923:         767 Load 769(dmat2x4v)
-             924:         773 Transpose 923
-                              Store 775(dmat4x2v) 924
-             925:         785 Load 787(dmat4x3v)
-             926:         779 Transpose 925
-                              Store 781(dmat3x4v) 926
-             927:         779 Load 781(dmat3x4v)
-             928:         785 Transpose 927
-                              Store 787(dmat4x3v) 928
-             929:         737 Load 739(dmat2v)
-             930:   39(float) ExtInst 1(GLSL.std.450) 33(Determinant) 929
-             931:   39(float) Load 41(doublev)
-             932:   39(float) FAdd 931 930
-                              Store 41(doublev) 932
-             933:         743 Load 745(dmat3v)
-             934:   39(float) ExtInst 1(GLSL.std.450) 33(Determinant) 933
-             935:   39(float) Load 41(doublev)
-             936:   39(float) FAdd 935 934
-                              Store 41(doublev) 936
-             937:         749 Load 751(dmat4v)
-             938:   39(float) ExtInst 1(GLSL.std.450) 33(Determinant) 937
-             939:   39(float) Load 41(doublev)
-             940:   39(float) FAdd 939 938
-                              Store 41(doublev) 940
-             941:         737 Load 739(dmat2v)
-             942:         737 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 941
-             943:         737 Load 739(dmat2v)
-             944:         737 MatrixTimesMatrix 943 942
-                              Store 739(dmat2v) 944
-             945:         743 Load 745(dmat3v)
-             946:         743 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 945
-             947:         743 Load 745(dmat3v)
-             948:         743 MatrixTimesMatrix 947 946
-                              Store 745(dmat3v) 948
-             949:         749 Load 751(dmat4v)
-             950:         749 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 949
-             951:         749 Load 751(dmat4v)
-             952:         749 MatrixTimesMatrix 951 950
-                              Store 751(dmat4v) 952
-             953:   39(float) Load 41(doublev)
-             955:     40(ptr) AccessChain 45(dvec2v) 954
-             956:   39(float) Load 955
-             957:   39(float) FAdd 953 956
-             959:     40(ptr) AccessChain 50(dvec3v) 958
-             960:   39(float) Load 959
-             961:   39(float) FAdd 957 960
-             963:     40(ptr) AccessChain 55(dvec4v) 962
-             964:   39(float) Load 963
-             965:   39(float) FAdd 961 964
-             967:     40(ptr) AccessChain 739(dmat2v) 966 954
-             968:   39(float) Load 967
-             969:   39(float) FAdd 965 968
-             971:     40(ptr) AccessChain 745(dmat3v) 970 958
+             901:         782 CompositeConstruct 891 894 897 900
+                              Store 784(dmat4x3v) 901
+             902:         734 Load 736(dmat2v)
+             903:         734 Transpose 902
+             904:         734 Load 736(dmat2v)
+             905:         734 MatrixTimesMatrix 904 903
+                              Store 736(dmat2v) 905
+             906:         740 Load 742(dmat3v)
+             907:         740 Transpose 906
+             908:         740 Load 742(dmat3v)
+             909:         740 MatrixTimesMatrix 908 907
+                              Store 742(dmat3v) 909
+             910:         746 Load 748(dmat4v)
+             911:         746 Transpose 910
+             912:         746 Load 748(dmat4v)
+             913:         746 MatrixTimesMatrix 912 911
+                              Store 748(dmat4v) 913
+             914:         758 Load 760(dmat3x2v)
+             915:         752 Transpose 914
+                              Store 754(dmat2x3v) 915
+             916:         752 Load 754(dmat2x3v)
+             917:         758 Transpose 916
+                              Store 760(dmat3x2v) 917
+             918:         770 Load 772(dmat4x2v)
+             919:         764 Transpose 918
+                              Store 766(dmat2x4v) 919
+             920:         764 Load 766(dmat2x4v)
+             921:         770 Transpose 920
+                              Store 772(dmat4x2v) 921
+             922:         782 Load 784(dmat4x3v)
+             923:         776 Transpose 922
+                              Store 778(dmat3x4v) 923
+             924:         776 Load 778(dmat3x4v)
+             925:         782 Transpose 924
+                              Store 784(dmat4x3v) 925
+             926:         734 Load 736(dmat2v)
+             927:   39(float) ExtInst 1(GLSL.std.450) 33(Determinant) 926
+             928:   39(float) Load 41(doublev)
+             929:   39(float) FAdd 928 927
+                              Store 41(doublev) 929
+             930:         740 Load 742(dmat3v)
+             931:   39(float) ExtInst 1(GLSL.std.450) 33(Determinant) 930
+             932:   39(float) Load 41(doublev)
+             933:   39(float) FAdd 932 931
+                              Store 41(doublev) 933
+             934:         746 Load 748(dmat4v)
+             935:   39(float) ExtInst 1(GLSL.std.450) 33(Determinant) 934
+             936:   39(float) Load 41(doublev)
+             937:   39(float) FAdd 936 935
+                              Store 41(doublev) 937
+             938:         734 Load 736(dmat2v)
+             939:         734 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 938
+             940:         734 Load 736(dmat2v)
+             941:         734 MatrixTimesMatrix 940 939
+                              Store 736(dmat2v) 941
+             942:         740 Load 742(dmat3v)
+             943:         740 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 942
+             944:         740 Load 742(dmat3v)
+             945:         740 MatrixTimesMatrix 944 943
+                              Store 742(dmat3v) 945
+             946:         746 Load 748(dmat4v)
+             947:         746 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 946
+             948:         746 Load 748(dmat4v)
+             949:         746 MatrixTimesMatrix 948 947
+                              Store 748(dmat4v) 949
+             950:   39(float) Load 41(doublev)
+             952:     40(ptr) AccessChain 45(dvec2v) 951
+             953:   39(float) Load 952
+             954:   39(float) FAdd 950 953
+             956:     40(ptr) AccessChain 50(dvec3v) 955
+             957:   39(float) Load 956
+             958:   39(float) FAdd 954 957
+             960:     40(ptr) AccessChain 55(dvec4v) 959
+             961:   39(float) Load 960
+             962:   39(float) FAdd 958 961
+             964:     40(ptr) AccessChain 736(dmat2v) 963 951
+             965:   39(float) Load 964
+             966:   39(float) FAdd 962 965
+             968:     40(ptr) AccessChain 742(dmat3v) 967 955
+             969:   39(float) Load 968
+             970:   39(float) FAdd 966 969
+             971:     40(ptr) AccessChain 748(dmat4v) 25 959
              972:   39(float) Load 971
-             973:   39(float) FAdd 969 972
-             974:     40(ptr) AccessChain 751(dmat4v) 25 962
+             973:   39(float) FAdd 970 972
+             974:     40(ptr) AccessChain 754(dmat2x3v) 963 951
              975:   39(float) Load 974
              976:   39(float) FAdd 973 975
-             977:     40(ptr) AccessChain 757(dmat2x3v) 966 954
+             977:     40(ptr) AccessChain 760(dmat3x2v) 963 951
              978:   39(float) Load 977
              979:   39(float) FAdd 976 978
-             980:     40(ptr) AccessChain 763(dmat3x2v) 966 954
+             980:     40(ptr) AccessChain 778(dmat3x4v) 967 955
              981:   39(float) Load 980
              982:   39(float) FAdd 979 981
-             983:     40(ptr) AccessChain 781(dmat3x4v) 970 958
+             983:     40(ptr) AccessChain 784(dmat4x3v) 967 955
              984:   39(float) Load 983
              985:   39(float) FAdd 982 984
-             986:     40(ptr) AccessChain 787(dmat4x3v) 970 958
+             986:     40(ptr) AccessChain 766(dmat2x4v) 963 951
              987:   39(float) Load 986
              988:   39(float) FAdd 985 987
-             989:     40(ptr) AccessChain 769(dmat2x4v) 966 954
+             989:     40(ptr) AccessChain 772(dmat4x2v) 963 951
              990:   39(float) Load 989
              991:   39(float) FAdd 988 990
-             992:     40(ptr) AccessChain 775(dmat4x2v) 966 954
-             993:   39(float) Load 992
-             994:   39(float) FAdd 991 993
-             995:   428(bool) Load 430(boolv)
-             997:   10(float) Select 995 996 21
-             998:   39(float) FConvert 997
-             999:   39(float) FAdd 994 998
-            1000:    429(ptr) AccessChain 439(bvec2v) 33
-            1001:   428(bool) Load 1000
-            1002:   10(float) Select 1001 996 21
-            1003:   39(float) FConvert 1002
-            1004:   39(float) FAdd 999 1003
-            1005:    429(ptr) AccessChain 448(bvec3v) 33
-            1006:   428(bool) Load 1005
-            1007:   10(float) Select 1006 996 21
-            1008:   39(float) FConvert 1007
-            1009:   39(float) FAdd 1004 1008
-            1010:    429(ptr) AccessChain 457(bvec4v) 33
-            1011:   428(bool) Load 1010
-            1012:   10(float) Select 1011 996 21
-            1013:   39(float) FConvert 1012
-            1014:   39(float) FAdd 1009 1013
-            1015:   10(float) FConvert 1014
-            1016:   11(fvec4) Load 13(outp)
-            1017:   11(fvec4) VectorTimesScalar 1016 1015
-                              Store 13(outp) 1017
+             992:   428(bool) Load 430(boolv)
+             994:   10(float) Select 992 993 21
+             995:   39(float) FConvert 994
+             996:   39(float) FAdd 991 995
+             997:    429(ptr) AccessChain 439(bvec2v) 33
+             998:   428(bool) Load 997
+             999:   10(float) Select 998 993 21
+            1000:   39(float) FConvert 999
+            1001:   39(float) FAdd 996 1000
+            1002:    429(ptr) AccessChain 448(bvec3v) 33
+            1003:   428(bool) Load 1002
+            1004:   10(float) Select 1003 993 21
+            1005:   39(float) FConvert 1004
+            1006:   39(float) FAdd 1001 1005
+            1007:    429(ptr) AccessChain 457(bvec4v) 33
+            1008:   428(bool) Load 1007
+            1009:   10(float) Select 1008 993 21
+            1010:   39(float) FConvert 1009
+            1011:   39(float) FAdd 1006 1010
+            1012:   10(float) FConvert 1011
+            1013:   11(fvec4) Load 13(outp)
+            1014:   11(fvec4) VectorTimesScalar 1013 1012
+                              Store 13(outp) 1014
                               Return
                               FunctionEnd

+ 208 - 205
3rdparty/glslang/Test/baseResults/spv.float64.frag.out

@@ -1,7 +1,7 @@
 spv.float64.frag
 // Module Version 10300
 // Generated by (magic number): 80006
-// Id's are bound by 521
+// Id's are bound by 523
 
                               Capability Shader
                               Capability Float16
@@ -13,7 +13,7 @@ spv.float64.frag
                               Capability InterpolationFunction
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 458
+                              EntryPoint Fragment 4  "main" 461
                               ExecutionMode 4 OriginUpperLeft
                               Source GLSL 450
                               SourceExtension  "GL_KHX_shader_explicit_arithmetic_types"
@@ -67,62 +67,63 @@ spv.float64.frag
                               Name 372  "f64v1"
                               Name 376  "f64v2"
                               Name 382  "f64v3"
-                              Name 401  "f64m3"
-                              Name 402  "f64m1"
-                              Name 404  "f64m2"
-                              Name 413  "f64v1"
-                              Name 415  "f64v2"
-                              Name 420  "f64m4"
-                              Name 423  "f64"
-                              Name 426  "f64m5"
-                              Name 431  "f64m6"
-                              Name 432  "f64m7"
-                              Name 435  "bv"
-                              Name 436  "f64v1"
-                              Name 438  "f64v2"
-                              Name 456  "f64v"
-                              Name 458  "if64v"
-                              Name 507  "S"
-                              MemberName 507(S) 0  "x"
-                              MemberName 507(S) 1  "y"
-                              MemberName 507(S) 2  "z"
-                              Name 509  "B1"
-                              MemberName 509(B1) 0  "a"
-                              MemberName 509(B1) 1  "b"
-                              MemberName 509(B1) 2  "c"
-                              MemberName 509(B1) 3  "d"
-                              MemberName 509(B1) 4  "e"
-                              MemberName 509(B1) 5  "f"
-                              MemberName 509(B1) 6  "g"
-                              MemberName 509(B1) 7  "h"
-                              Name 511  ""
-                              Name 512  "sf16"
-                              Name 514  "sf"
-                              Name 515  "sd"
-                              Decorate 458(if64v) Flat
-                              Decorate 505 ArrayStride 16
-                              Decorate 506 ArrayStride 64
-                              MemberDecorate 507(S) 0 Offset 0
-                              MemberDecorate 507(S) 1 Offset 16
-                              MemberDecorate 507(S) 2 Offset 32
-                              Decorate 508 ArrayStride 64
-                              MemberDecorate 509(B1) 0 Offset 0
-                              MemberDecorate 509(B1) 1 Offset 16
-                              MemberDecorate 509(B1) 2 Offset 32
-                              MemberDecorate 509(B1) 3 Offset 64
-                              MemberDecorate 509(B1) 4 ColMajor
-                              MemberDecorate 509(B1) 4 Offset 96
-                              MemberDecorate 509(B1) 4 MatrixStride 32
-                              MemberDecorate 509(B1) 5 ColMajor
-                              MemberDecorate 509(B1) 5 Offset 160
-                              MemberDecorate 509(B1) 5 MatrixStride 32
-                              MemberDecorate 509(B1) 6 Offset 288
-                              MemberDecorate 509(B1) 7 Offset 352
-                              Decorate 509(B1) Block
-                              Decorate 511 DescriptorSet 0
-                              Decorate 512(sf16) SpecId 100
-                              Decorate 514(sf) SpecId 101
-                              Decorate 515(sd) SpecId 102
+                              Name 399  "f"
+                              Name 404  "f64m3"
+                              Name 405  "f64m1"
+                              Name 407  "f64m2"
+                              Name 416  "f64v1"
+                              Name 418  "f64v2"
+                              Name 423  "f64m4"
+                              Name 426  "f64"
+                              Name 429  "f64m5"
+                              Name 434  "f64m6"
+                              Name 435  "f64m7"
+                              Name 438  "bv"
+                              Name 439  "f64v1"
+                              Name 441  "f64v2"
+                              Name 459  "f64v"
+                              Name 461  "if64v"
+                              Name 510  "S"
+                              MemberName 510(S) 0  "x"
+                              MemberName 510(S) 1  "y"
+                              MemberName 510(S) 2  "z"
+                              Name 512  "B1"
+                              MemberName 512(B1) 0  "a"
+                              MemberName 512(B1) 1  "b"
+                              MemberName 512(B1) 2  "c"
+                              MemberName 512(B1) 3  "d"
+                              MemberName 512(B1) 4  "e"
+                              MemberName 512(B1) 5  "f"
+                              MemberName 512(B1) 6  "g"
+                              MemberName 512(B1) 7  "h"
+                              Name 514  ""
+                              Name 515  "sf16"
+                              Name 516  "sf"
+                              Name 517  "sd"
+                              Decorate 461(if64v) Flat
+                              Decorate 508 ArrayStride 16
+                              Decorate 509 ArrayStride 64
+                              MemberDecorate 510(S) 0 Offset 0
+                              MemberDecorate 510(S) 1 Offset 16
+                              MemberDecorate 510(S) 2 Offset 32
+                              Decorate 511 ArrayStride 64
+                              MemberDecorate 512(B1) 0 Offset 0
+                              MemberDecorate 512(B1) 1 Offset 16
+                              MemberDecorate 512(B1) 2 Offset 32
+                              MemberDecorate 512(B1) 3 Offset 64
+                              MemberDecorate 512(B1) 4 ColMajor
+                              MemberDecorate 512(B1) 4 Offset 96
+                              MemberDecorate 512(B1) 4 MatrixStride 32
+                              MemberDecorate 512(B1) 5 ColMajor
+                              MemberDecorate 512(B1) 5 Offset 160
+                              MemberDecorate 512(B1) 5 MatrixStride 32
+                              MemberDecorate 512(B1) 6 Offset 288
+                              MemberDecorate 512(B1) 7 Offset 352
+                              Decorate 512(B1) Block
+                              Decorate 514 DescriptorSet 0
+                              Decorate 515(sf16) SpecId 100
+                              Decorate 516(sf) SpecId 101
+                              Decorate 517(sd) SpecId 102
                2:             TypeVoid
                3:             TypeFunction 2
               26:             TypeFloat 64
@@ -174,37 +175,38 @@ spv.float64.frag
              214:             TypeVector 26(float) 4
              215:             TypePointer Function 214(fvec4)
     364(ResType):             TypeStruct 149(fvec3) 183(ivec3)
-             399:             TypeMatrix 149(fvec3) 2
-             400:             TypePointer Function 399
-             418:             TypeMatrix 27(fvec2) 3
-             419:             TypePointer Function 418
-             424:             TypeMatrix 149(fvec3) 3
-             425:             TypePointer Function 424
-             429:             TypeMatrix 214(fvec4) 4
-             430:             TypePointer Function 429
-             457:             TypePointer Input 149(fvec3)
-      458(if64v):    457(ptr) Variable Input
-             459:             TypePointer Input 26(float)
-             496:    182(int) Constant 1
-             501:   26(float) Constant 0 1071644672
-             502:   27(fvec2) ConstantComposite 501 501
-             504:     31(int) Constant 2
-             505:             TypeArray 26(float) 504
-             506:             TypeArray 399 504
-          507(S):             TypeStruct 26(float) 27(fvec2) 149(fvec3)
-             508:             TypeArray 507(S) 504
-         509(B1):             TypeStruct 26(float) 27(fvec2) 149(fvec3) 505 399 506 507(S) 508
-             510:             TypePointer Uniform 509(B1)
-             511:    510(ptr) Variable Uniform
-       512(sf16):  162(float) SpecConstant 12288
-             513:             TypeFloat 32
-         514(sf):  513(float) SpecConstant 1048576000
-         515(sd):   26(float) SpecConstant 0 1071644672
-             516:  513(float) SpecConstantOp 115 512(sf16)
-             517:  513(float) SpecConstantOp 115 512(sf16)
-             518:   26(float) SpecConstantOp 115 517
-             519:  162(float) SpecConstantOp 115 514(sf)
-             520:  162(float) SpecConstantOp 115 515(sd)
+             397:             TypeFloat 32
+             398:             TypePointer Function 397(float)
+             402:             TypeMatrix 149(fvec3) 2
+             403:             TypePointer Function 402
+             421:             TypeMatrix 27(fvec2) 3
+             422:             TypePointer Function 421
+             427:             TypeMatrix 149(fvec3) 3
+             428:             TypePointer Function 427
+             432:             TypeMatrix 214(fvec4) 4
+             433:             TypePointer Function 432
+             460:             TypePointer Input 149(fvec3)
+      461(if64v):    460(ptr) Variable Input
+             462:             TypePointer Input 26(float)
+             499:    182(int) Constant 1
+             504:   26(float) Constant 0 1071644672
+             505:   27(fvec2) ConstantComposite 504 504
+             507:     31(int) Constant 2
+             508:             TypeArray 26(float) 507
+             509:             TypeArray 402 507
+          510(S):             TypeStruct 26(float) 27(fvec2) 149(fvec3)
+             511:             TypeArray 510(S) 507
+         512(B1):             TypeStruct 26(float) 27(fvec2) 149(fvec3) 508 402 509 510(S) 511
+             513:             TypePointer Uniform 512(B1)
+             514:    513(ptr) Variable Uniform
+       515(sf16):  162(float) SpecConstant 12288
+         516(sf):  397(float) SpecConstant 1048576000
+         517(sd):   26(float) SpecConstant 0 1071644672
+             518:  397(float) SpecConstantOp 115 515(sf16)
+             519:  397(float) SpecConstantOp 115 515(sf16)
+             520:   26(float) SpecConstantOp 115 519
+             521:  162(float) SpecConstantOp 115 516(sf)
+             522:  162(float) SpecConstantOp 115 517(sd)
          4(main):           2 Function None 3
                5:             Label
                               Return
@@ -626,6 +628,7 @@ spv.float64.frag
       372(f64v1):    150(ptr) Variable Function
       376(f64v2):    150(ptr) Variable Function
       382(f64v3):    150(ptr) Variable Function
+          399(f):    398(ptr) Variable Function
              373:  149(fvec3) Load 372(f64v1)
              374:   26(float) ExtInst 1(GLSL.std.450) 66(Length) 373
                               Store 371(f64) 374
@@ -655,134 +658,134 @@ spv.float64.frag
                               Store 382(f64v3) 394
              395:  149(fvec3) Load 372(f64v1)
              396:  149(fvec3) Load 376(f64v2)
-             397:   26(float) Load 371(f64)
-             398:  149(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 395 396 397
-                              Store 382(f64v3) 398
+             400:  397(float) Load 399(f)
+             401:  149(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 395 396 400
+                              Store 382(f64v3) 401
                               Return
                               FunctionEnd
 20(builtinMatrixFuncs():           2 Function None 3
               21:             Label
-      401(f64m3):    400(ptr) Variable Function
-      402(f64m1):    400(ptr) Variable Function
-      404(f64m2):    400(ptr) Variable Function
-      413(f64v1):    150(ptr) Variable Function
-      415(f64v2):     28(ptr) Variable Function
-      420(f64m4):    419(ptr) Variable Function
-        423(f64):     33(ptr) Variable Function
-      426(f64m5):    425(ptr) Variable Function
-      431(f64m6):    430(ptr) Variable Function
-      432(f64m7):    430(ptr) Variable Function
-             403:         399 Load 402(f64m1)
-             405:         399 Load 404(f64m2)
-             406:  149(fvec3) CompositeExtract 403 0
-             407:  149(fvec3) CompositeExtract 405 0
-             408:  149(fvec3) FMul 406 407
-             409:  149(fvec3) CompositeExtract 403 1
-             410:  149(fvec3) CompositeExtract 405 1
+      404(f64m3):    403(ptr) Variable Function
+      405(f64m1):    403(ptr) Variable Function
+      407(f64m2):    403(ptr) Variable Function
+      416(f64v1):    150(ptr) Variable Function
+      418(f64v2):     28(ptr) Variable Function
+      423(f64m4):    422(ptr) Variable Function
+        426(f64):     33(ptr) Variable Function
+      429(f64m5):    428(ptr) Variable Function
+      434(f64m6):    433(ptr) Variable Function
+      435(f64m7):    433(ptr) Variable Function
+             406:         402 Load 405(f64m1)
+             408:         402 Load 407(f64m2)
+             409:  149(fvec3) CompositeExtract 406 0
+             410:  149(fvec3) CompositeExtract 408 0
              411:  149(fvec3) FMul 409 410
-             412:         399 CompositeConstruct 408 411
-                              Store 401(f64m3) 412
-             414:  149(fvec3) Load 413(f64v1)
-             416:   27(fvec2) Load 415(f64v2)
-             417:         399 OuterProduct 414 416
-                              Store 402(f64m1) 417
-             421:         399 Load 402(f64m1)
-             422:         418 Transpose 421
-                              Store 420(f64m4) 422
-             427:         424 Load 426(f64m5)
-             428:   26(float) ExtInst 1(GLSL.std.450) 33(Determinant) 427
-                              Store 423(f64) 428
-             433:         429 Load 432(f64m7)
-             434:         429 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 433
-                              Store 431(f64m6) 434
+             412:  149(fvec3) CompositeExtract 406 1
+             413:  149(fvec3) CompositeExtract 408 1
+             414:  149(fvec3) FMul 412 413
+             415:         402 CompositeConstruct 411 414
+                              Store 404(f64m3) 415
+             417:  149(fvec3) Load 416(f64v1)
+             419:   27(fvec2) Load 418(f64v2)
+             420:         402 OuterProduct 417 419
+                              Store 405(f64m1) 420
+             424:         402 Load 405(f64m1)
+             425:         421 Transpose 424
+                              Store 423(f64m4) 425
+             430:         427 Load 429(f64m5)
+             431:   26(float) ExtInst 1(GLSL.std.450) 33(Determinant) 430
+                              Store 426(f64) 431
+             436:         432 Load 435(f64m7)
+             437:         432 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 436
+                              Store 434(f64m6) 437
                               Return
                               FunctionEnd
 22(builtinVecRelFuncs():           2 Function None 3
               23:             Label
-         435(bv):    153(ptr) Variable Function
-      436(f64v1):    150(ptr) Variable Function
-      438(f64v2):    150(ptr) Variable Function
-             437:  149(fvec3) Load 436(f64v1)
-             439:  149(fvec3) Load 438(f64v2)
-             440:  152(bvec3) FOrdLessThan 437 439
-                              Store 435(bv) 440
-             441:  149(fvec3) Load 436(f64v1)
-             442:  149(fvec3) Load 438(f64v2)
-             443:  152(bvec3) FOrdLessThanEqual 441 442
-                              Store 435(bv) 443
-             444:  149(fvec3) Load 436(f64v1)
-             445:  149(fvec3) Load 438(f64v2)
-             446:  152(bvec3) FOrdGreaterThan 444 445
-                              Store 435(bv) 446
-             447:  149(fvec3) Load 436(f64v1)
-             448:  149(fvec3) Load 438(f64v2)
-             449:  152(bvec3) FOrdGreaterThanEqual 447 448
-                              Store 435(bv) 449
-             450:  149(fvec3) Load 436(f64v1)
-             451:  149(fvec3) Load 438(f64v2)
-             452:  152(bvec3) FOrdEqual 450 451
-                              Store 435(bv) 452
-             453:  149(fvec3) Load 436(f64v1)
-             454:  149(fvec3) Load 438(f64v2)
-             455:  152(bvec3) FOrdNotEqual 453 454
-                              Store 435(bv) 455
+         438(bv):    153(ptr) Variable Function
+      439(f64v1):    150(ptr) Variable Function
+      441(f64v2):    150(ptr) Variable Function
+             440:  149(fvec3) Load 439(f64v1)
+             442:  149(fvec3) Load 441(f64v2)
+             443:  152(bvec3) FOrdLessThan 440 442
+                              Store 438(bv) 443
+             444:  149(fvec3) Load 439(f64v1)
+             445:  149(fvec3) Load 441(f64v2)
+             446:  152(bvec3) FOrdLessThanEqual 444 445
+                              Store 438(bv) 446
+             447:  149(fvec3) Load 439(f64v1)
+             448:  149(fvec3) Load 441(f64v2)
+             449:  152(bvec3) FOrdGreaterThan 447 448
+                              Store 438(bv) 449
+             450:  149(fvec3) Load 439(f64v1)
+             451:  149(fvec3) Load 441(f64v2)
+             452:  152(bvec3) FOrdGreaterThanEqual 450 451
+                              Store 438(bv) 452
+             453:  149(fvec3) Load 439(f64v1)
+             454:  149(fvec3) Load 441(f64v2)
+             455:  152(bvec3) FOrdEqual 453 454
+                              Store 438(bv) 455
+             456:  149(fvec3) Load 439(f64v1)
+             457:  149(fvec3) Load 441(f64v2)
+             458:  152(bvec3) FOrdNotEqual 456 457
+                              Store 438(bv) 458
                               Return
                               FunctionEnd
 24(builtinFragProcFuncs():           2 Function None 3
               25:             Label
-       456(f64v):    150(ptr) Variable Function
-             460:    459(ptr) AccessChain 458(if64v) 32
-             461:   26(float) Load 460
-             462:   26(float) DPdx 461
-             463:     33(ptr) AccessChain 456(f64v) 32
-                              Store 463 462
-             464:    459(ptr) AccessChain 458(if64v) 88
-             465:   26(float) Load 464
-             466:   26(float) DPdy 465
-             467:     33(ptr) AccessChain 456(f64v) 88
-                              Store 467 466
-             468:  149(fvec3) Load 458(if64v)
-             469:   27(fvec2) VectorShuffle 468 468 0 1
-             470:   27(fvec2) DPdxFine 469
-             471:  149(fvec3) Load 456(f64v)
-             472:  149(fvec3) VectorShuffle 471 470 3 4 2
-                              Store 456(f64v) 472
-             473:  149(fvec3) Load 458(if64v)
-             474:   27(fvec2) VectorShuffle 473 473 0 1
-             475:   27(fvec2) DPdyFine 474
-             476:  149(fvec3) Load 456(f64v)
-             477:  149(fvec3) VectorShuffle 476 475 3 4 2
-                              Store 456(f64v) 477
-             478:  149(fvec3) Load 458(if64v)
-             479:  149(fvec3) DPdxCoarse 478
-                              Store 456(f64v) 479
-             480:  149(fvec3) Load 458(if64v)
-             481:  149(fvec3) DPdxCoarse 480
-                              Store 456(f64v) 481
-             482:    459(ptr) AccessChain 458(if64v) 32
-             483:   26(float) Load 482
-             484:   26(float) Fwidth 483
-             485:     33(ptr) AccessChain 456(f64v) 32
-                              Store 485 484
-             486:  149(fvec3) Load 458(if64v)
-             487:   27(fvec2) VectorShuffle 486 486 0 1
-             488:   27(fvec2) FwidthFine 487
-             489:  149(fvec3) Load 456(f64v)
-             490:  149(fvec3) VectorShuffle 489 488 3 4 2
-                              Store 456(f64v) 490
-             491:  149(fvec3) Load 458(if64v)
-             492:  149(fvec3) FwidthCoarse 491
-                              Store 456(f64v) 492
-             493:    459(ptr) AccessChain 458(if64v) 32
-             494:   26(float) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 493
-             495:     33(ptr) AccessChain 456(f64v) 32
-                              Store 495 494
-             497:  149(fvec3) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 458(if64v) 496
-             498:   27(fvec2) VectorShuffle 497 497 0 1
-             499:  149(fvec3) Load 456(f64v)
-             500:  149(fvec3) VectorShuffle 499 498 3 4 2
-                              Store 456(f64v) 500
-             503:  149(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 458(if64v) 502
-                              Store 456(f64v) 503
+       459(f64v):    150(ptr) Variable Function
+             463:    462(ptr) AccessChain 461(if64v) 32
+             464:   26(float) Load 463
+             465:   26(float) DPdx 464
+             466:     33(ptr) AccessChain 459(f64v) 32
+                              Store 466 465
+             467:    462(ptr) AccessChain 461(if64v) 88
+             468:   26(float) Load 467
+             469:   26(float) DPdy 468
+             470:     33(ptr) AccessChain 459(f64v) 88
+                              Store 470 469
+             471:  149(fvec3) Load 461(if64v)
+             472:   27(fvec2) VectorShuffle 471 471 0 1
+             473:   27(fvec2) DPdxFine 472
+             474:  149(fvec3) Load 459(f64v)
+             475:  149(fvec3) VectorShuffle 474 473 3 4 2
+                              Store 459(f64v) 475
+             476:  149(fvec3) Load 461(if64v)
+             477:   27(fvec2) VectorShuffle 476 476 0 1
+             478:   27(fvec2) DPdyFine 477
+             479:  149(fvec3) Load 459(f64v)
+             480:  149(fvec3) VectorShuffle 479 478 3 4 2
+                              Store 459(f64v) 480
+             481:  149(fvec3) Load 461(if64v)
+             482:  149(fvec3) DPdxCoarse 481
+                              Store 459(f64v) 482
+             483:  149(fvec3) Load 461(if64v)
+             484:  149(fvec3) DPdxCoarse 483
+                              Store 459(f64v) 484
+             485:    462(ptr) AccessChain 461(if64v) 32
+             486:   26(float) Load 485
+             487:   26(float) Fwidth 486
+             488:     33(ptr) AccessChain 459(f64v) 32
+                              Store 488 487
+             489:  149(fvec3) Load 461(if64v)
+             490:   27(fvec2) VectorShuffle 489 489 0 1
+             491:   27(fvec2) FwidthFine 490
+             492:  149(fvec3) Load 459(f64v)
+             493:  149(fvec3) VectorShuffle 492 491 3 4 2
+                              Store 459(f64v) 493
+             494:  149(fvec3) Load 461(if64v)
+             495:  149(fvec3) FwidthCoarse 494
+                              Store 459(f64v) 495
+             496:    462(ptr) AccessChain 461(if64v) 32
+             497:   26(float) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 496
+             498:     33(ptr) AccessChain 459(f64v) 32
+                              Store 498 497
+             500:  149(fvec3) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 461(if64v) 499
+             501:   27(fvec2) VectorShuffle 500 500 0 1
+             502:  149(fvec3) Load 459(f64v)
+             503:  149(fvec3) VectorShuffle 502 501 3 4 2
+                              Store 459(f64v) 503
+             506:  149(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 461(if64v) 505
+                              Store 459(f64v) 506
                               Return
                               FunctionEnd

+ 0 - 1
3rdparty/glslang/Test/baseResults/spv.shaderBallotAMD.comp.out

@@ -10,7 +10,6 @@ spv.shaderBallotAMD.comp
                               Capability Groups
                               Capability Int16
                               Capability StorageUniformBufferBlock16
-                              Capability StorageUniform16
                               Extension  "SPV_AMD_gpu_shader_half_float"
                               Extension  "SPV_AMD_gpu_shader_int16"
                               Extension  "SPV_AMD_shader_ballot"

+ 20 - 0
3rdparty/glslang/Test/hlsl.coverage.frag

@@ -0,0 +1,20 @@
+
+// Verify that coverage mask is an array, as required by SPIR-V.
+
+struct PS_INPUT
+{
+};
+
+struct PS_OUTPUT
+{
+    float4 vColor : SV_Target0;
+    uint nCoverageMask : SV_Coverage;
+};
+
+PS_OUTPUT main( PS_INPUT i )
+{
+    PS_OUTPUT o;
+    o.vColor = float4(1.0, 0.0, 0.0, 1.0);
+    o.nCoverageMask = 0;
+    return o;
+}

+ 9 - 0
3rdparty/glslang/Test/hlsl.groupid.comp

@@ -0,0 +1,9 @@
+RWTexture2D < float4 > OutputTexture;
+
+// Test conversion between SPIR-V required uint3 group id, and sub-vec3 shader declaration.
+
+[ numthreads ( 8 , 8 , 1 ) ] 
+void main ( uint2 vGroupId : SV_GroupID ) 
+{ 
+    OutputTexture[ vGroupId . xy ] = float4(1.0, 0.0, 0.0, 1.0); 
+}

+ 18 - 0
3rdparty/glslang/Test/hlsl.tristream-append.geom

@@ -0,0 +1,18 @@
+struct GSPS_INPUT
+{
+};
+
+// Test Append() method appearing before declaration of entry point's stream output.
+
+void EmitVertex(in GSPS_INPUT output, inout TriangleStream<GSPS_INPUT> TriStream)
+{
+    TriStream.Append( output );
+}
+
+[maxvertexcount(3)]
+void main( triangle GSPS_INPUT input[3], inout TriangleStream<GSPS_INPUT> TriStream )
+{
+    EmitVertex(input[0], TriStream);
+    EmitVertex(input[1], TriStream);
+    EmitVertex(input[2], TriStream);
+}

+ 4 - 4
3rdparty/glslang/Test/spv.400.frag

@@ -192,10 +192,10 @@ void doubles()
     dvec3v  += reflect(dvec3v, dvec3v);
     dvec4v  += reflect(dvec4v, dvec4v);
 
-    doublev += refract(doublev, doublev, doublev);
-    dvec2v  += refract(dvec2v, dvec2v, doublev);
-    dvec3v  += refract(dvec3v, dvec3v, doublev);
-    dvec4v  += refract(dvec4v, dvec4v, doublev);
+    doublev += refract(doublev, doublev, 1.3);
+    dvec2v  += refract(dvec2v,  dvec2v,  1.3);
+    dvec3v  += refract(dvec3v,  dvec3v,  1.3);
+    dvec4v  += refract(dvec4v,  dvec4v,  1.3);
 
     dmat2   dmat2v   = outerProduct(dvec2v, dvec2v);
     dmat3   dmat3v   = outerProduct(dvec3v, dvec3v);

+ 2 - 2
3rdparty/glslang/Test/spv.float64.frag

@@ -204,7 +204,7 @@ void builtinGeometryFuncs()
 {
     float64_t f64;
     f64vec3   f64v1, f64v2, f64v3;
-
+    float f;
     f64   = length(f64v1);
     f64   = distance(f64v1, f64v2);
     f64   = dot(f64v1, f64v2);
@@ -212,7 +212,7 @@ void builtinGeometryFuncs()
     f64v2 = normalize(f64v1);
     f64v3 = faceforward(f64v1, f64v2, f64v3);
     f64v3 = reflect(f64v1, f64v2);
-    f64v3 = refract(f64v1, f64v2, f64);
+    f64v3 = refract(f64v1, f64v2, f);
 }
 
 void builtinMatrixFuncs()

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

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

+ 4 - 4
3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp

@@ -603,10 +603,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "dvec3  reflect(dvec3 , dvec3 );"
             "dvec4  reflect(dvec4 , dvec4 );"
 
-            "double refract(double, double, double);"
-            "dvec2  refract(dvec2 , dvec2 , double);"
-            "dvec3  refract(dvec3 , dvec3 , double);"
-            "dvec4  refract(dvec4 , dvec4 , double);"
+            "double refract(double, double, float);"
+            "dvec2  refract(dvec2 , dvec2 , float);"
+            "dvec3  refract(dvec3 , dvec3 , float);"
+            "dvec4  refract(dvec4 , dvec4 , float);"
 
             "dmat2 matrixCompMult(dmat2, dmat2);"
             "dmat3 matrixCompMult(dmat3, dmat3);"

+ 10 - 1
3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp

@@ -478,7 +478,16 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
         // Placeholder. This does not do proper cross-stage lining up, nor
         // work with mixed location/no-location declarations.
         int location = nextLocation;
-        nextLocation += TIntermediate::computeTypeLocationSize(type, stage);
+        int typeLocationSize;
+        // Don’t take into account the outer-most array if the stage’s
+        // interface is automatically an array.
+        if (type.getQualifier().isArrayedIo(stage)) {
+                TType elementType(type, 0);
+                typeLocationSize = TIntermediate::computeTypeLocationSize(elementType, stage);
+        } else {
+                typeLocationSize = TIntermediate::computeTypeLocationSize(type, stage);
+        }
+        nextLocation += typeLocationSize;
 
         return location;
     }

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

@@ -148,6 +148,7 @@ INSTANTIATE_TEST_CASE_P(
         {"hlsl.constructArray.vert", "main"},
         {"hlsl.constructexpr.frag", "main"},
         {"hlsl.constructimat.frag", "main"},
+        {"hlsl.coverage.frag", "main"},
         {"hlsl.depthGreater.frag", "PixelShaderFunction"},
         {"hlsl.depthLess.frag", "PixelShaderFunction"},
         {"hlsl.discard.frag", "PixelShaderFunction"},
@@ -195,6 +196,7 @@ INSTANTIATE_TEST_CASE_P(
         {"hlsl.hull.void.tesc", "main"},
         {"hlsl.hull.ctrlpt-1.tesc", "main"},
         {"hlsl.hull.ctrlpt-2.tesc", "main"},
+        {"hlsl.groupid.comp", "main"},
         {"hlsl.identifier.sample.frag", "main"},
         {"hlsl.if.frag", "PixelShaderFunction"},
         {"hlsl.imagefetch-subvec4.comp", "main"},
@@ -370,6 +372,7 @@ INSTANTIATE_TEST_CASE_P(
         {"hlsl.targetStruct1.frag", "main"},
         {"hlsl.targetStruct2.frag", "main"},
         {"hlsl.templatetypes.frag", "PixelShaderFunction"},
+        {"hlsl.tristream-append.geom", "main"},
         {"hlsl.tx.bracket.frag", "main"},
         {"hlsl.tx.overload.frag", "main"},
         {"hlsl.type.half.frag", "main"},

+ 60 - 19
3rdparty/glslang/hlsl/hlslParseHelper.cpp

@@ -1475,22 +1475,25 @@ bool HlslParseContext::isClipOrCullDistance(TBuiltInVariable builtIn)
 void HlslParseContext::fixBuiltInIoType(TType& type)
 {
     int requiredArraySize = 0;
+    int requiredVectorSize = 0;
 
     switch (type.getQualifier().builtIn) {
     case EbvTessLevelOuter: requiredArraySize = 4; break;
     case EbvTessLevelInner: requiredArraySize = 2; break;
 
-    case EbvTessCoord:
+    case EbvSampleMask:
         {
-            // tesscoord is always a vec3 for the IO variable, no matter the shader's
-            // declared vector size.
-            TType tessCoordType(type.getBasicType(), type.getQualifier().storage, 3);
-
-            tessCoordType.getQualifier() = type.getQualifier();
-            type.shallowCopy(tessCoordType);
-
+            // Promote scalar to array of size 1.  Leave existing arrays alone.
+            if (!type.isArray())
+                requiredArraySize = 1;
             break;
         }
+
+    case EbvWorkGroupId:        requiredVectorSize = 3; break;
+    case EbvGlobalInvocationId: requiredVectorSize = 3; break;
+    case EbvLocalInvocationId:  requiredVectorSize = 3; break;
+    case EbvTessCoord:          requiredVectorSize = 3; break;
+
     default:
         if (isClipOrCullDistance(type)) {
             const int loc = type.getQualifier().layoutLocation;
@@ -1511,6 +1514,14 @@ void HlslParseContext::fixBuiltInIoType(TType& type)
         return;
     }
 
+    // Alter or set vector size as needed.
+    if (requiredVectorSize > 0) {
+        TType newType(type.getBasicType(), type.getQualifier().storage, requiredVectorSize);
+        newType.getQualifier() = type.getQualifier();
+
+        type.shallowCopy(newType);
+    }
+
     // Alter or set array size as needed.
     if (requiredArraySize > 0) {
         if (!type.isArray() || type.getOuterArraySize() != requiredArraySize) {
@@ -2697,6 +2708,15 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
         } else if (assignsClipPos(left)) {
             // Position can require special handling: see comment above assignPosition
             return assignPosition(loc, op, left, right);
+        } else if (left->getQualifier().builtIn == EbvSampleMask) {
+            // Certain builtins are required to be arrayed outputs in SPIR-V, but may internally be scalars
+            // in the shader.  Copy the scalar RHS into the LHS array element zero, if that happens.
+            if (left->isArray() && !right->isArray()) {
+                const TType derefType(left->getType(), 0);
+                left = intermediate.addIndex(EOpIndexDirect, left, intermediate.addConstantUnion(0, loc), loc);
+                left->setType(derefType);
+                // Fall through to add assign.
+            }
         }
 
         return intermediate.addAssign(op, left, right, loc);
@@ -4487,23 +4507,18 @@ void HlslParseContext::decomposeGeometryMethods(const TSourceLoc& loc, TIntermTy
             emit->setLoc(loc);
             emit->setType(TType(EbtVoid));
 
-            // find the matching output
-            if (gsStreamOutput == nullptr) {
-                error(loc, "unable to find output symbol for Append()", "", "");
-                return;
-            }
-
-            sequence = intermediate.growAggregate(sequence,
-                                                  handleAssign(loc, EOpAssign,
-                                                               intermediate.addSymbol(*gsStreamOutput, loc),
-                                                               argAggregate->getSequence()[1]->getAsTyped()),
-                                                  loc);
+            TIntermTyped* data = argAggregate->getSequence()[1]->getAsTyped();
 
+            // This will be patched in finalization during finalizeAppendMethods()
+            sequence = intermediate.growAggregate(sequence, data, loc);
             sequence = intermediate.growAggregate(sequence, emit);
 
             sequence->setOperator(EOpSequence);
             sequence->setLoc(loc);
             sequence->setType(TType(EbtVoid));
+
+            gsAppends.push_back({sequence, loc});
+
             node = sequence;
         }
         break;
@@ -9919,6 +9934,31 @@ void HlslParseContext::fixTextureShadowModes()
     }
 }
 
+// Finalization step: patch append methods to use proper stream output, which isn't known until
+// main is parsed, which could happen after the append method is parsed.
+void HlslParseContext::finalizeAppendMethods()
+{
+    TSourceLoc loc;
+    loc.init();
+
+    // Nothing to do: bypass test for valid stream output.
+    if (gsAppends.empty())
+        return;
+
+    if (gsStreamOutput == nullptr) {
+        error(loc, "unable to find output symbol for Append()", "", "");
+        return;
+    }
+
+    // Patch append sequences, now that we know the stream output symbol.
+    for (auto append = gsAppends.begin(); append != gsAppends.end(); ++append) {
+        append->node->getSequence()[0] = 
+            handleAssign(append->loc, EOpAssign,
+                         intermediate.addSymbol(*gsStreamOutput, append->loc),
+                         append->node->getSequence()[0]->getAsTyped());
+    }
+}
+
 // post-processing
 void HlslParseContext::finish()
 {
@@ -9931,6 +9971,7 @@ void HlslParseContext::finish()
     removeUnusedStructBufferCounters();
     addPatchConstantInvocation();
     fixTextureShadowModes();
+    finalizeAppendMethods();
 
     // Communicate out (esp. for command line) that we formed AST that will make
     // illegal AST SPIR-V and it needs transforms to legalize it.

+ 12 - 0
3rdparty/glslang/hlsl/hlslParseHelper.h

@@ -266,6 +266,7 @@ protected:
     TVariable* getSplitNonIoVar(int id) const;
     void addPatchConstantInvocation();
     void fixTextureShadowModes();
+    void finalizeAppendMethods();
     TIntermTyped* makeIntegerIndex(TIntermTyped*);
 
     void fixBuiltInIoType(TType&);
@@ -460,6 +461,17 @@ protected:
 
     TVector<tMipsOperatorData> mipsOperatorMipArg;
 
+    // The geometry output stream is not copied out from the entry point as a typical output variable
+    // is.  It's written via EmitVertex (hlsl=Append), which may happen in arbitrary control flow.
+    // For this we need the real output symbol.  Since it may not be known at the time and Append()
+    // method is parsed, the sequence will be patched during finalization.
+    struct tGsAppendData {
+        TIntermAggregate* node;
+        TSourceLoc loc;
+    };
+
+    TVector<tGsAppendData> gsAppends;
+
     // A texture object may be used with shadow and non-shadow samplers, but both may not be
     // alive post-DCE in the same shader.  We do not know at compilation time which are alive: that's
     // only known post-DCE.  If a texture is used both ways, we create two textures, and