SPV: Fix an issue related with using CubeArrayShadow for texture()
authorRex Xu <rex.xu@amd.com>
Wed, 11 Nov 2015 07:35:47 +0000 (15:35 +0800)
committerunknown <rexu@shadrexu.amd.com>
Sun, 22 Nov 2015 13:43:05 +0000 (21:43 +0800)
SPIRV/GlslangToSpv.cpp
Test/baseResults/spv.130.frag.out
Test/baseResults/spv.140.vert.out [deleted file]
Test/baseResults/spv.newTexture.frag.out
Test/spv.newTexture.frag

index c5342ac..3528c82 100755 (executable)
@@ -1901,9 +1901,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
 
     // Check for texture functions other than queries
 
+    bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
+
     // check for bias argument
     bool bias = false;
-    if (! cracked.lod && ! cracked.gather && ! cracked.grad && ! cracked.fetch) {
+    if (! cracked.lod && ! cracked.gather && ! cracked.grad && ! cracked.fetch && ! cubeCompare) {
         int nonBiasArgCount = 2;
         if (cracked.offset)
             ++nonBiasArgCount;
index 2238751..e44bac9 100644 (file)
@@ -268,7 +268,7 @@ Linked fragment stage:
              124:   15(fvec4) Load 78(i)\r
              127:    126(ptr) AccessChain 78(i) 125\r
              128:   14(float) Load 127\r
-             129:   14(float) ImageSampleDrefImplicitLod 123 124 128 Bias 128\r
+             129:   14(float) ImageSampleDrefImplicitLod 123 124 128\r
                               Store 122(f) 129\r
              132:          84 Load 86(Isca)\r
              133:   15(fvec4) Load 78(i)\r
diff --git a/Test/baseResults/spv.140.vert.out b/Test/baseResults/spv.140.vert.out
deleted file mode 100644 (file)
index 4e035e7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-Error: unable to open input file: spv.140.vert\r
-Usage: glslangValidator [option]... [file]...\r
-\r
-Where: each 'file' ends in .<stage>, where <stage> is one of\r
-    .conf to provide an optional config file that replaces the default configuration\r
-          (see -c option below for generating a template)\r
-    .vert for a vertex shader\r
-    .tesc for a tessellation control shader\r
-    .tese for a tessellation evaluation shader\r
-    .geom for a geometry shader\r
-    .frag for a fragment shader\r
-    .comp for a compute shader\r
-\r
-Compilation warnings and errors will be printed to stdout.\r
-\r
-To get other information, use one of the following options:\r
-(Each option must be specified separately, but can go anywhere in the command line.)\r
-  -V  create SPIR-V in file <stage>.spv\r
-  -H  print human readable form of SPIR-V; turns on -V\r
-  -E  print pre-processed glsl. Cannot be used with -V, -H or -l.\r
-  -c  configuration dump; use to create default configuration file (redirect to a .conf file)\r
-  -d  default to desktop (#version 110) when there is no version in the shader (default is ES version 100)\r
-  -i  intermediate tree (glslang AST) is printed out\r
-  -l  link validation of all input files\r
-  -m  memory leak mode\r
-  -q  dump reflection query database\r
-  -r  relaxed semantic error-checking mode\r
-  -s  silent mode\r
-  -t  multi-threaded mode\r
-  -v  print version strings\r
-  -w  suppress warnings (except as required by #extension : warn)\r
index 9642445..c0969db 100755 (executable)
@@ -7,48 +7,49 @@ Linked fragment stage:
 \r
 // Module Version 10000\r
 // Generated by (magic number): 80001\r
-// Id's are bound by 265\r
+// Id's are bound by 277\r
 \r
                               Capability Shader\r
                1:             ExtInstImport  "GLSL.std.450"\r
                               MemoryModel Logical GLSL450\r
-                              EntryPoint Fragment 4  "main" 55 17 38 26 72 79 69 264 234\r
+                              EntryPoint Fragment 4  "main" 29 17 55 26 84 91 81 276 246\r
                               ExecutionMode 4 OriginLowerLeft\r
                               Source GLSL 430\r
                               Name 4  "main"\r
                               Name 9  "v"\r
                               Name 13  "s2D"\r
                               Name 17  "c2D"\r
-                              Name 23  "s3D"\r
+                              Name 23  "sCubeArrayShadow"\r
                               Name 26  "c4D"\r
-                              Name 34  "s2DArray"\r
-                              Name 38  "c3D"\r
-                              Name 47  "s2DShadow"\r
-                              Name 55  "c1D"\r
-                              Name 69  "ic3D"\r
-                              Name 72  "ic1D"\r
-                              Name 79  "ic2D"\r
-                              Name 88  "sr"\r
-                              Name 113  "sCube"\r
-                              Name 124  "s2DArrayShadow"\r
-                              Name 152  "iv"\r
-                              Name 156  "is2D"\r
-                              Name 191  "is3D"\r
-                              Name 203  "isCube"\r
-                              Name 215  "is2DArray"\r
-                              Name 225  "iv2"\r
-                              Name 229  "sCubeShadow"\r
-                              Name 234  "FragData"\r
-                              Name 246  "is2Dms"\r
-                              Name 250  "us2D"\r
-                              Name 254  "us3D"\r
-                              Name 258  "usCube"\r
-                              Name 262  "us2DArray"\r
-                              Name 264  "ic4D"\r
-                              Decorate 69(ic3D) Flat\r
-                              Decorate 72(ic1D) Flat\r
-                              Decorate 79(ic2D) Flat\r
-                              Decorate 264(ic4D) Flat\r
+                              Name 29  "c1D"\r
+                              Name 42  "s3D"\r
+                              Name 51  "s2DArray"\r
+                              Name 55  "c3D"\r
+                              Name 64  "s2DShadow"\r
+                              Name 81  "ic3D"\r
+                              Name 84  "ic1D"\r
+                              Name 91  "ic2D"\r
+                              Name 100  "sr"\r
+                              Name 125  "sCube"\r
+                              Name 136  "s2DArrayShadow"\r
+                              Name 164  "iv"\r
+                              Name 168  "is2D"\r
+                              Name 203  "is3D"\r
+                              Name 215  "isCube"\r
+                              Name 227  "is2DArray"\r
+                              Name 237  "iv2"\r
+                              Name 241  "sCubeShadow"\r
+                              Name 246  "FragData"\r
+                              Name 258  "is2Dms"\r
+                              Name 262  "us2D"\r
+                              Name 266  "us3D"\r
+                              Name 270  "usCube"\r
+                              Name 274  "us2DArray"\r
+                              Name 276  "ic4D"\r
+                              Decorate 81(ic3D) Flat\r
+                              Decorate 84(ic1D) Flat\r
+                              Decorate 91(ic2D) Flat\r
+                              Decorate 276(ic4D) Flat\r
                2:             TypeVoid\r
                3:             TypeFunction 2\r
                6:             TypeFloat 32\r
@@ -61,285 +62,298 @@ Linked fragment stage:
               15:             TypeVector 6(float) 2\r
               16:             TypePointer Input 15(fvec2)\r
          17(c2D):     16(ptr) Variable Input\r
-              20:             TypeImage 6(float) 3D sampled format:Unknown\r
+              20:             TypeImage 6(float) Cube depth array sampled format:Unknown\r
               21:             TypeSampledImage 20\r
               22:             TypePointer UniformConstant 21\r
-         23(s3D):     22(ptr) Variable UniformConstant\r
+23(sCubeArrayShadow):     22(ptr) Variable UniformConstant\r
               25:             TypePointer Input 7(fvec4)\r
          26(c4D):     25(ptr) Variable Input\r
-              31:             TypeImage 6(float) 2D array sampled format:Unknown\r
-              32:             TypeSampledImage 31\r
-              33:             TypePointer UniformConstant 32\r
-    34(s2DArray):     33(ptr) Variable UniformConstant\r
-              36:             TypeVector 6(float) 3\r
-              37:             TypePointer Input 36(fvec3)\r
-         38(c3D):     37(ptr) Variable Input\r
-              40:    6(float) Constant 1067030938\r
-              44:             TypeImage 6(float) 2D depth sampled format:Unknown\r
-              45:             TypeSampledImage 44\r
-              46:             TypePointer UniformConstant 45\r
-   47(s2DShadow):     46(ptr) Variable UniformConstant\r
-              50:             TypeInt 32 1\r
-              51:             TypeVector 50(int) 2\r
-              52:     50(int) Constant 3\r
-              53:   51(ivec2) ConstantComposite 52 52\r
-              54:             TypePointer Input 6(float)\r
-         55(c1D):     54(ptr) Variable Input\r
-              59:             TypeInt 32 0\r
-              60:     59(int) Constant 1\r
-              61:             TypePointer Function 6(float)\r
-              67:             TypeVector 50(int) 3\r
-              68:             TypePointer Input 67(ivec3)\r
-        69(ic3D):     68(ptr) Variable Input\r
-              71:             TypePointer Input 50(int)\r
-        72(ic1D):     71(ptr) Variable Input\r
-              78:             TypePointer Input 51(ivec2)\r
-        79(ic2D):     78(ptr) Variable Input\r
-              81:     50(int) Constant 4\r
-              85:             TypeImage 6(float) Rect sampled format:Unknown\r
-              86:             TypeSampledImage 85\r
-              87:             TypePointer UniformConstant 86\r
-          88(sr):     87(ptr) Variable UniformConstant\r
-              91:   51(ivec2) ConstantComposite 81 81\r
-             110:             TypeImage 6(float) Cube sampled format:Unknown\r
-             111:             TypeSampledImage 110\r
-             112:             TypePointer UniformConstant 111\r
-      113(sCube):    112(ptr) Variable UniformConstant\r
-             121:             TypeImage 6(float) 2D depth array sampled format:Unknown\r
-             122:             TypeSampledImage 121\r
-             123:             TypePointer UniformConstant 122\r
-124(s2DArrayShadow):    123(ptr) Variable UniformConstant\r
-             131:     59(int) Constant 0\r
-             150:             TypeVector 50(int) 4\r
-             151:             TypePointer Function 150(ivec4)\r
-             153:             TypeImage 50(int) 2D sampled format:Unknown\r
-             154:             TypeSampledImage 153\r
-             155:             TypePointer UniformConstant 154\r
-       156(is2D):    155(ptr) Variable UniformConstant\r
-             188:             TypeImage 50(int) 3D sampled format:Unknown\r
-             189:             TypeSampledImage 188\r
-             190:             TypePointer UniformConstant 189\r
-       191(is3D):    190(ptr) Variable UniformConstant\r
-             194:    6(float) Constant 1082549862\r
-             200:             TypeImage 50(int) Cube sampled format:Unknown\r
+              28:             TypePointer Input 6(float)\r
+         29(c1D):     28(ptr) Variable Input\r
+              32:             TypeInt 32 0\r
+              33:     32(int) Constant 1\r
+              34:             TypePointer Function 6(float)\r
+              39:             TypeImage 6(float) 3D sampled format:Unknown\r
+              40:             TypeSampledImage 39\r
+              41:             TypePointer UniformConstant 40\r
+         42(s3D):     41(ptr) Variable UniformConstant\r
+              48:             TypeImage 6(float) 2D array sampled format:Unknown\r
+              49:             TypeSampledImage 48\r
+              50:             TypePointer UniformConstant 49\r
+    51(s2DArray):     50(ptr) Variable UniformConstant\r
+              53:             TypeVector 6(float) 3\r
+              54:             TypePointer Input 53(fvec3)\r
+         55(c3D):     54(ptr) Variable Input\r
+              57:    6(float) Constant 1067030938\r
+              61:             TypeImage 6(float) 2D depth sampled format:Unknown\r
+              62:             TypeSampledImage 61\r
+              63:             TypePointer UniformConstant 62\r
+   64(s2DShadow):     63(ptr) Variable UniformConstant\r
+              67:             TypeInt 32 1\r
+              68:             TypeVector 67(int) 2\r
+              69:     67(int) Constant 3\r
+              70:   68(ivec2) ConstantComposite 69 69\r
+              79:             TypeVector 67(int) 3\r
+              80:             TypePointer Input 79(ivec3)\r
+        81(ic3D):     80(ptr) Variable Input\r
+              83:             TypePointer Input 67(int)\r
+        84(ic1D):     83(ptr) Variable Input\r
+              90:             TypePointer Input 68(ivec2)\r
+        91(ic2D):     90(ptr) Variable Input\r
+              93:     67(int) Constant 4\r
+              97:             TypeImage 6(float) Rect sampled format:Unknown\r
+              98:             TypeSampledImage 97\r
+              99:             TypePointer UniformConstant 98\r
+         100(sr):     99(ptr) Variable UniformConstant\r
+             103:   68(ivec2) ConstantComposite 93 93\r
+             122:             TypeImage 6(float) Cube sampled format:Unknown\r
+             123:             TypeSampledImage 122\r
+             124:             TypePointer UniformConstant 123\r
+      125(sCube):    124(ptr) Variable UniformConstant\r
+             133:             TypeImage 6(float) 2D depth array sampled format:Unknown\r
+             134:             TypeSampledImage 133\r
+             135:             TypePointer UniformConstant 134\r
+136(s2DArrayShadow):    135(ptr) Variable UniformConstant\r
+             143:     32(int) Constant 0\r
+             162:             TypeVector 67(int) 4\r
+             163:             TypePointer Function 162(ivec4)\r
+             165:             TypeImage 67(int) 2D sampled format:Unknown\r
+             166:             TypeSampledImage 165\r
+             167:             TypePointer UniformConstant 166\r
+       168(is2D):    167(ptr) Variable UniformConstant\r
+             200:             TypeImage 67(int) 3D sampled format:Unknown\r
              201:             TypeSampledImage 200\r
              202:             TypePointer UniformConstant 201\r
-     203(isCube):    202(ptr) Variable UniformConstant\r
-             212:             TypeImage 50(int) 2D array sampled format:Unknown\r
+       203(is3D):    202(ptr) Variable UniformConstant\r
+             206:    6(float) Constant 1082549862\r
+             212:             TypeImage 67(int) Cube sampled format:Unknown\r
              213:             TypeSampledImage 212\r
              214:             TypePointer UniformConstant 213\r
-  215(is2DArray):    214(ptr) Variable UniformConstant\r
-             224:             TypePointer Function 51(ivec2)\r
-             226:             TypeImage 6(float) Cube depth sampled format:Unknown\r
-             227:             TypeSampledImage 226\r
-             228:             TypePointer UniformConstant 227\r
-229(sCubeShadow):    228(ptr) Variable UniformConstant\r
-             231:     50(int) Constant 2\r
-             233:             TypePointer Output 7(fvec4)\r
-   234(FragData):    233(ptr) Variable Output\r
-             238:    6(float) Constant 0\r
-             243:             TypeImage 50(int) 2D multi-sampled sampled format:Unknown\r
-             244:             TypeSampledImage 243\r
-             245:             TypePointer UniformConstant 244\r
-     246(is2Dms):    245(ptr) Variable UniformConstant\r
-             247:             TypeImage 59(int) 2D sampled format:Unknown\r
-             248:             TypeSampledImage 247\r
-             249:             TypePointer UniformConstant 248\r
-       250(us2D):    249(ptr) Variable UniformConstant\r
-             251:             TypeImage 59(int) 3D sampled format:Unknown\r
-             252:             TypeSampledImage 251\r
-             253:             TypePointer UniformConstant 252\r
-       254(us3D):    253(ptr) Variable UniformConstant\r
-             255:             TypeImage 59(int) Cube sampled format:Unknown\r
+     215(isCube):    214(ptr) Variable UniformConstant\r
+             224:             TypeImage 67(int) 2D array sampled format:Unknown\r
+             225:             TypeSampledImage 224\r
+             226:             TypePointer UniformConstant 225\r
+  227(is2DArray):    226(ptr) Variable UniformConstant\r
+             236:             TypePointer Function 68(ivec2)\r
+             238:             TypeImage 6(float) Cube depth sampled format:Unknown\r
+             239:             TypeSampledImage 238\r
+             240:             TypePointer UniformConstant 239\r
+241(sCubeShadow):    240(ptr) Variable UniformConstant\r
+             243:     67(int) Constant 2\r
+             245:             TypePointer Output 7(fvec4)\r
+   246(FragData):    245(ptr) Variable Output\r
+             250:    6(float) Constant 0\r
+             255:             TypeImage 67(int) 2D multi-sampled sampled format:Unknown\r
              256:             TypeSampledImage 255\r
              257:             TypePointer UniformConstant 256\r
-     258(usCube):    257(ptr) Variable UniformConstant\r
-             259:             TypeImage 59(int) 2D array sampled format:Unknown\r
+     258(is2Dms):    257(ptr) Variable UniformConstant\r
+             259:             TypeImage 32(int) 2D sampled format:Unknown\r
              260:             TypeSampledImage 259\r
              261:             TypePointer UniformConstant 260\r
-  262(us2DArray):    261(ptr) Variable UniformConstant\r
-             263:             TypePointer Input 150(ivec4)\r
-       264(ic4D):    263(ptr) Variable Input\r
+       262(us2D):    261(ptr) Variable UniformConstant\r
+             263:             TypeImage 32(int) 3D sampled format:Unknown\r
+             264:             TypeSampledImage 263\r
+             265:             TypePointer UniformConstant 264\r
+       266(us3D):    265(ptr) Variable UniformConstant\r
+             267:             TypeImage 32(int) Cube sampled format:Unknown\r
+             268:             TypeSampledImage 267\r
+             269:             TypePointer UniformConstant 268\r
+     270(usCube):    269(ptr) Variable UniformConstant\r
+             271:             TypeImage 32(int) 2D array sampled format:Unknown\r
+             272:             TypeSampledImage 271\r
+             273:             TypePointer UniformConstant 272\r
+  274(us2DArray):    273(ptr) Variable UniformConstant\r
+             275:             TypePointer Input 162(ivec4)\r
+       276(ic4D):    275(ptr) Variable Input\r
          4(main):           2 Function None 3\r
                5:             Label\r
             9(v):      8(ptr) Variable Function\r
-         152(iv):    151(ptr) Variable Function\r
-        225(iv2):    224(ptr) Variable Function\r
+         164(iv):    163(ptr) Variable Function\r
+        237(iv2):    236(ptr) Variable Function\r
               14:          11 Load 13(s2D)\r
               18:   15(fvec2) Load 17(c2D)\r
               19:    7(fvec4) ImageSampleImplicitLod 14 18\r
                               Store 9(v) 19\r
-              24:          21 Load 23(s3D)\r
+              24:          21 Load 23(sCubeArrayShadow)\r
               27:    7(fvec4) Load 26(c4D)\r
-              28:    7(fvec4) ImageSampleProjImplicitLod 24 27\r
-              29:    7(fvec4) Load 9(v)\r
-              30:    7(fvec4) FAdd 29 28\r
-                              Store 9(v) 30\r
-              35:          32 Load 34(s2DArray)\r
-              39:   36(fvec3) Load 38(c3D)\r
-              41:    7(fvec4) ImageSampleExplicitLod 35 39 Lod 40\r
-              42:    7(fvec4) Load 9(v)\r
-              43:    7(fvec4) FAdd 42 41\r
-                              Store 9(v) 43\r
-              48:          45 Load 47(s2DShadow)\r
-              49:   36(fvec3) Load 38(c3D)\r
-              56:    6(float) Load 55(c1D)\r
-              57:    6(float) CompositeExtract 49 2\r
-              58:    6(float) ImageSampleDrefImplicitLod 48 49 57 Bias ConstOffset 56 53\r
-              62:     61(ptr) AccessChain 9(v) 60\r
-              63:    6(float) Load 62\r
-              64:    6(float) FAdd 63 58\r
-              65:     61(ptr) AccessChain 9(v) 60\r
-                              Store 65 64\r
-              66:          21 Load 23(s3D)\r
-              70:   67(ivec3) Load 69(ic3D)\r
-              73:     50(int) Load 72(ic1D)\r
-              74:    7(fvec4) ImageFetch 66 70 Lod 73\r
-              75:    7(fvec4) Load 9(v)\r
-              76:    7(fvec4) FAdd 75 74\r
-                              Store 9(v) 76\r
-              77:          11 Load 13(s2D)\r
-              80:   51(ivec2) Load 79(ic2D)\r
-              82:    7(fvec4) ImageFetch 77 80 Lod ConstOffset 81 53\r
-              83:    7(fvec4) Load 9(v)\r
-              84:    7(fvec4) FAdd 83 82\r
-                              Store 9(v) 84\r
-              89:          86 Load 88(sr)\r
-              90:   51(ivec2) Load 79(ic2D)\r
-              92:    7(fvec4) ImageFetch 89 90 ConstOffset 91\r
-              93:    7(fvec4) Load 9(v)\r
-              94:    7(fvec4) FAdd 93 92\r
-                              Store 9(v) 94\r
-              95:          45 Load 47(s2DShadow)\r
-              96:   36(fvec3) Load 38(c3D)\r
-              97:    6(float) Load 55(c1D)\r
-              98:    6(float) CompositeExtract 96 2\r
-              99:    6(float) ImageSampleDrefExplicitLod 95 96 98 Lod ConstOffset 97 53\r
-             100:     61(ptr) AccessChain 9(v) 60\r
-             101:    6(float) Load 100\r
-             102:    6(float) FAdd 101 99\r
-             103:     61(ptr) AccessChain 9(v) 60\r
-                              Store 103 102\r
-             104:          11 Load 13(s2D)\r
-             105:   36(fvec3) Load 38(c3D)\r
-             106:    6(float) Load 55(c1D)\r
-             107:    7(fvec4) ImageSampleProjExplicitLod 104 105 Lod ConstOffset 106 53\r
-             108:    7(fvec4) Load 9(v)\r
-             109:    7(fvec4) FAdd 108 107\r
-                              Store 9(v) 109\r
-             114:         111 Load 113(sCube)\r
-             115:   36(fvec3) Load 38(c3D)\r
-             116:   36(fvec3) Load 38(c3D)\r
-             117:   36(fvec3) Load 38(c3D)\r
-             118:    7(fvec4) ImageSampleExplicitLod 114 115 Grad 116 117\r
-             119:    7(fvec4) Load 9(v)\r
-             120:    7(fvec4) FAdd 119 118\r
-                              Store 9(v) 120\r
-             125:         122 Load 124(s2DArrayShadow)\r
-             126:    7(fvec4) Load 26(c4D)\r
-             127:   15(fvec2) Load 17(c2D)\r
-             128:   15(fvec2) Load 17(c2D)\r
-             129:    6(float) CompositeExtract 126 3\r
-             130:    6(float) ImageSampleDrefExplicitLod 125 126 129 Grad ConstOffset 127 128 53\r
-             132:     61(ptr) AccessChain 9(v) 131\r
-             133:    6(float) Load 132\r
-             134:    6(float) FAdd 133 130\r
-             135:     61(ptr) AccessChain 9(v) 131\r
-                              Store 135 134\r
-             136:          21 Load 23(s3D)\r
-             137:    7(fvec4) Load 26(c4D)\r
-             138:   36(fvec3) Load 38(c3D)\r
-             139:   36(fvec3) Load 38(c3D)\r
-             140:    7(fvec4) ImageSampleProjExplicitLod 136 137 Grad 138 139\r
-             141:    7(fvec4) Load 9(v)\r
-             142:    7(fvec4) FAdd 141 140\r
-                              Store 9(v) 142\r
-             143:          11 Load 13(s2D)\r
-             144:   36(fvec3) Load 38(c3D)\r
-             145:   15(fvec2) Load 17(c2D)\r
-             146:   15(fvec2) Load 17(c2D)\r
-             147:    7(fvec4) ImageSampleProjExplicitLod 143 144 Grad ConstOffset 145 146 53\r
-             148:    7(fvec4) Load 9(v)\r
-             149:    7(fvec4) FAdd 148 147\r
-                              Store 9(v) 149\r
-             157:         154 Load 156(is2D)\r
+              30:    6(float) Load 29(c1D)\r
+              31:    6(float) ImageSampleDrefImplicitLod 24 27 30\r
+              35:     34(ptr) AccessChain 9(v) 33\r
+              36:    6(float) Load 35\r
+              37:    6(float) FAdd 36 31\r
+              38:     34(ptr) AccessChain 9(v) 33\r
+                              Store 38 37\r
+              43:          40 Load 42(s3D)\r
+              44:    7(fvec4) Load 26(c4D)\r
+              45:    7(fvec4) ImageSampleProjImplicitLod 43 44\r
+              46:    7(fvec4) Load 9(v)\r
+              47:    7(fvec4) FAdd 46 45\r
+                              Store 9(v) 47\r
+              52:          49 Load 51(s2DArray)\r
+              56:   53(fvec3) Load 55(c3D)\r
+              58:    7(fvec4) ImageSampleExplicitLod 52 56 Lod 57\r
+              59:    7(fvec4) Load 9(v)\r
+              60:    7(fvec4) FAdd 59 58\r
+                              Store 9(v) 60\r
+              65:          62 Load 64(s2DShadow)\r
+              66:   53(fvec3) Load 55(c3D)\r
+              71:    6(float) Load 29(c1D)\r
+              72:    6(float) CompositeExtract 66 2\r
+              73:    6(float) ImageSampleDrefImplicitLod 65 66 72 Bias ConstOffset 71 70\r
+              74:     34(ptr) AccessChain 9(v) 33\r
+              75:    6(float) Load 74\r
+              76:    6(float) FAdd 75 73\r
+              77:     34(ptr) AccessChain 9(v) 33\r
+                              Store 77 76\r
+              78:          40 Load 42(s3D)\r
+              82:   79(ivec3) Load 81(ic3D)\r
+              85:     67(int) Load 84(ic1D)\r
+              86:    7(fvec4) ImageFetch 78 82 Lod 85\r
+              87:    7(fvec4) Load 9(v)\r
+              88:    7(fvec4) FAdd 87 86\r
+                              Store 9(v) 88\r
+              89:          11 Load 13(s2D)\r
+              92:   68(ivec2) Load 91(ic2D)\r
+              94:    7(fvec4) ImageFetch 89 92 Lod ConstOffset 93 70\r
+              95:    7(fvec4) Load 9(v)\r
+              96:    7(fvec4) FAdd 95 94\r
+                              Store 9(v) 96\r
+             101:          98 Load 100(sr)\r
+             102:   68(ivec2) Load 91(ic2D)\r
+             104:    7(fvec4) ImageFetch 101 102 ConstOffset 103\r
+             105:    7(fvec4) Load 9(v)\r
+             106:    7(fvec4) FAdd 105 104\r
+                              Store 9(v) 106\r
+             107:          62 Load 64(s2DShadow)\r
+             108:   53(fvec3) Load 55(c3D)\r
+             109:    6(float) Load 29(c1D)\r
+             110:    6(float) CompositeExtract 108 2\r
+             111:    6(float) ImageSampleDrefExplicitLod 107 108 110 Lod ConstOffset 109 70\r
+             112:     34(ptr) AccessChain 9(v) 33\r
+             113:    6(float) Load 112\r
+             114:    6(float) FAdd 113 111\r
+             115:     34(ptr) AccessChain 9(v) 33\r
+                              Store 115 114\r
+             116:          11 Load 13(s2D)\r
+             117:   53(fvec3) Load 55(c3D)\r
+             118:    6(float) Load 29(c1D)\r
+             119:    7(fvec4) ImageSampleProjExplicitLod 116 117 Lod ConstOffset 118 70\r
+             120:    7(fvec4) Load 9(v)\r
+             121:    7(fvec4) FAdd 120 119\r
+                              Store 9(v) 121\r
+             126:         123 Load 125(sCube)\r
+             127:   53(fvec3) Load 55(c3D)\r
+             128:   53(fvec3) Load 55(c3D)\r
+             129:   53(fvec3) Load 55(c3D)\r
+             130:    7(fvec4) ImageSampleExplicitLod 126 127 Grad 128 129\r
+             131:    7(fvec4) Load 9(v)\r
+             132:    7(fvec4) FAdd 131 130\r
+                              Store 9(v) 132\r
+             137:         134 Load 136(s2DArrayShadow)\r
+             138:    7(fvec4) Load 26(c4D)\r
+             139:   15(fvec2) Load 17(c2D)\r
+             140:   15(fvec2) Load 17(c2D)\r
+             141:    6(float) CompositeExtract 138 3\r
+             142:    6(float) ImageSampleDrefExplicitLod 137 138 141 Grad ConstOffset 139 140 70\r
+             144:     34(ptr) AccessChain 9(v) 143\r
+             145:    6(float) Load 144\r
+             146:    6(float) FAdd 145 142\r
+             147:     34(ptr) AccessChain 9(v) 143\r
+                              Store 147 146\r
+             148:          40 Load 42(s3D)\r
+             149:    7(fvec4) Load 26(c4D)\r
+             150:   53(fvec3) Load 55(c3D)\r
+             151:   53(fvec3) Load 55(c3D)\r
+             152:    7(fvec4) ImageSampleProjExplicitLod 148 149 Grad 150 151\r
+             153:    7(fvec4) Load 9(v)\r
+             154:    7(fvec4) FAdd 153 152\r
+                              Store 9(v) 154\r
+             155:          11 Load 13(s2D)\r
+             156:   53(fvec3) Load 55(c3D)\r
+             157:   15(fvec2) Load 17(c2D)\r
              158:   15(fvec2) Load 17(c2D)\r
-             159:  150(ivec4) ImageSampleImplicitLod 157 158\r
-                              Store 152(iv) 159\r
-             160:  150(ivec4) Load 152(iv)\r
-             161:    7(fvec4) ConvertSToF 160\r
-             162:    7(fvec4) Load 9(v)\r
-             163:    7(fvec4) FAdd 162 161\r
-                              Store 9(v) 163\r
-             164:         154 Load 156(is2D)\r
-             165:    7(fvec4) Load 26(c4D)\r
-             166:  150(ivec4) ImageSampleProjImplicitLod 164 165 ConstOffset 53\r
-                              Store 152(iv) 166\r
-             167:  150(ivec4) Load 152(iv)\r
-             168:    7(fvec4) ConvertSToF 167\r
-             169:    7(fvec4) Load 9(v)\r
-             170:    7(fvec4) FAdd 169 168\r
-                              Store 9(v) 170\r
-             171:         154 Load 156(is2D)\r
-             172:   36(fvec3) Load 38(c3D)\r
-             173:    6(float) Load 55(c1D)\r
-             174:  150(ivec4) ImageSampleProjExplicitLod 171 172 Lod 173\r
-                              Store 152(iv) 174\r
-             175:  150(ivec4) Load 152(iv)\r
-             176:    7(fvec4) ConvertSToF 175\r
-             177:    7(fvec4) Load 9(v)\r
-             178:    7(fvec4) FAdd 177 176\r
-                              Store 9(v) 178\r
-             179:         154 Load 156(is2D)\r
-             180:   36(fvec3) Load 38(c3D)\r
-             181:   15(fvec2) Load 17(c2D)\r
-             182:   15(fvec2) Load 17(c2D)\r
-             183:  150(ivec4) ImageSampleProjExplicitLod 179 180 Grad 181 182\r
-                              Store 152(iv) 183\r
-             184:  150(ivec4) Load 152(iv)\r
-             185:    7(fvec4) ConvertSToF 184\r
-             186:    7(fvec4) Load 9(v)\r
-             187:    7(fvec4) FAdd 186 185\r
-                              Store 9(v) 187\r
-             192:         189 Load 191(is3D)\r
-             193:   36(fvec3) Load 38(c3D)\r
-             195:  150(ivec4) ImageSampleImplicitLod 192 193 Bias 194\r
-                              Store 152(iv) 195\r
-             196:  150(ivec4) Load 152(iv)\r
+             159:    7(fvec4) ImageSampleProjExplicitLod 155 156 Grad ConstOffset 157 158 70\r
+             160:    7(fvec4) Load 9(v)\r
+             161:    7(fvec4) FAdd 160 159\r
+                              Store 9(v) 161\r
+             169:         166 Load 168(is2D)\r
+             170:   15(fvec2) Load 17(c2D)\r
+             171:  162(ivec4) ImageSampleImplicitLod 169 170\r
+                              Store 164(iv) 171\r
+             172:  162(ivec4) Load 164(iv)\r
+             173:    7(fvec4) ConvertSToF 172\r
+             174:    7(fvec4) Load 9(v)\r
+             175:    7(fvec4) FAdd 174 173\r
+                              Store 9(v) 175\r
+             176:         166 Load 168(is2D)\r
+             177:    7(fvec4) Load 26(c4D)\r
+             178:  162(ivec4) ImageSampleProjImplicitLod 176 177 ConstOffset 70\r
+                              Store 164(iv) 178\r
+             179:  162(ivec4) Load 164(iv)\r
+             180:    7(fvec4) ConvertSToF 179\r
+             181:    7(fvec4) Load 9(v)\r
+             182:    7(fvec4) FAdd 181 180\r
+                              Store 9(v) 182\r
+             183:         166 Load 168(is2D)\r
+             184:   53(fvec3) Load 55(c3D)\r
+             185:    6(float) Load 29(c1D)\r
+             186:  162(ivec4) ImageSampleProjExplicitLod 183 184 Lod 185\r
+                              Store 164(iv) 186\r
+             187:  162(ivec4) Load 164(iv)\r
+             188:    7(fvec4) ConvertSToF 187\r
+             189:    7(fvec4) Load 9(v)\r
+             190:    7(fvec4) FAdd 189 188\r
+                              Store 9(v) 190\r
+             191:         166 Load 168(is2D)\r
+             192:   53(fvec3) Load 55(c3D)\r
+             193:   15(fvec2) Load 17(c2D)\r
+             194:   15(fvec2) Load 17(c2D)\r
+             195:  162(ivec4) ImageSampleProjExplicitLod 191 192 Grad 193 194\r
+                              Store 164(iv) 195\r
+             196:  162(ivec4) Load 164(iv)\r
              197:    7(fvec4) ConvertSToF 196\r
              198:    7(fvec4) Load 9(v)\r
              199:    7(fvec4) FAdd 198 197\r
                               Store 9(v) 199\r
-             204:         201 Load 203(isCube)\r
-             205:   36(fvec3) Load 38(c3D)\r
-             206:    6(float) Load 55(c1D)\r
-             207:  150(ivec4) ImageSampleExplicitLod 204 205 Lod 206\r
-                              Store 152(iv) 207\r
-             208:  150(ivec4) Load 152(iv)\r
+             204:         201 Load 203(is3D)\r
+             205:   53(fvec3) Load 55(c3D)\r
+             207:  162(ivec4) ImageSampleImplicitLod 204 205 Bias 206\r
+                              Store 164(iv) 207\r
+             208:  162(ivec4) Load 164(iv)\r
              209:    7(fvec4) ConvertSToF 208\r
              210:    7(fvec4) Load 9(v)\r
              211:    7(fvec4) FAdd 210 209\r
                               Store 9(v) 211\r
-             216:         213 Load 215(is2DArray)\r
-             217:   67(ivec3) Load 69(ic3D)\r
-             218:     50(int) Load 72(ic1D)\r
-             219:  150(ivec4) ImageFetch 216 217 Lod 218\r
-                              Store 152(iv) 219\r
-             220:  150(ivec4) Load 152(iv)\r
+             216:         213 Load 215(isCube)\r
+             217:   53(fvec3) Load 55(c3D)\r
+             218:    6(float) Load 29(c1D)\r
+             219:  162(ivec4) ImageSampleExplicitLod 216 217 Lod 218\r
+                              Store 164(iv) 219\r
+             220:  162(ivec4) Load 164(iv)\r
              221:    7(fvec4) ConvertSToF 220\r
              222:    7(fvec4) Load 9(v)\r
              223:    7(fvec4) FAdd 222 221\r
                               Store 9(v) 223\r
-             230:         227 Load 229(sCubeShadow)\r
-             232:   51(ivec2) ImageQuerySizeLod 230 231\r
-                              Store 225(iv2) 232\r
-             235:    7(fvec4) Load 9(v)\r
-             236:   51(ivec2) Load 225(iv2)\r
-             237:   15(fvec2) ConvertSToF 236\r
-             239:    6(float) CompositeExtract 237 0\r
-             240:    6(float) CompositeExtract 237 1\r
-             241:    7(fvec4) CompositeConstruct 239 240 238 238\r
-             242:    7(fvec4) FAdd 235 241\r
-                              Store 234(FragData) 242\r
+             228:         225 Load 227(is2DArray)\r
+             229:   79(ivec3) Load 81(ic3D)\r
+             230:     67(int) Load 84(ic1D)\r
+             231:  162(ivec4) ImageFetch 228 229 Lod 230\r
+                              Store 164(iv) 231\r
+             232:  162(ivec4) Load 164(iv)\r
+             233:    7(fvec4) ConvertSToF 232\r
+             234:    7(fvec4) Load 9(v)\r
+             235:    7(fvec4) FAdd 234 233\r
+                              Store 9(v) 235\r
+             242:         239 Load 241(sCubeShadow)\r
+             244:   68(ivec2) ImageQuerySizeLod 242 243\r
+                              Store 237(iv2) 244\r
+             247:    7(fvec4) Load 9(v)\r
+             248:   68(ivec2) Load 237(iv2)\r
+             249:   15(fvec2) ConvertSToF 248\r
+             251:    6(float) CompositeExtract 249 0\r
+             252:    6(float) CompositeExtract 249 1\r
+             253:    7(fvec4) CompositeConstruct 251 252 250 250\r
+             254:    7(fvec4) FAdd 247 253\r
+                              Store 246(FragData) 254\r
                               Return\r
                               FunctionEnd\r
index d48d07c..6f5f67c 100644 (file)
@@ -5,6 +5,7 @@ uniform sampler2DRect sr;
 uniform sampler3D s3D;\r
 uniform samplerCube sCube;\r
 uniform samplerCubeShadow sCubeShadow;\r
+uniform samplerCubeArrayShadow sCubeArrayShadow;\r
 uniform sampler2DShadow s2DShadow;\r
 uniform sampler2DArray s2DArray;\r
 uniform sampler2DArrayShadow s2DArrayShadow;\r
@@ -35,6 +36,7 @@ out vec4 FragData;
 void main()\r
 {\r
     vec4 v = texture(s2D, c2D);\r
+    v.y += texture(sCubeArrayShadow, c4D, c1D);\r
     v += textureProj(s3D, c4D);\r
     v += textureLod(s2DArray, c3D, 1.2);\r
     v.y += textureOffset(s2DShadow, c3D, ivec2(3), c1D);\r