SPV: Fix issue #320: Fetch needs to extract the image.

GLSL takes a traditional sampler, but SPIR-V wants just the
sampled image, not the combined sampler and image.
This commit is contained in:
John Kessenich
2016-06-02 23:45:21 -06:00
parent 98f2b3bfe0
commit a5c33d6ffb
4 changed files with 695 additions and 678 deletions

View File

@@ -2558,6 +2558,13 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
bias = true; bias = true;
} }
// See if the sampler param should really be just the SPV image part
if (cracked.fetch) {
// a fetch needs to have the image extracted first
if (builder.isSampledImage(params.sampler))
params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
}
// set the rest of the arguments // set the rest of the arguments
params.coords = arguments[1]; params.coords = arguments[1];

View File

@@ -7,7 +7,7 @@ Linked fragment stage:
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 278 // Id's are bound by 282
Capability Shader Capability Shader
Capability SampledRect Capability SampledRect
@@ -15,7 +15,7 @@ Linked fragment stage:
Capability ImageQuery Capability ImageQuery
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 17 26 29 55 81 84 91 247 277 EntryPoint Fragment 4 "main" 17 26 29 55 81 84 92 251 281
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source GLSL 430 Source GLSL 430
Name 4 "main" Name 4 "main"
@@ -31,24 +31,24 @@ Linked fragment stage:
Name 64 "s2DShadow" Name 64 "s2DShadow"
Name 81 "ic3D" Name 81 "ic3D"
Name 84 "ic1D" Name 84 "ic1D"
Name 91 "ic2D" Name 92 "ic2D"
Name 100 "sr" Name 102 "sr"
Name 125 "sCube" Name 128 "sCube"
Name 136 "s2DArrayShadow" Name 139 "s2DArrayShadow"
Name 164 "iv" Name 167 "iv"
Name 168 "is2D" Name 171 "is2D"
Name 203 "is3D" Name 206 "is3D"
Name 215 "isCube" Name 218 "isCube"
Name 227 "is2DArray" Name 230 "is2DArray"
Name 237 "iv2" Name 241 "iv2"
Name 241 "sCubeShadow" Name 245 "sCubeShadow"
Name 247 "FragData" Name 251 "FragData"
Name 259 "is2Dms" Name 263 "is2Dms"
Name 263 "us2D" Name 267 "us2D"
Name 267 "us3D" Name 271 "us3D"
Name 271 "usCube" Name 275 "usCube"
Name 275 "us2DArray" Name 279 "us2DArray"
Name 277 "ic4D" Name 281 "ic4D"
Decorate 13(s2D) DescriptorSet 0 Decorate 13(s2D) DescriptorSet 0
Decorate 23(sCubeArrayShadow) DescriptorSet 0 Decorate 23(sCubeArrayShadow) DescriptorSet 0
Decorate 42(s3D) DescriptorSet 0 Decorate 42(s3D) DescriptorSet 0
@@ -56,21 +56,21 @@ Linked fragment stage:
Decorate 64(s2DShadow) DescriptorSet 0 Decorate 64(s2DShadow) DescriptorSet 0
Decorate 81(ic3D) Flat Decorate 81(ic3D) Flat
Decorate 84(ic1D) Flat Decorate 84(ic1D) Flat
Decorate 91(ic2D) Flat Decorate 92(ic2D) Flat
Decorate 100(sr) DescriptorSet 0 Decorate 102(sr) DescriptorSet 0
Decorate 125(sCube) DescriptorSet 0 Decorate 128(sCube) DescriptorSet 0
Decorate 136(s2DArrayShadow) DescriptorSet 0 Decorate 139(s2DArrayShadow) DescriptorSet 0
Decorate 168(is2D) DescriptorSet 0 Decorate 171(is2D) DescriptorSet 0
Decorate 203(is3D) DescriptorSet 0 Decorate 206(is3D) DescriptorSet 0
Decorate 215(isCube) DescriptorSet 0 Decorate 218(isCube) DescriptorSet 0
Decorate 227(is2DArray) DescriptorSet 0 Decorate 230(is2DArray) DescriptorSet 0
Decorate 241(sCubeShadow) DescriptorSet 0 Decorate 245(sCubeShadow) DescriptorSet 0
Decorate 259(is2Dms) DescriptorSet 0 Decorate 263(is2Dms) DescriptorSet 0
Decorate 263(us2D) DescriptorSet 0 Decorate 267(us2D) DescriptorSet 0
Decorate 267(us3D) DescriptorSet 0 Decorate 271(us3D) DescriptorSet 0
Decorate 271(usCube) DescriptorSet 0 Decorate 275(usCube) DescriptorSet 0
Decorate 275(us2DArray) DescriptorSet 0 Decorate 279(us2DArray) DescriptorSet 0
Decorate 277(ic4D) Flat Decorate 281(ic4D) Flat
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@@ -119,78 +119,78 @@ Linked fragment stage:
81(ic3D): 80(ptr) Variable Input 81(ic3D): 80(ptr) Variable Input
83: TypePointer Input 67(int) 83: TypePointer Input 67(int)
84(ic1D): 83(ptr) Variable Input 84(ic1D): 83(ptr) Variable Input
90: TypePointer Input 68(ivec2) 91: TypePointer Input 68(ivec2)
91(ic2D): 90(ptr) Variable Input 92(ic2D): 91(ptr) Variable Input
93: 67(int) Constant 4 94: 67(int) Constant 4
97: TypeImage 6(float) Rect sampled format:Unknown 99: TypeImage 6(float) Rect sampled format:Unknown
98: TypeSampledImage 97 100: TypeSampledImage 99
99: TypePointer UniformConstant 98 101: TypePointer UniformConstant 100
100(sr): 99(ptr) Variable UniformConstant 102(sr): 101(ptr) Variable UniformConstant
103: 68(ivec2) ConstantComposite 93 93 105: 68(ivec2) ConstantComposite 94 94
122: TypeImage 6(float) Cube sampled format:Unknown 125: TypeImage 6(float) Cube sampled format:Unknown
123: TypeSampledImage 122 126: TypeSampledImage 125
124: TypePointer UniformConstant 123 127: TypePointer UniformConstant 126
125(sCube): 124(ptr) Variable UniformConstant 128(sCube): 127(ptr) Variable UniformConstant
133: TypeImage 6(float) 2D depth array sampled format:Unknown 136: TypeImage 6(float) 2D depth array sampled format:Unknown
134: TypeSampledImage 133 137: TypeSampledImage 136
135: TypePointer UniformConstant 134 138: TypePointer UniformConstant 137
136(s2DArrayShadow): 135(ptr) Variable UniformConstant 139(s2DArrayShadow): 138(ptr) Variable UniformConstant
143: 32(int) Constant 0 146: 32(int) Constant 0
162: TypeVector 67(int) 4 165: TypeVector 67(int) 4
163: TypePointer Function 162(ivec4) 166: TypePointer Function 165(ivec4)
165: TypeImage 67(int) 2D sampled format:Unknown 168: TypeImage 67(int) 2D sampled format:Unknown
166: TypeSampledImage 165 169: TypeSampledImage 168
167: TypePointer UniformConstant 166 170: TypePointer UniformConstant 169
168(is2D): 167(ptr) Variable UniformConstant 171(is2D): 170(ptr) Variable UniformConstant
200: TypeImage 67(int) 3D sampled format:Unknown 203: TypeImage 67(int) 3D sampled format:Unknown
201: TypeSampledImage 200 204: TypeSampledImage 203
202: TypePointer UniformConstant 201 205: TypePointer UniformConstant 204
203(is3D): 202(ptr) Variable UniformConstant 206(is3D): 205(ptr) Variable UniformConstant
206: 6(float) Constant 1082549862 209: 6(float) Constant 1082549862
212: TypeImage 67(int) Cube sampled format:Unknown 215: TypeImage 67(int) Cube sampled format:Unknown
213: TypeSampledImage 212 216: TypeSampledImage 215
214: TypePointer UniformConstant 213 217: TypePointer UniformConstant 216
215(isCube): 214(ptr) Variable UniformConstant 218(isCube): 217(ptr) Variable UniformConstant
224: TypeImage 67(int) 2D array sampled format:Unknown 227: TypeImage 67(int) 2D array sampled format:Unknown
225: TypeSampledImage 224 228: TypeSampledImage 227
226: TypePointer UniformConstant 225 229: TypePointer UniformConstant 228
227(is2DArray): 226(ptr) Variable UniformConstant 230(is2DArray): 229(ptr) Variable UniformConstant
236: TypePointer Function 68(ivec2) 240: TypePointer Function 68(ivec2)
238: TypeImage 6(float) Cube depth sampled format:Unknown 242: TypeImage 6(float) Cube depth sampled format:Unknown
239: TypeSampledImage 238 243: TypeSampledImage 242
240: TypePointer UniformConstant 239 244: TypePointer UniformConstant 243
241(sCubeShadow): 240(ptr) Variable UniformConstant 245(sCubeShadow): 244(ptr) Variable UniformConstant
243: 67(int) Constant 2 247: 67(int) Constant 2
246: TypePointer Output 7(fvec4) 250: TypePointer Output 7(fvec4)
247(FragData): 246(ptr) Variable Output 251(FragData): 250(ptr) Variable Output
251: 6(float) Constant 0 255: 6(float) Constant 0
256: TypeImage 67(int) 2D multi-sampled sampled format:Unknown 260: TypeImage 67(int) 2D multi-sampled sampled format:Unknown
257: TypeSampledImage 256
258: TypePointer UniformConstant 257
259(is2Dms): 258(ptr) Variable UniformConstant
260: TypeImage 32(int) 2D sampled format:Unknown
261: TypeSampledImage 260 261: TypeSampledImage 260
262: TypePointer UniformConstant 261 262: TypePointer UniformConstant 261
263(us2D): 262(ptr) Variable UniformConstant 263(is2Dms): 262(ptr) Variable UniformConstant
264: TypeImage 32(int) 3D sampled format:Unknown 264: TypeImage 32(int) 2D sampled format:Unknown
265: TypeSampledImage 264 265: TypeSampledImage 264
266: TypePointer UniformConstant 265 266: TypePointer UniformConstant 265
267(us3D): 266(ptr) Variable UniformConstant 267(us2D): 266(ptr) Variable UniformConstant
268: TypeImage 32(int) Cube sampled format:Unknown 268: TypeImage 32(int) 3D sampled format:Unknown
269: TypeSampledImage 268 269: TypeSampledImage 268
270: TypePointer UniformConstant 269 270: TypePointer UniformConstant 269
271(usCube): 270(ptr) Variable UniformConstant 271(us3D): 270(ptr) Variable UniformConstant
272: TypeImage 32(int) 2D array sampled format:Unknown 272: TypeImage 32(int) Cube sampled format:Unknown
273: TypeSampledImage 272 273: TypeSampledImage 272
274: TypePointer UniformConstant 273 274: TypePointer UniformConstant 273
275(us2DArray): 274(ptr) Variable UniformConstant 275(usCube): 274(ptr) Variable UniformConstant
276: TypePointer Input 162(ivec4) 276: TypeImage 32(int) 2D array sampled format:Unknown
277(ic4D): 276(ptr) Variable Input 277: TypeSampledImage 276
278: TypePointer UniformConstant 277
279(us2DArray): 278(ptr) Variable UniformConstant
280: TypePointer Input 165(ivec4)
281(ic4D): 280(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(v): 8(ptr) Variable Function 9(v): 8(ptr) Variable Function
164(iv): 163(ptr) Variable Function 167(iv): 166(ptr) Variable Function
237(iv2): 236(ptr) Variable Function 241(iv2): 240(ptr) Variable Function
14: 11 Load 13(s2D) 14: 11 Load 13(s2D)
18: 15(fvec2) Load 17(c2D) 18: 15(fvec2) Load 17(c2D)
19: 7(fvec4) ImageSampleImplicitLod 14 18 19: 7(fvec4) ImageSampleImplicitLod 14 18
@@ -229,153 +229,157 @@ Linked fragment stage:
78: 40 Load 42(s3D) 78: 40 Load 42(s3D)
82: 79(ivec3) Load 81(ic3D) 82: 79(ivec3) Load 81(ic3D)
85: 67(int) Load 84(ic1D) 85: 67(int) Load 84(ic1D)
86: 7(fvec4) ImageFetch 78 82 Lod 85 86: 39 Image 78
87: 7(fvec4) Load 9(v) 87: 7(fvec4) ImageFetch 86 82 Lod 85
88: 7(fvec4) FAdd 87 86 88: 7(fvec4) Load 9(v)
Store 9(v) 88 89: 7(fvec4) FAdd 88 87
89: 11 Load 13(s2D) Store 9(v) 89
92: 68(ivec2) Load 91(ic2D) 90: 11 Load 13(s2D)
94: 7(fvec4) ImageFetch 89 92 Lod ConstOffset 93 70 93: 68(ivec2) Load 92(ic2D)
95: 7(fvec4) Load 9(v) 95: 10 Image 90
96: 7(fvec4) FAdd 95 94 96: 7(fvec4) ImageFetch 95 93 Lod ConstOffset 94 70
Store 9(v) 96 97: 7(fvec4) Load 9(v)
101: 98 Load 100(sr) 98: 7(fvec4) FAdd 97 96
102: 68(ivec2) Load 91(ic2D) Store 9(v) 98
104: 7(fvec4) ImageFetch 101 102 ConstOffset 103 103: 100 Load 102(sr)
105: 7(fvec4) Load 9(v) 104: 68(ivec2) Load 92(ic2D)
106: 7(fvec4) FAdd 105 104 106: 99 Image 103
Store 9(v) 106 107: 7(fvec4) ImageFetch 106 104 ConstOffset 105
107: 62 Load 64(s2DShadow) 108: 7(fvec4) Load 9(v)
108: 53(fvec3) Load 55(c3D) 109: 7(fvec4) FAdd 108 107
109: 6(float) Load 29(c1D) Store 9(v) 109
110: 6(float) CompositeExtract 108 2 110: 62 Load 64(s2DShadow)
111: 6(float) ImageSampleDrefExplicitLod 107 108 110 Lod ConstOffset 109 70 111: 53(fvec3) Load 55(c3D)
112: 34(ptr) AccessChain 9(v) 33 112: 6(float) Load 29(c1D)
113: 6(float) Load 112 113: 6(float) CompositeExtract 111 2
114: 6(float) FAdd 113 111 114: 6(float) ImageSampleDrefExplicitLod 110 111 113 Lod ConstOffset 112 70
115: 34(ptr) AccessChain 9(v) 33 115: 34(ptr) AccessChain 9(v) 33
Store 115 114 116: 6(float) Load 115
116: 11 Load 13(s2D) 117: 6(float) FAdd 116 114
117: 53(fvec3) Load 55(c3D) 118: 34(ptr) AccessChain 9(v) 33
118: 6(float) Load 29(c1D) Store 118 117
119: 7(fvec4) ImageSampleProjExplicitLod 116 117 Lod ConstOffset 118 70 119: 11 Load 13(s2D)
120: 7(fvec4) Load 9(v) 120: 53(fvec3) Load 55(c3D)
121: 7(fvec4) FAdd 120 119 121: 6(float) Load 29(c1D)
Store 9(v) 121 122: 7(fvec4) ImageSampleProjExplicitLod 119 120 Lod ConstOffset 121 70
126: 123 Load 125(sCube) 123: 7(fvec4) Load 9(v)
127: 53(fvec3) Load 55(c3D) 124: 7(fvec4) FAdd 123 122
128: 53(fvec3) Load 55(c3D) Store 9(v) 124
129: 53(fvec3) Load 55(c3D) 129: 126 Load 128(sCube)
130: 7(fvec4) ImageSampleExplicitLod 126 127 Grad 128 129 130: 53(fvec3) Load 55(c3D)
131: 7(fvec4) Load 9(v) 131: 53(fvec3) Load 55(c3D)
132: 7(fvec4) FAdd 131 130 132: 53(fvec3) Load 55(c3D)
Store 9(v) 132 133: 7(fvec4) ImageSampleExplicitLod 129 130 Grad 131 132
137: 134 Load 136(s2DArrayShadow) 134: 7(fvec4) Load 9(v)
138: 7(fvec4) Load 26(c4D) 135: 7(fvec4) FAdd 134 133
139: 15(fvec2) Load 17(c2D) Store 9(v) 135
140: 15(fvec2) Load 17(c2D) 140: 137 Load 139(s2DArrayShadow)
141: 6(float) CompositeExtract 138 3 141: 7(fvec4) Load 26(c4D)
142: 6(float) ImageSampleDrefExplicitLod 137 138 141 Grad ConstOffset 139 140 70 142: 15(fvec2) Load 17(c2D)
144: 34(ptr) AccessChain 9(v) 143 143: 15(fvec2) Load 17(c2D)
145: 6(float) Load 144 144: 6(float) CompositeExtract 141 3
146: 6(float) FAdd 145 142 145: 6(float) ImageSampleDrefExplicitLod 140 141 144 Grad ConstOffset 142 143 70
147: 34(ptr) AccessChain 9(v) 143 147: 34(ptr) AccessChain 9(v) 146
Store 147 146 148: 6(float) Load 147
148: 40 Load 42(s3D) 149: 6(float) FAdd 148 145
149: 7(fvec4) Load 26(c4D) 150: 34(ptr) AccessChain 9(v) 146
150: 53(fvec3) Load 55(c3D) Store 150 149
151: 53(fvec3) Load 55(c3D) 151: 40 Load 42(s3D)
152: 7(fvec4) ImageSampleProjExplicitLod 148 149 Grad 150 151 152: 7(fvec4) Load 26(c4D)
153: 7(fvec4) Load 9(v) 153: 53(fvec3) Load 55(c3D)
154: 7(fvec4) FAdd 153 152 154: 53(fvec3) Load 55(c3D)
Store 9(v) 154 155: 7(fvec4) ImageSampleProjExplicitLod 151 152 Grad 153 154
155: 11 Load 13(s2D) 156: 7(fvec4) Load 9(v)
156: 53(fvec3) Load 55(c3D) 157: 7(fvec4) FAdd 156 155
157: 15(fvec2) Load 17(c2D) Store 9(v) 157
158: 15(fvec2) Load 17(c2D) 158: 11 Load 13(s2D)
159: 7(fvec4) ImageSampleProjExplicitLod 155 156 Grad ConstOffset 157 158 70 159: 53(fvec3) Load 55(c3D)
160: 7(fvec4) Load 9(v) 160: 15(fvec2) Load 17(c2D)
161: 7(fvec4) FAdd 160 159 161: 15(fvec2) Load 17(c2D)
Store 9(v) 161 162: 7(fvec4) ImageSampleProjExplicitLod 158 159 Grad ConstOffset 160 161 70
169: 166 Load 168(is2D) 163: 7(fvec4) Load 9(v)
170: 15(fvec2) Load 17(c2D) 164: 7(fvec4) FAdd 163 162
171: 162(ivec4) ImageSampleImplicitLod 169 170 Store 9(v) 164
Store 164(iv) 171 172: 169 Load 171(is2D)
172: 162(ivec4) Load 164(iv) 173: 15(fvec2) Load 17(c2D)
173: 7(fvec4) ConvertSToF 172 174: 165(ivec4) ImageSampleImplicitLod 172 173
174: 7(fvec4) Load 9(v) Store 167(iv) 174
175: 7(fvec4) FAdd 174 173 175: 165(ivec4) Load 167(iv)
Store 9(v) 175 176: 7(fvec4) ConvertSToF 175
176: 166 Load 168(is2D) 177: 7(fvec4) Load 9(v)
177: 7(fvec4) Load 26(c4D) 178: 7(fvec4) FAdd 177 176
178: 162(ivec4) ImageSampleProjImplicitLod 176 177 ConstOffset 70 Store 9(v) 178
Store 164(iv) 178 179: 169 Load 171(is2D)
179: 162(ivec4) Load 164(iv) 180: 7(fvec4) Load 26(c4D)
180: 7(fvec4) ConvertSToF 179 181: 165(ivec4) ImageSampleProjImplicitLod 179 180 ConstOffset 70
181: 7(fvec4) Load 9(v) Store 167(iv) 181
182: 7(fvec4) FAdd 181 180 182: 165(ivec4) Load 167(iv)
Store 9(v) 182 183: 7(fvec4) ConvertSToF 182
183: 166 Load 168(is2D) 184: 7(fvec4) Load 9(v)
184: 53(fvec3) Load 55(c3D) 185: 7(fvec4) FAdd 184 183
185: 6(float) Load 29(c1D) Store 9(v) 185
186: 162(ivec4) ImageSampleProjExplicitLod 183 184 Lod 185 186: 169 Load 171(is2D)
Store 164(iv) 186 187: 53(fvec3) Load 55(c3D)
187: 162(ivec4) Load 164(iv) 188: 6(float) Load 29(c1D)
188: 7(fvec4) ConvertSToF 187 189: 165(ivec4) ImageSampleProjExplicitLod 186 187 Lod 188
189: 7(fvec4) Load 9(v) Store 167(iv) 189
190: 7(fvec4) FAdd 189 188 190: 165(ivec4) Load 167(iv)
Store 9(v) 190 191: 7(fvec4) ConvertSToF 190
191: 166 Load 168(is2D) 192: 7(fvec4) Load 9(v)
192: 53(fvec3) Load 55(c3D) 193: 7(fvec4) FAdd 192 191
193: 15(fvec2) Load 17(c2D) Store 9(v) 193
194: 15(fvec2) Load 17(c2D) 194: 169 Load 171(is2D)
195: 162(ivec4) ImageSampleProjExplicitLod 191 192 Grad 193 194 195: 53(fvec3) Load 55(c3D)
Store 164(iv) 195 196: 15(fvec2) Load 17(c2D)
196: 162(ivec4) Load 164(iv) 197: 15(fvec2) Load 17(c2D)
197: 7(fvec4) ConvertSToF 196 198: 165(ivec4) ImageSampleProjExplicitLod 194 195 Grad 196 197
198: 7(fvec4) Load 9(v) Store 167(iv) 198
199: 7(fvec4) FAdd 198 197 199: 165(ivec4) Load 167(iv)
Store 9(v) 199 200: 7(fvec4) ConvertSToF 199
204: 201 Load 203(is3D) 201: 7(fvec4) Load 9(v)
205: 53(fvec3) Load 55(c3D) 202: 7(fvec4) FAdd 201 200
207: 162(ivec4) ImageSampleImplicitLod 204 205 Bias 206 Store 9(v) 202
Store 164(iv) 207 207: 204 Load 206(is3D)
208: 162(ivec4) Load 164(iv) 208: 53(fvec3) Load 55(c3D)
209: 7(fvec4) ConvertSToF 208 210: 165(ivec4) ImageSampleImplicitLod 207 208 Bias 209
210: 7(fvec4) Load 9(v) Store 167(iv) 210
211: 7(fvec4) FAdd 210 209 211: 165(ivec4) Load 167(iv)
Store 9(v) 211 212: 7(fvec4) ConvertSToF 211
216: 213 Load 215(isCube) 213: 7(fvec4) Load 9(v)
217: 53(fvec3) Load 55(c3D) 214: 7(fvec4) FAdd 213 212
218: 6(float) Load 29(c1D) Store 9(v) 214
219: 162(ivec4) ImageSampleExplicitLod 216 217 Lod 218 219: 216 Load 218(isCube)
Store 164(iv) 219 220: 53(fvec3) Load 55(c3D)
220: 162(ivec4) Load 164(iv) 221: 6(float) Load 29(c1D)
221: 7(fvec4) ConvertSToF 220 222: 165(ivec4) ImageSampleExplicitLod 219 220 Lod 221
222: 7(fvec4) Load 9(v) Store 167(iv) 222
223: 7(fvec4) FAdd 222 221 223: 165(ivec4) Load 167(iv)
Store 9(v) 223 224: 7(fvec4) ConvertSToF 223
228: 225 Load 227(is2DArray) 225: 7(fvec4) Load 9(v)
229: 79(ivec3) Load 81(ic3D) 226: 7(fvec4) FAdd 225 224
230: 67(int) Load 84(ic1D) Store 9(v) 226
231: 162(ivec4) ImageFetch 228 229 Lod 230 231: 228 Load 230(is2DArray)
Store 164(iv) 231 232: 79(ivec3) Load 81(ic3D)
232: 162(ivec4) Load 164(iv) 233: 67(int) Load 84(ic1D)
233: 7(fvec4) ConvertSToF 232 234: 227 Image 231
234: 7(fvec4) Load 9(v) 235: 165(ivec4) ImageFetch 234 232 Lod 233
235: 7(fvec4) FAdd 234 233 Store 167(iv) 235
Store 9(v) 235 236: 165(ivec4) Load 167(iv)
242: 239 Load 241(sCubeShadow) 237: 7(fvec4) ConvertSToF 236
244: 238 Image 242 238: 7(fvec4) Load 9(v)
245: 68(ivec2) ImageQuerySizeLod 244 243 239: 7(fvec4) FAdd 238 237
Store 237(iv2) 245 Store 9(v) 239
248: 7(fvec4) Load 9(v) 246: 243 Load 245(sCubeShadow)
249: 68(ivec2) Load 237(iv2) 248: 242 Image 246
250: 15(fvec2) ConvertSToF 249 249: 68(ivec2) ImageQuerySizeLod 248 247
252: 6(float) CompositeExtract 250 0 Store 241(iv2) 249
253: 6(float) CompositeExtract 250 1 252: 7(fvec4) Load 9(v)
254: 7(fvec4) CompositeConstruct 252 253 251 251 253: 68(ivec2) Load 241(iv2)
255: 7(fvec4) FAdd 248 254 254: 15(fvec2) ConvertSToF 253
Store 247(FragData) 255 256: 6(float) CompositeExtract 254 0
257: 6(float) CompositeExtract 254 1
258: 7(fvec4) CompositeConstruct 256 257 255 255
259: 7(fvec4) FAdd 252 258
Store 251(FragData) 259
Return Return
FunctionEnd FunctionEnd

View File

@@ -7,7 +7,7 @@ Linked fragment stage:
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 433 // Id's are bound by 438
Capability Shader Capability Shader
Capability SampledRect Capability SampledRect
@@ -15,7 +15,7 @@ Linked fragment stage:
Capability SampledCubeArray Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 33 48 89 360 388 400 418 EntryPoint Fragment 4 "main" 33 48 89 365 393 405 423
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source GLSL 450 Source GLSL 450
SourceExtension "GL_ARB_sparse_texture2" SourceExtension "GL_ARB_sparse_texture2"
@@ -39,17 +39,17 @@ Linked fragment stage:
Name 111 "ResType" Name 111 "ResType"
Name 140 "us2DRect" Name 140 "us2DRect"
Name 154 "s2DArrayShadow" Name 154 "s2DArrayShadow"
Name 186 "s2DMS" Name 188 "s2DMS"
Name 223 "is2DArray" Name 228 "is2DArray"
Name 256 "sCubeShadow" Name 261 "sCubeShadow"
Name 289 "s2DRectShadow" Name 294 "s2DRectShadow"
Name 360 "offsets" Name 365 "offsets"
Name 385 "i2D" Name 390 "i2D"
Name 388 "ic2" Name 393 "ic2"
Name 397 "ii3D" Name 402 "ii3D"
Name 400 "ic3" Name 405 "ic3"
Name 409 "i2DMS" Name 414 "i2DMS"
Name 418 "outColor" Name 423 "outColor"
Decorate 29(s2D) DescriptorSet 0 Decorate 29(s2D) DescriptorSet 0
Decorate 44(s3D) DescriptorSet 0 Decorate 44(s3D) DescriptorSet 0
Decorate 59(isCube) DescriptorSet 0 Decorate 59(isCube) DescriptorSet 0
@@ -58,16 +58,16 @@ Linked fragment stage:
Decorate 108(usCubeArray) DescriptorSet 0 Decorate 108(usCubeArray) DescriptorSet 0
Decorate 140(us2DRect) DescriptorSet 0 Decorate 140(us2DRect) DescriptorSet 0
Decorate 154(s2DArrayShadow) DescriptorSet 0 Decorate 154(s2DArrayShadow) DescriptorSet 0
Decorate 186(s2DMS) DescriptorSet 0 Decorate 188(s2DMS) DescriptorSet 0
Decorate 223(is2DArray) DescriptorSet 0 Decorate 228(is2DArray) DescriptorSet 0
Decorate 256(sCubeShadow) DescriptorSet 0 Decorate 261(sCubeShadow) DescriptorSet 0
Decorate 289(s2DRectShadow) DescriptorSet 0 Decorate 294(s2DRectShadow) DescriptorSet 0
Decorate 360(offsets) Flat Decorate 365(offsets) Flat
Decorate 385(i2D) DescriptorSet 0 Decorate 390(i2D) DescriptorSet 0
Decorate 388(ic2) Flat Decorate 393(ic2) Flat
Decorate 397(ii3D) DescriptorSet 0 Decorate 402(ii3D) DescriptorSet 0
Decorate 400(ic3) Flat Decorate 405(ic3) Flat
Decorate 409(i2DMS) DescriptorSet 0 Decorate 414(i2DMS) DescriptorSet 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@@ -143,58 +143,58 @@ Linked fragment stage:
157: 6(int) Constant 5 157: 6(int) Constant 5
158: 143(ivec2) ConstantComposite 157 157 158: 143(ivec2) ConstantComposite 157 157
159: 20(int) Constant 2 159: 20(int) Constant 2
183: TypeImage 10(float) 2D multi-sampled sampled format:Unknown 185: TypeImage 10(float) 2D multi-sampled sampled format:Unknown
184: TypeSampledImage 183 186: TypeSampledImage 185
185: TypePointer UniformConstant 184 187: TypePointer UniformConstant 186
186(s2DMS): 185(ptr) Variable UniformConstant 188(s2DMS): 187(ptr) Variable UniformConstant
190: 6(int) Constant 4 192: 6(int) Constant 4
199: 129(ivec3) ConstantComposite 190 190 190 202: 129(ivec3) ConstantComposite 192 192 192
220: TypeImage 6(int) 2D array sampled format:Unknown 225: TypeImage 6(int) 2D array sampled format:Unknown
221: TypeSampledImage 220 226: TypeSampledImage 225
222: TypePointer UniformConstant 221 227: TypePointer UniformConstant 226
223(is2DArray): 222(ptr) Variable UniformConstant 228(is2DArray): 227(ptr) Variable UniformConstant
226: 6(int) Constant 6 231: 6(int) Constant 6
227: 143(ivec2) ConstantComposite 226 226 232: 143(ivec2) ConstantComposite 231 231
235: 6(int) Constant 7 240: 6(int) Constant 7
236: 143(ivec2) ConstantComposite 235 235 241: 143(ivec2) ConstantComposite 240 240
253: TypeImage 10(float) Cube depth sampled format:Unknown 258: TypeImage 10(float) Cube depth sampled format:Unknown
254: TypeSampledImage 253 259: TypeSampledImage 258
255: TypePointer UniformConstant 254 260: TypePointer UniformConstant 259
256(sCubeShadow): 255(ptr) Variable UniformConstant 261(sCubeShadow): 260(ptr) Variable UniformConstant
286: TypeImage 10(float) Rect depth sampled format:Unknown 291: TypeImage 10(float) Rect depth sampled format:Unknown
287: TypeSampledImage 286 292: TypeSampledImage 291
288: TypePointer UniformConstant 287 293: TypePointer UniformConstant 292
289(s2DRectShadow): 288(ptr) Variable UniformConstant 294(s2DRectShadow): 293(ptr) Variable UniformConstant
294: 20(int) Constant 3 299: 20(int) Constant 3
306: 143(ivec2) ConstantComposite 130 130 311: 143(ivec2) ConstantComposite 130 130
335: 143(ivec2) ConstantComposite 190 190 340: 143(ivec2) ConstantComposite 192 192
357: 20(int) Constant 4 362: 20(int) Constant 4
358: TypeArray 143(ivec2) 357 363: TypeArray 143(ivec2) 362
359: TypePointer Input 358 364: TypePointer Input 363
360(offsets): 359(ptr) Variable Input 365(offsets): 364(ptr) Variable Input
383: TypeImage 10(float) 2D nonsampled format:Rgba32f 388: TypeImage 10(float) 2D nonsampled format:Rgba32f
384: TypePointer UniformConstant 383 389: TypePointer UniformConstant 388
385(i2D): 384(ptr) Variable UniformConstant 390(i2D): 389(ptr) Variable UniformConstant
387: TypePointer Input 143(ivec2) 392: TypePointer Input 143(ivec2)
388(ic2): 387(ptr) Variable Input 393(ic2): 392(ptr) Variable Input
395: TypeImage 6(int) 3D nonsampled format:Rgba32i 400: TypeImage 6(int) 3D nonsampled format:Rgba32i
396: TypePointer UniformConstant 395 401: TypePointer UniformConstant 400
397(ii3D): 396(ptr) Variable UniformConstant 402(ii3D): 401(ptr) Variable UniformConstant
399: TypePointer Input 129(ivec3) 404: TypePointer Input 129(ivec3)
400(ic3): 399(ptr) Variable Input 405(ic3): 404(ptr) Variable Input
407: TypeImage 10(float) 2D multi-sampled nonsampled format:Rgba32f 412: TypeImage 10(float) 2D multi-sampled nonsampled format:Rgba32f
408: TypePointer UniformConstant 407 413: TypePointer UniformConstant 412
409(i2DMS): 408(ptr) Variable UniformConstant 414(i2DMS): 413(ptr) Variable UniformConstant
417: TypePointer Output 11(fvec4) 422: TypePointer Output 11(fvec4)
418(outColor): 417(ptr) Variable Output 423(outColor): 422(ptr) Variable Output
421: TypeBool 426: TypeBool
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(resident): 7(ptr) Variable Function 8(resident): 7(ptr) Variable Function
13(texel): 12(ptr) Variable Function 13(texel): 12(ptr) Variable Function
18(itexel): 17(ptr) Variable Function 18(itexel): 17(ptr) Variable Function
23(utexel): 22(ptr) Variable Function 23(utexel): 22(ptr) Variable Function
419: 12(ptr) Variable Function 424: 12(ptr) Variable Function
Store 8(resident) 9 Store 8(resident) 9
Store 13(texel) 15 Store 13(texel) 15
Store 18(itexel) 19 Store 18(itexel) 19
@@ -308,281 +308,286 @@ Linked fragment stage:
167: 27 Load 29(s2D) 167: 27 Load 29(s2D)
168: 31(fvec2) Load 33(c2) 168: 31(fvec2) Load 33(c2)
169: 143(ivec2) ConvertFToS 168 169: 143(ivec2) ConvertFToS 168
170: 35(ResType) ImageSparseFetch 167 169 Lod 130 170: 26 Image 167
171: 11(fvec4) CompositeExtract 170 1 171: 35(ResType) ImageSparseFetch 170 169 Lod 130
Store 13(texel) 171 172: 11(fvec4) CompositeExtract 171 1
172: 6(int) CompositeExtract 170 0 Store 13(texel) 172
173: 6(int) Load 8(resident) 173: 6(int) CompositeExtract 171 0
174: 6(int) BitwiseOr 173 172 174: 6(int) Load 8(resident)
Store 8(resident) 174 175: 6(int) BitwiseOr 174 173
175: 138 Load 140(us2DRect) Store 8(resident) 175
176: 31(fvec2) Load 33(c2) 176: 138 Load 140(us2DRect)
177: 143(ivec2) ConvertFToS 176 177: 31(fvec2) Load 33(c2)
178:111(ResType) ImageSparseFetch 175 177 178: 143(ivec2) ConvertFToS 177
179: 21(ivec4) CompositeExtract 178 1 179: 137 Image 176
Store 23(utexel) 179 180:111(ResType) ImageSparseFetch 179 178
180: 6(int) CompositeExtract 178 0 181: 21(ivec4) CompositeExtract 180 1
181: 6(int) Load 8(resident) Store 23(utexel) 181
182: 6(int) BitwiseOr 181 180 182: 6(int) CompositeExtract 180 0
Store 8(resident) 182 183: 6(int) Load 8(resident)
187: 184 Load 186(s2DMS) 184: 6(int) BitwiseOr 183 182
188: 31(fvec2) Load 33(c2) Store 8(resident) 184
189: 143(ivec2) ConvertFToS 188 189: 186 Load 188(s2DMS)
191: 35(ResType) ImageSparseFetch 187 189 Sample 190 190: 31(fvec2) Load 33(c2)
192: 11(fvec4) CompositeExtract 191 1 191: 143(ivec2) ConvertFToS 190
Store 13(texel) 192 193: 185 Image 189
193: 6(int) CompositeExtract 191 0 194: 35(ResType) ImageSparseFetch 193 191 Sample 192
194: 6(int) Load 8(resident) 195: 11(fvec4) CompositeExtract 194 1
195: 6(int) BitwiseOr 194 193 Store 13(texel) 195
Store 8(resident) 195 196: 6(int) CompositeExtract 194 0
196: 42 Load 44(s3D) 197: 6(int) Load 8(resident)
197: 46(fvec3) Load 48(c3) 198: 6(int) BitwiseOr 197 196
198: 129(ivec3) ConvertFToS 197 Store 8(resident) 198
200: 35(ResType) ImageSparseFetch 196 198 Lod ConstOffset 130 199 199: 42 Load 44(s3D)
201: 11(fvec4) CompositeExtract 200 1 200: 46(fvec3) Load 48(c3)
Store 13(texel) 201 201: 129(ivec3) ConvertFToS 200
202: 6(int) CompositeExtract 200 0 203: 41 Image 199
203: 6(int) Load 8(resident) 204: 35(ResType) ImageSparseFetch 203 201 Lod ConstOffset 130 202
204: 6(int) BitwiseOr 203 202 205: 11(fvec4) CompositeExtract 204 1
Store 8(resident) 204 Store 13(texel) 205
205: 138 Load 140(us2DRect) 206: 6(int) CompositeExtract 204 0
206: 31(fvec2) Load 33(c2) 207: 6(int) Load 8(resident)
207: 143(ivec2) ConvertFToS 206 208: 6(int) BitwiseOr 207 206
208:111(ResType) ImageSparseFetch 205 207 ConstOffset 145 Store 8(resident) 208
209: 21(ivec4) CompositeExtract 208 1 209: 138 Load 140(us2DRect)
Store 23(utexel) 209 210: 31(fvec2) Load 33(c2)
210: 6(int) CompositeExtract 208 0 211: 143(ivec2) ConvertFToS 210
211: 6(int) Load 8(resident) 212: 137 Image 209
212: 6(int) BitwiseOr 211 210 213:111(ResType) ImageSparseFetch 212 211 ConstOffset 145
Store 8(resident) 212 214: 21(ivec4) CompositeExtract 213 1
213: 27 Load 29(s2D) Store 23(utexel) 214
214: 31(fvec2) Load 33(c2) 215: 6(int) CompositeExtract 213 0
215: 35(ResType) ImageSparseSampleExplicitLod 213 214 Lod ConstOffset 50 158 216: 6(int) Load 8(resident)
216: 11(fvec4) CompositeExtract 215 1 217: 6(int) BitwiseOr 216 215
Store 13(texel) 216 Store 8(resident) 217
217: 6(int) CompositeExtract 215 0 218: 27 Load 29(s2D)
218: 6(int) Load 8(resident) 219: 31(fvec2) Load 33(c2)
219: 6(int) BitwiseOr 218 217 220: 35(ResType) ImageSparseSampleExplicitLod 218 219 Lod ConstOffset 50 158
Store 8(resident) 219 221: 11(fvec4) CompositeExtract 220 1
224: 221 Load 223(is2DArray) Store 13(texel) 221
225: 46(fvec3) Load 48(c3) 222: 6(int) CompositeExtract 220 0
228: 62(ResType) ImageSparseSampleExplicitLod 224 225 Lod ConstOffset 50 227 223: 6(int) Load 8(resident)
229: 16(ivec4) CompositeExtract 228 1 224: 6(int) BitwiseOr 223 222
Store 18(itexel) 229 Store 8(resident) 224
230: 6(int) CompositeExtract 228 0 229: 226 Load 228(is2DArray)
231: 6(int) Load 8(resident) 230: 46(fvec3) Load 48(c3)
232: 6(int) BitwiseOr 231 230 233: 62(ResType) ImageSparseSampleExplicitLod 229 230 Lod ConstOffset 50 232
Store 8(resident) 232 234: 16(ivec4) CompositeExtract 233 1
233: 69 Load 71(s2DShadow) Store 18(itexel) 234
234: 46(fvec3) Load 48(c3) 235: 6(int) CompositeExtract 233 0
237: 74(ptr) AccessChain 13(texel) 159 236: 6(int) Load 8(resident)
238: 10(float) CompositeExtract 234 2 237: 6(int) BitwiseOr 236 235
239: 77(ResType) ImageSparseSampleDrefExplicitLod 233 234 238 Lod ConstOffset 50 236 Store 8(resident) 237
240: 10(float) CompositeExtract 239 1 238: 69 Load 71(s2DShadow)
Store 237 240 239: 46(fvec3) Load 48(c3)
241: 6(int) CompositeExtract 239 0 242: 74(ptr) AccessChain 13(texel) 159
242: 6(int) Load 8(resident) 243: 10(float) CompositeExtract 239 2
243: 6(int) BitwiseOr 242 241 244: 77(ResType) ImageSparseSampleDrefExplicitLod 238 239 243 Lod ConstOffset 50 241
Store 8(resident) 243 245: 10(float) CompositeExtract 244 1
244: 42 Load 44(s3D) Store 242 245
245: 46(fvec3) Load 48(c3) 246: 6(int) CompositeExtract 244 0
246: 46(fvec3) Load 48(c3) 247: 6(int) Load 8(resident)
247: 46(fvec3) Load 48(c3) 248: 6(int) BitwiseOr 247 246
248: 35(ResType) ImageSparseSampleExplicitLod 244 245 Grad 246 247 Store 8(resident) 248
249: 11(fvec4) CompositeExtract 248 1 249: 42 Load 44(s3D)
Store 13(texel) 249 250: 46(fvec3) Load 48(c3)
250: 6(int) CompositeExtract 248 0 251: 46(fvec3) Load 48(c3)
251: 6(int) Load 8(resident) 252: 46(fvec3) Load 48(c3)
252: 6(int) BitwiseOr 251 250 253: 35(ResType) ImageSparseSampleExplicitLod 249 250 Grad 251 252
Store 8(resident) 252 254: 11(fvec4) CompositeExtract 253 1
257: 254 Load 256(sCubeShadow) Store 13(texel) 254
258: 11(fvec4) Load 89(c4) 255: 6(int) CompositeExtract 253 0
259: 46(fvec3) Load 48(c3) 256: 6(int) Load 8(resident)
260: 46(fvec3) Load 48(c3) 257: 6(int) BitwiseOr 256 255
261: 74(ptr) AccessChain 13(texel) 119 Store 8(resident) 257
262: 10(float) CompositeExtract 258 3 262: 259 Load 261(sCubeShadow)
263: 77(ResType) ImageSparseSampleDrefExplicitLod 257 258 262 Grad 259 260 263: 11(fvec4) Load 89(c4)
264: 10(float) CompositeExtract 263 1 264: 46(fvec3) Load 48(c3)
Store 261 264 265: 46(fvec3) Load 48(c3)
265: 6(int) CompositeExtract 263 0 266: 74(ptr) AccessChain 13(texel) 119
266: 6(int) Load 8(resident) 267: 10(float) CompositeExtract 263 3
267: 6(int) BitwiseOr 266 265 268: 77(ResType) ImageSparseSampleDrefExplicitLod 262 263 267 Grad 264 265
Store 8(resident) 267 269: 10(float) CompositeExtract 268 1
268: 106 Load 108(usCubeArray) Store 266 269
269: 11(fvec4) Load 89(c4) 270: 6(int) CompositeExtract 268 0
270: 46(fvec3) Load 48(c3) 271: 6(int) Load 8(resident)
271: 46(fvec3) Load 48(c3) 272: 6(int) BitwiseOr 271 270
272:111(ResType) ImageSparseSampleExplicitLod 268 269 Grad 270 271 Store 8(resident) 272
273: 21(ivec4) CompositeExtract 272 1 273: 106 Load 108(usCubeArray)
Store 23(utexel) 273 274: 11(fvec4) Load 89(c4)
274: 6(int) CompositeExtract 272 0 275: 46(fvec3) Load 48(c3)
275: 6(int) Load 8(resident) 276: 46(fvec3) Load 48(c3)
276: 6(int) BitwiseOr 275 274 277:111(ResType) ImageSparseSampleExplicitLod 273 274 Grad 275 276
Store 8(resident) 276 278: 21(ivec4) CompositeExtract 277 1
277: 27 Load 29(s2D) Store 23(utexel) 278
278: 31(fvec2) Load 33(c2) 279: 6(int) CompositeExtract 277 0
279: 31(fvec2) Load 33(c2) 280: 6(int) Load 8(resident)
280: 31(fvec2) Load 33(c2) 281: 6(int) BitwiseOr 280 279
281: 35(ResType) ImageSparseSampleExplicitLod 277 278 Grad ConstOffset 279 280 158 Store 8(resident) 281
282: 11(fvec4) CompositeExtract 281 1 282: 27 Load 29(s2D)
Store 13(texel) 282 283: 31(fvec2) Load 33(c2)
283: 6(int) CompositeExtract 281 0 284: 31(fvec2) Load 33(c2)
284: 6(int) Load 8(resident) 285: 31(fvec2) Load 33(c2)
285: 6(int) BitwiseOr 284 283 286: 35(ResType) ImageSparseSampleExplicitLod 282 283 Grad ConstOffset 284 285 158
Store 8(resident) 285 287: 11(fvec4) CompositeExtract 286 1
290: 287 Load 289(s2DRectShadow) Store 13(texel) 287
291: 46(fvec3) Load 48(c3) 288: 6(int) CompositeExtract 286 0
292: 31(fvec2) Load 33(c2) 289: 6(int) Load 8(resident)
293: 31(fvec2) Load 33(c2) 290: 6(int) BitwiseOr 289 288
295: 74(ptr) AccessChain 13(texel) 294 Store 8(resident) 290
296: 10(float) CompositeExtract 291 2 295: 292 Load 294(s2DRectShadow)
297: 77(ResType) ImageSparseSampleDrefExplicitLod 290 291 296 Grad ConstOffset 292 293 227 296: 46(fvec3) Load 48(c3)
298: 10(float) CompositeExtract 297 1 297: 31(fvec2) Load 33(c2)
Store 295 298 298: 31(fvec2) Load 33(c2)
299: 6(int) CompositeExtract 297 0 300: 74(ptr) AccessChain 13(texel) 299
300: 6(int) Load 8(resident) 301: 10(float) CompositeExtract 296 2
301: 6(int) BitwiseOr 300 299 302: 77(ResType) ImageSparseSampleDrefExplicitLod 295 296 301 Grad ConstOffset 297 298 232
Store 8(resident) 301 303: 10(float) CompositeExtract 302 1
302: 221 Load 223(is2DArray) Store 300 303
303: 46(fvec3) Load 48(c3) 304: 6(int) CompositeExtract 302 0
304: 31(fvec2) Load 33(c2) 305: 6(int) Load 8(resident)
305: 31(fvec2) Load 33(c2) 306: 6(int) BitwiseOr 305 304
307: 62(ResType) ImageSparseSampleExplicitLod 302 303 Grad ConstOffset 304 305 306 Store 8(resident) 306
308: 16(ivec4) CompositeExtract 307 1 307: 226 Load 228(is2DArray)
Store 18(itexel) 308 308: 46(fvec3) Load 48(c3)
309: 6(int) CompositeExtract 307 0 309: 31(fvec2) Load 33(c2)
310: 6(int) Load 8(resident) 310: 31(fvec2) Load 33(c2)
311: 6(int) BitwiseOr 310 309 312: 62(ResType) ImageSparseSampleExplicitLod 307 308 Grad ConstOffset 309 310 311
Store 8(resident) 311 313: 16(ivec4) CompositeExtract 312 1
312: 27 Load 29(s2D) Store 18(itexel) 313
313: 31(fvec2) Load 33(c2) 314: 6(int) CompositeExtract 312 0
314: 35(ResType) ImageSparseGather 312 313 9 315: 6(int) Load 8(resident)
315: 11(fvec4) CompositeExtract 314 1 316: 6(int) BitwiseOr 315 314
Store 13(texel) 315 Store 8(resident) 316
316: 6(int) CompositeExtract 314 0 317: 27 Load 29(s2D)
317: 6(int) Load 8(resident) 318: 31(fvec2) Load 33(c2)
318: 6(int) BitwiseOr 317 316 319: 35(ResType) ImageSparseGather 317 318 9
Store 8(resident) 318 320: 11(fvec4) CompositeExtract 319 1
319: 221 Load 223(is2DArray) Store 13(texel) 320
320: 46(fvec3) Load 48(c3) 321: 6(int) CompositeExtract 319 0
321: 62(ResType) ImageSparseGather 319 320 130 322: 6(int) Load 8(resident)
322: 16(ivec4) CompositeExtract 321 1 323: 6(int) BitwiseOr 322 321
Store 18(itexel) 322 Store 8(resident) 323
323: 6(int) CompositeExtract 321 0 324: 226 Load 228(is2DArray)
324: 6(int) Load 8(resident) 325: 46(fvec3) Load 48(c3)
325: 6(int) BitwiseOr 324 323 326: 62(ResType) ImageSparseGather 324 325 130
Store 8(resident) 325 327: 16(ivec4) CompositeExtract 326 1
326: 152 Load 154(s2DArrayShadow) Store 18(itexel) 327
327: 46(fvec3) Load 48(c3) 328: 6(int) CompositeExtract 326 0
328: 35(ResType) ImageSparseDrefGather 326 327 50 329: 6(int) Load 8(resident)
329: 11(fvec4) CompositeExtract 328 1 330: 6(int) BitwiseOr 329 328
Store 13(texel) 329 Store 8(resident) 330
330: 6(int) CompositeExtract 328 0 331: 152 Load 154(s2DArrayShadow)
331: 6(int) Load 8(resident) 332: 46(fvec3) Load 48(c3)
332: 6(int) BitwiseOr 331 330 333: 35(ResType) ImageSparseDrefGather 331 332 50
Store 8(resident) 332 334: 11(fvec4) CompositeExtract 333 1
333: 27 Load 29(s2D) Store 13(texel) 334
334: 31(fvec2) Load 33(c2) 335: 6(int) CompositeExtract 333 0
336: 35(ResType) ImageSparseGather 333 334 9 ConstOffset 335 336: 6(int) Load 8(resident)
337: 11(fvec4) CompositeExtract 336 1 337: 6(int) BitwiseOr 336 335
Store 13(texel) 337 Store 8(resident) 337
338: 6(int) CompositeExtract 336 0 338: 27 Load 29(s2D)
339: 6(int) Load 8(resident) 339: 31(fvec2) Load 33(c2)
340: 6(int) BitwiseOr 339 338 341: 35(ResType) ImageSparseGather 338 339 9 ConstOffset 340
Store 8(resident) 340 342: 11(fvec4) CompositeExtract 341 1
341: 221 Load 223(is2DArray) Store 13(texel) 342
342: 46(fvec3) Load 48(c3) 343: 6(int) CompositeExtract 341 0
343: 62(ResType) ImageSparseGather 341 342 130 ConstOffset 158 344: 6(int) Load 8(resident)
344: 16(ivec4) CompositeExtract 343 1 345: 6(int) BitwiseOr 344 343
Store 18(itexel) 344 Store 8(resident) 345
345: 6(int) CompositeExtract 343 0 346: 226 Load 228(is2DArray)
346: 6(int) Load 8(resident) 347: 46(fvec3) Load 48(c3)
347: 6(int) BitwiseOr 346 345 348: 62(ResType) ImageSparseGather 346 347 130 ConstOffset 158
Store 8(resident) 347 349: 16(ivec4) CompositeExtract 348 1
348: 287 Load 289(s2DRectShadow) Store 18(itexel) 349
349: 31(fvec2) Load 33(c2) 350: 6(int) CompositeExtract 348 0
350: 35(ResType) ImageSparseDrefGather 348 349 50 ConstOffset 236 351: 6(int) Load 8(resident)
351: 11(fvec4) CompositeExtract 350 1 352: 6(int) BitwiseOr 351 350
Store 13(texel) 351 Store 8(resident) 352
352: 6(int) CompositeExtract 350 0 353: 292 Load 294(s2DRectShadow)
353: 6(int) Load 8(resident) 354: 31(fvec2) Load 33(c2)
354: 6(int) BitwiseOr 353 352 355: 35(ResType) ImageSparseDrefGather 353 354 50 ConstOffset 241
Store 8(resident) 354 356: 11(fvec4) CompositeExtract 355 1
355: 27 Load 29(s2D) Store 13(texel) 356
356: 31(fvec2) Load 33(c2) 357: 6(int) CompositeExtract 355 0
361: 358 Load 360(offsets) 358: 6(int) Load 8(resident)
362: 35(ResType) ImageSparseGather 355 356 9 ConstOffsets 361 359: 6(int) BitwiseOr 358 357
363: 11(fvec4) CompositeExtract 362 1 Store 8(resident) 359
Store 13(texel) 363 360: 27 Load 29(s2D)
364: 6(int) CompositeExtract 362 0 361: 31(fvec2) Load 33(c2)
365: 6(int) Load 8(resident) 366: 363 Load 365(offsets)
366: 6(int) BitwiseOr 365 364 367: 35(ResType) ImageSparseGather 360 361 9 ConstOffsets 366
Store 8(resident) 366 368: 11(fvec4) CompositeExtract 367 1
367: 221 Load 223(is2DArray) Store 13(texel) 368
368: 46(fvec3) Load 48(c3) 369: 6(int) CompositeExtract 367 0
369: 358 Load 360(offsets) 370: 6(int) Load 8(resident)
370: 62(ResType) ImageSparseGather 367 368 130 ConstOffsets 369 371: 6(int) BitwiseOr 370 369
371: 16(ivec4) CompositeExtract 370 1 Store 8(resident) 371
Store 18(itexel) 371 372: 226 Load 228(is2DArray)
372: 6(int) CompositeExtract 370 0 373: 46(fvec3) Load 48(c3)
373: 6(int) Load 8(resident) 374: 363 Load 365(offsets)
374: 6(int) BitwiseOr 373 372 375: 62(ResType) ImageSparseGather 372 373 130 ConstOffsets 374
Store 8(resident) 374 376: 16(ivec4) CompositeExtract 375 1
375: 287 Load 289(s2DRectShadow) Store 18(itexel) 376
376: 31(fvec2) Load 33(c2) 377: 6(int) CompositeExtract 375 0
377: 358 Load 360(offsets) 378: 6(int) Load 8(resident)
378: 35(ResType) ImageSparseDrefGather 375 376 50 ConstOffsets 377 379: 6(int) BitwiseOr 378 377
379: 11(fvec4) CompositeExtract 378 1 Store 8(resident) 379
Store 13(texel) 379 380: 292 Load 294(s2DRectShadow)
380: 6(int) CompositeExtract 378 0 381: 31(fvec2) Load 33(c2)
381: 6(int) Load 8(resident) 382: 363 Load 365(offsets)
382: 6(int) BitwiseOr 381 380 383: 35(ResType) ImageSparseDrefGather 380 381 50 ConstOffsets 382
Store 8(resident) 382 384: 11(fvec4) CompositeExtract 383 1
386: 383 Load 385(i2D) Store 13(texel) 384
389: 143(ivec2) Load 388(ic2) 385: 6(int) CompositeExtract 383 0
390: 35(ResType) ImageSparseRead 386 389 386: 6(int) Load 8(resident)
391: 11(fvec4) CompositeExtract 390 1 387: 6(int) BitwiseOr 386 385
Store 13(texel) 391 Store 8(resident) 387
392: 6(int) CompositeExtract 390 0 391: 388 Load 390(i2D)
393: 6(int) Load 8(resident) 394: 143(ivec2) Load 393(ic2)
394: 6(int) BitwiseOr 393 392 395: 35(ResType) ImageSparseRead 391 394
Store 8(resident) 394 396: 11(fvec4) CompositeExtract 395 1
398: 395 Load 397(ii3D) Store 13(texel) 396
401: 129(ivec3) Load 400(ic3) 397: 6(int) CompositeExtract 395 0
402: 62(ResType) ImageSparseRead 398 401 398: 6(int) Load 8(resident)
403: 16(ivec4) CompositeExtract 402 1 399: 6(int) BitwiseOr 398 397
Store 18(itexel) 403 Store 8(resident) 399
404: 6(int) CompositeExtract 402 0 403: 400 Load 402(ii3D)
405: 6(int) Load 8(resident) 406: 129(ivec3) Load 405(ic3)
406: 6(int) BitwiseOr 405 404 407: 62(ResType) ImageSparseRead 403 406
Store 8(resident) 406 408: 16(ivec4) CompositeExtract 407 1
410: 407 Load 409(i2DMS) Store 18(itexel) 408
411: 143(ivec2) Load 388(ic2) 409: 6(int) CompositeExtract 407 0
412: 35(ResType) ImageSparseRead 410 411 Sample 144 410: 6(int) Load 8(resident)
413: 11(fvec4) CompositeExtract 412 1 411: 6(int) BitwiseOr 410 409
Store 13(texel) 413 Store 8(resident) 411
414: 6(int) CompositeExtract 412 0 415: 412 Load 414(i2DMS)
415: 6(int) Load 8(resident) 416: 143(ivec2) Load 393(ic2)
416: 6(int) BitwiseOr 415 414 417: 35(ResType) ImageSparseRead 415 416 Sample 144
Store 8(resident) 416 418: 11(fvec4) CompositeExtract 417 1
Store 13(texel) 418
419: 6(int) CompositeExtract 417 0
420: 6(int) Load 8(resident) 420: 6(int) Load 8(resident)
422: 421(bool) ImageSparseTexelsResident 420 421: 6(int) BitwiseOr 420 419
SelectionMerge 424 None Store 8(resident) 421
BranchConditional 422 423 426 425: 6(int) Load 8(resident)
423: Label 427: 426(bool) ImageSparseTexelsResident 425
425: 11(fvec4) Load 13(texel) SelectionMerge 429 None
Store 419 425 BranchConditional 427 428 431
Branch 424 428: Label
426: Label 430: 11(fvec4) Load 13(texel)
427: 16(ivec4) Load 18(itexel) Store 424 430
428: 11(fvec4) ConvertSToF 427 Branch 429
429: 21(ivec4) Load 23(utexel) 431: Label
430: 11(fvec4) ConvertUToF 429 432: 16(ivec4) Load 18(itexel)
431: 11(fvec4) FAdd 428 430 433: 11(fvec4) ConvertSToF 432
Store 419 431 434: 21(ivec4) Load 23(utexel)
Branch 424 435: 11(fvec4) ConvertUToF 434
424: Label 436: 11(fvec4) FAdd 433 435
432: 11(fvec4) Load 419 Store 424 436
Store 418(outColor) 432 Branch 429
429: Label
437: 11(fvec4) Load 424
Store 423(outColor) 437
Return Return
FunctionEnd FunctionEnd

View File

@@ -9,13 +9,13 @@ Linked fragment stage:
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 290 // Id's are bound by 291
Capability Shader Capability Shader
Capability Sampled1D Capability Sampled1D
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 47 276 279 282 288 289 EntryPoint Fragment 4 "main" 47 277 280 283 289 290
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source GLSL 140 Source GLSL 140
Name 4 "main" Name 4 "main"
@@ -36,13 +36,13 @@ Linked fragment stage:
Name 158 "shadowSampler2D" Name 158 "shadowSampler2D"
Name 207 "iCoords2D" Name 207 "iCoords2D"
Name 212 "iLod" Name 212 "iLod"
Name 221 "gradX" Name 222 "gradX"
Name 224 "gradY" Name 225 "gradY"
Name 276 "gl_FragColor" Name 277 "gl_FragColor"
Name 279 "u" Name 280 "u"
Name 282 "blend" Name 283 "blend"
Name 288 "scale" Name 289 "scale"
Name 289 "t" Name 290 "t"
Decorate 32(texSampler1D) DescriptorSet 0 Decorate 32(texSampler1D) DescriptorSet 0
Decorate 72(texSampler2D) DescriptorSet 0 Decorate 72(texSampler2D) DescriptorSet 0
Decorate 98(texSampler3D) DescriptorSet 0 Decorate 98(texSampler3D) DescriptorSet 0
@@ -101,18 +101,18 @@ Linked fragment stage:
210: 205(ivec2) ConstantComposite 208 209 210: 205(ivec2) ConstantComposite 208 209
211: TypePointer Function 204(int) 211: TypePointer Function 204(int)
213: 204(int) Constant 1 213: 204(int) Constant 1
220: TypePointer Function 45(fvec2) 221: TypePointer Function 45(fvec2)
249: 204(int) Constant 3 250: 204(int) Constant 3
250: 204(int) Constant 4294967289 251: 204(int) Constant 4294967289
251: 205(ivec2) ConstantComposite 249 250 252: 205(ivec2) ConstantComposite 250 251
275: TypePointer Output 22(fvec4) 276: TypePointer Output 22(fvec4)
276(gl_FragColor): 275(ptr) Variable Output 277(gl_FragColor): 276(ptr) Variable Output
278: TypePointer Input 22(fvec4) 279: TypePointer Input 22(fvec4)
279(u): 278(ptr) Variable Input 280(u): 279(ptr) Variable Input
281: TypePointer Input 6(float) 282: TypePointer Input 6(float)
282(blend): 281(ptr) Variable Input 283(blend): 282(ptr) Variable Input
288(scale): 46(ptr) Variable Input 289(scale): 46(ptr) Variable Input
289(t): 46(ptr) Variable Input 290(t): 46(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(blendscale): 7(ptr) Variable Function 8(blendscale): 7(ptr) Variable Function
@@ -125,8 +125,8 @@ Linked fragment stage:
26(color): 23(ptr) Variable Function 26(color): 23(ptr) Variable Function
207(iCoords2D): 206(ptr) Variable Function 207(iCoords2D): 206(ptr) Variable Function
212(iLod): 211(ptr) Variable Function 212(iLod): 211(ptr) Variable Function
221(gradX): 220(ptr) Variable Function 222(gradX): 221(ptr) Variable Function
224(gradY): 220(ptr) Variable Function 225(gradY): 221(ptr) Variable Function
Store 8(blendscale) 9 Store 8(blendscale) 9
Store 10(bias) 11 Store 10(bias) 11
Store 12(lod) 13 Store 12(lod) 13
@@ -312,73 +312,74 @@ Linked fragment stage:
214: 70 Load 72(texSampler2D) 214: 70 Load 72(texSampler2D)
215: 205(ivec2) Load 207(iCoords2D) 215: 205(ivec2) Load 207(iCoords2D)
216: 204(int) Load 212(iLod) 216: 204(int) Load 212(iLod)
217: 22(fvec4) ImageFetch 214 215 Lod 216 217: 69 Image 214
218: 22(fvec4) Load 26(color) 218: 22(fvec4) ImageFetch 217 215 Lod 216
219: 22(fvec4) FAdd 218 217 219: 22(fvec4) Load 26(color)
Store 26(color) 219 220: 22(fvec4) FAdd 219 218
222: 45(fvec2) Load 47(coords2D) Store 26(color) 220
223: 45(fvec2) DPdx 222 223: 45(fvec2) Load 47(coords2D)
Store 221(gradX) 223 224: 45(fvec2) DPdx 223
225: 45(fvec2) Load 47(coords2D) Store 222(gradX) 224
226: 45(fvec2) DPdy 225 226: 45(fvec2) Load 47(coords2D)
Store 224(gradY) 226 227: 45(fvec2) DPdy 226
227: 70 Load 72(texSampler2D) Store 225(gradY) 227
228: 45(fvec2) Load 47(coords2D) 228: 70 Load 72(texSampler2D)
229: 45(fvec2) Load 221(gradX) 229: 45(fvec2) Load 47(coords2D)
230: 45(fvec2) Load 224(gradY) 230: 45(fvec2) Load 222(gradX)
231: 22(fvec4) ImageSampleExplicitLod 227 228 Grad 229 230 231: 45(fvec2) Load 225(gradY)
232: 22(fvec4) Load 26(color) 232: 22(fvec4) ImageSampleExplicitLod 228 229 Grad 230 231
233: 22(fvec4) FAdd 232 231 233: 22(fvec4) Load 26(color)
Store 26(color) 233 234: 22(fvec4) FAdd 233 232
234: 70 Load 72(texSampler2D) Store 26(color) 234
235: 45(fvec2) Load 47(coords2D) 235: 70 Load 72(texSampler2D)
236: 6(float) Load 14(proj) 236: 45(fvec2) Load 47(coords2D)
237: 6(float) CompositeExtract 235 0 237: 6(float) Load 14(proj)
238: 6(float) CompositeExtract 235 1 238: 6(float) CompositeExtract 236 0
239: 16(fvec3) CompositeConstruct 237 238 236 239: 6(float) CompositeExtract 236 1
240: 45(fvec2) Load 221(gradX) 240: 16(fvec3) CompositeConstruct 238 239 237
241: 45(fvec2) Load 224(gradY) 241: 45(fvec2) Load 222(gradX)
242: 22(fvec4) ImageSampleProjExplicitLod 234 239 Grad 240 241 242: 45(fvec2) Load 225(gradY)
243: 22(fvec4) Load 26(color) 243: 22(fvec4) ImageSampleProjExplicitLod 235 240 Grad 241 242
244: 22(fvec4) FAdd 243 242 244: 22(fvec4) Load 26(color)
Store 26(color) 244 245: 22(fvec4) FAdd 244 243
245: 70 Load 72(texSampler2D) Store 26(color) 245
246: 45(fvec2) Load 47(coords2D) 246: 70 Load 72(texSampler2D)
247: 45(fvec2) Load 221(gradX) 247: 45(fvec2) Load 47(coords2D)
248: 45(fvec2) Load 224(gradY) 248: 45(fvec2) Load 222(gradX)
252: 22(fvec4) ImageSampleExplicitLod 245 246 Grad ConstOffset 247 248 251 249: 45(fvec2) Load 225(gradY)
253: 22(fvec4) Load 26(color) 253: 22(fvec4) ImageSampleExplicitLod 246 247 Grad ConstOffset 248 249 252
254: 22(fvec4) FAdd 253 252 254: 22(fvec4) Load 26(color)
Store 26(color) 254 255: 22(fvec4) FAdd 254 253
255: 70 Load 72(texSampler2D) Store 26(color) 255
256: 16(fvec3) Load 18(coords3D) 256: 70 Load 72(texSampler2D)
257: 45(fvec2) Load 221(gradX) 257: 16(fvec3) Load 18(coords3D)
258: 45(fvec2) Load 224(gradY) 258: 45(fvec2) Load 222(gradX)
259: 22(fvec4) ImageSampleProjExplicitLod 255 256 Grad ConstOffset 257 258 251 259: 45(fvec2) Load 225(gradY)
260: 22(fvec4) Load 26(color) 260: 22(fvec4) ImageSampleProjExplicitLod 256 257 Grad ConstOffset 258 259 252
261: 22(fvec4) FAdd 260 259 261: 22(fvec4) Load 26(color)
Store 26(color) 261 262: 22(fvec4) FAdd 261 260
262: 156 Load 158(shadowSampler2D) Store 26(color) 262
263: 45(fvec2) Load 47(coords2D) 263: 156 Load 158(shadowSampler2D)
264: 6(float) Load 12(lod) 264: 45(fvec2) Load 47(coords2D)
265: 6(float) CompositeExtract 263 0 265: 6(float) Load 12(lod)
266: 6(float) CompositeExtract 263 1 266: 6(float) CompositeExtract 264 0
267: 16(fvec3) CompositeConstruct 265 266 264 267: 6(float) CompositeExtract 264 1
268: 45(fvec2) Load 221(gradX) 268: 16(fvec3) CompositeConstruct 266 267 265
269: 45(fvec2) Load 224(gradY) 269: 45(fvec2) Load 222(gradX)
270: 6(float) CompositeExtract 267 2 270: 45(fvec2) Load 225(gradY)
271: 6(float) ImageSampleDrefExplicitLod 262 267 270 Grad 268 269 271: 6(float) CompositeExtract 268 2
272: 22(fvec4) Load 26(color) 272: 6(float) ImageSampleDrefExplicitLod 263 268 271 Grad 269 270
273: 22(fvec4) CompositeConstruct 271 271 271 271 273: 22(fvec4) Load 26(color)
274: 22(fvec4) FAdd 272 273 274: 22(fvec4) CompositeConstruct 272 272 272 272
Store 26(color) 274 275: 22(fvec4) FAdd 273 274
277: 22(fvec4) Load 26(color) Store 26(color) 275
280: 22(fvec4) Load 279(u) 278: 22(fvec4) Load 26(color)
283: 6(float) Load 282(blend) 281: 22(fvec4) Load 280(u)
284: 6(float) Load 8(blendscale) 284: 6(float) Load 283(blend)
285: 6(float) FMul 283 284 285: 6(float) Load 8(blendscale)
286: 22(fvec4) CompositeConstruct 285 285 285 285 286: 6(float) FMul 284 285
287: 22(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 277 280 286 287: 22(fvec4) CompositeConstruct 286 286 286 286
Store 276(gl_FragColor) 287 288: 22(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 278 281 287
Store 277(gl_FragColor) 288
Return Return
FunctionEnd FunctionEnd