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