GLSL/SPV: If a texture is used with a shadow sampler, force 'shadow'.

Fixes #854. But, only good if we are not trying to use the same
texture for both shadow and non-shadow constructors.

Force the type of the texture to have 'shadow' set when it is
constructed with a samplerShadow.
This commit is contained in:
John Kessenich 2018-07-20 19:04:15 -06:00
Родитель fa4952c31c
Коммит 0339af3c1f
2 изменённых файлов: 280 добавлений и 274 удалений

Просмотреть файл

@ -28,33 +28,33 @@ spv.separate.frag
Name 84 "itexCubeArray" Name 84 "itexCubeArray"
Name 91 "utexCubeArray" Name 91 "utexCubeArray"
Name 98 "tex1DArray" Name 98 "tex1DArray"
Name 106 "itex1DArray" Name 105 "itex1DArray"
Name 113 "utex1D" Name 112 "utex1D"
Name 120 "itex1D" Name 119 "itex1D"
Name 127 "utex1DArray" Name 126 "utex1DArray"
Name 134 "texBuffer" Name 133 "texBuffer"
Name 146 "tex2DArray" Name 145 "tex2DArray"
Name 158 "itex2D" Name 157 "itex2D"
Name 165 "itex3D" Name 164 "itex3D"
Name 172 "itexCube" Name 171 "itexCube"
Name 179 "itex2DArray" Name 178 "itex2DArray"
Name 186 "utex2D" Name 185 "utex2D"
Name 193 "utex3D" Name 192 "utex3D"
Name 200 "utexCube" Name 199 "utexCube"
Name 207 "utex2DArray" Name 206 "utex2DArray"
Name 214 "itex2DRect" Name 213 "itex2DRect"
Name 221 "utex2DRect" Name 220 "utex2DRect"
Name 228 "itexBuffer" Name 227 "itexBuffer"
Name 235 "utexBuffer" Name 234 "utexBuffer"
Name 242 "tex2DMS" Name 241 "tex2DMS"
Name 249 "itex2DMS" Name 248 "itex2DMS"
Name 256 "utex2DMS" Name 255 "utex2DMS"
Name 263 "tex2DMSArray" Name 262 "tex2DMSArray"
Name 270 "itex2DMSArray" Name 269 "itex2DMSArray"
Name 277 "utex2DMSArray" Name 276 "utex2DMSArray"
Name 284 "tex1D" Name 283 "tex1D"
Name 294 "tex3D" Name 293 "tex3D"
Name 305 "tex2DRect" Name 304 "tex2DRect"
Decorate 14(t2d) DescriptorSet 0 Decorate 14(t2d) DescriptorSet 0
Decorate 18(s) DescriptorSet 0 Decorate 18(s) DescriptorSet 0
Decorate 31(t3d) DescriptorSet 0 Decorate 31(t3d) DescriptorSet 0
@ -67,33 +67,33 @@ spv.separate.frag
Decorate 84(itexCubeArray) DescriptorSet 0 Decorate 84(itexCubeArray) DescriptorSet 0
Decorate 91(utexCubeArray) DescriptorSet 0 Decorate 91(utexCubeArray) DescriptorSet 0
Decorate 98(tex1DArray) DescriptorSet 0 Decorate 98(tex1DArray) DescriptorSet 0
Decorate 106(itex1DArray) DescriptorSet 0 Decorate 105(itex1DArray) DescriptorSet 0
Decorate 113(utex1D) DescriptorSet 0 Decorate 112(utex1D) DescriptorSet 0
Decorate 120(itex1D) DescriptorSet 0 Decorate 119(itex1D) DescriptorSet 0
Decorate 127(utex1DArray) DescriptorSet 0 Decorate 126(utex1DArray) DescriptorSet 0
Decorate 134(texBuffer) DescriptorSet 0 Decorate 133(texBuffer) DescriptorSet 0
Decorate 146(tex2DArray) DescriptorSet 0 Decorate 145(tex2DArray) DescriptorSet 0
Decorate 158(itex2D) DescriptorSet 0 Decorate 157(itex2D) DescriptorSet 0
Decorate 165(itex3D) DescriptorSet 0 Decorate 164(itex3D) DescriptorSet 0
Decorate 172(itexCube) DescriptorSet 0 Decorate 171(itexCube) DescriptorSet 0
Decorate 179(itex2DArray) DescriptorSet 0 Decorate 178(itex2DArray) DescriptorSet 0
Decorate 186(utex2D) DescriptorSet 0 Decorate 185(utex2D) DescriptorSet 0
Decorate 193(utex3D) DescriptorSet 0 Decorate 192(utex3D) DescriptorSet 0
Decorate 200(utexCube) DescriptorSet 0 Decorate 199(utexCube) DescriptorSet 0
Decorate 207(utex2DArray) DescriptorSet 0 Decorate 206(utex2DArray) DescriptorSet 0
Decorate 214(itex2DRect) DescriptorSet 0 Decorate 213(itex2DRect) DescriptorSet 0
Decorate 221(utex2DRect) DescriptorSet 0 Decorate 220(utex2DRect) DescriptorSet 0
Decorate 228(itexBuffer) DescriptorSet 0 Decorate 227(itexBuffer) DescriptorSet 0
Decorate 235(utexBuffer) DescriptorSet 0 Decorate 234(utexBuffer) DescriptorSet 0
Decorate 242(tex2DMS) DescriptorSet 0 Decorate 241(tex2DMS) DescriptorSet 0
Decorate 249(itex2DMS) DescriptorSet 0 Decorate 248(itex2DMS) DescriptorSet 0
Decorate 256(utex2DMS) DescriptorSet 0 Decorate 255(utex2DMS) DescriptorSet 0
Decorate 263(tex2DMSArray) DescriptorSet 0 Decorate 262(tex2DMSArray) DescriptorSet 0
Decorate 270(itex2DMSArray) DescriptorSet 0 Decorate 269(itex2DMSArray) DescriptorSet 0
Decorate 277(utex2DMSArray) DescriptorSet 0 Decorate 276(utex2DMSArray) DescriptorSet 0
Decorate 284(tex1D) DescriptorSet 0 Decorate 283(tex1D) DescriptorSet 0
Decorate 294(tex3D) DescriptorSet 0 Decorate 293(tex3D) DescriptorSet 0
Decorate 305(tex2DRect) DescriptorSet 0 Decorate 304(tex2DRect) DescriptorSet 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
8: TypeFloat 32 8: TypeFloat 32
@ -147,127 +147,127 @@ spv.separate.frag
90: TypePointer UniformConstant 89 90: TypePointer UniformConstant 89
91(utexCubeArray): 90(ptr) Variable UniformConstant 91(utexCubeArray): 90(ptr) Variable UniformConstant
94: TypeSampledImage 89 94: TypeSampledImage 89
96: TypeImage 8(float) 1D array sampled format:Unknown 96: TypeImage 8(float) 1D depth array sampled format:Unknown
97: TypePointer UniformConstant 96 97: TypePointer UniformConstant 96
98(tex1DArray): 97(ptr) Variable UniformConstant 98(tex1DArray): 97(ptr) Variable UniformConstant
101: TypeImage 8(float) 1D depth array sampled format:Unknown 101: TypeSampledImage 96
102: TypeSampledImage 101 103: TypeImage 32(int) 1D array sampled format:Unknown
104: TypeImage 32(int) 1D array sampled format:Unknown 104: TypePointer UniformConstant 103
105: TypePointer UniformConstant 104 105(itex1DArray): 104(ptr) Variable UniformConstant
106(itex1DArray): 105(ptr) Variable UniformConstant 108: TypeSampledImage 103
109: TypeSampledImage 104 110: TypeImage 27(int) 1D sampled format:Unknown
111: TypeImage 27(int) 1D sampled format:Unknown 111: TypePointer UniformConstant 110
112: TypePointer UniformConstant 111 112(utex1D): 111(ptr) Variable UniformConstant
113(utex1D): 112(ptr) Variable UniformConstant 115: TypeSampledImage 110
116: TypeSampledImage 111 117: TypeImage 32(int) 1D sampled format:Unknown
118: TypeImage 32(int) 1D sampled format:Unknown 118: TypePointer UniformConstant 117
119: TypePointer UniformConstant 118 119(itex1D): 118(ptr) Variable UniformConstant
120(itex1D): 119(ptr) Variable UniformConstant 122: TypeSampledImage 117
123: TypeSampledImage 118 124: TypeImage 27(int) 1D array sampled format:Unknown
125: TypeImage 27(int) 1D array sampled format:Unknown 125: TypePointer UniformConstant 124
126: TypePointer UniformConstant 125 126(utex1DArray): 125(ptr) Variable UniformConstant
127(utex1DArray): 126(ptr) Variable UniformConstant 129: TypeSampledImage 124
130: TypeSampledImage 125 131: TypeImage 8(float) Buffer sampled format:Unknown
132: TypeImage 8(float) Buffer sampled format:Unknown 132: TypePointer UniformConstant 131
133: TypePointer UniformConstant 132 133(texBuffer): 132(ptr) Variable UniformConstant
134(texBuffer): 133(ptr) Variable UniformConstant 136: TypeSampledImage 131
137: TypeSampledImage 132 140: TypeImage 8(float) Cube depth sampled format:Unknown
141: TypeImage 8(float) Cube depth sampled format:Unknown 141: TypeSampledImage 140
142: TypeSampledImage 141 143: TypeImage 8(float) 2D array sampled format:Unknown
144: TypeImage 8(float) 2D array sampled format:Unknown 144: TypePointer UniformConstant 143
145: TypePointer UniformConstant 144 145(tex2DArray): 144(ptr) Variable UniformConstant
146(tex2DArray): 145(ptr) Variable UniformConstant 148: TypeSampledImage 143
149: TypeSampledImage 144 152: TypeImage 8(float) 2D depth array sampled format:Unknown
153: TypeImage 8(float) 2D depth array sampled format:Unknown 153: TypeSampledImage 152
154: TypeSampledImage 153 155: TypeImage 32(int) 2D sampled format:Unknown
156: TypeImage 32(int) 2D sampled format:Unknown 156: TypePointer UniformConstant 155
157: TypePointer UniformConstant 156 157(itex2D): 156(ptr) Variable UniformConstant
158(itex2D): 157(ptr) Variable UniformConstant 160: TypeSampledImage 155
161: TypeSampledImage 156 162: TypeImage 32(int) 3D sampled format:Unknown
163: TypeImage 32(int) 3D sampled format:Unknown 163: TypePointer UniformConstant 162
164: TypePointer UniformConstant 163 164(itex3D): 163(ptr) Variable UniformConstant
165(itex3D): 164(ptr) Variable UniformConstant 167: TypeSampledImage 162
168: TypeSampledImage 163 169: TypeImage 32(int) Cube sampled format:Unknown
170: TypeImage 32(int) Cube sampled format:Unknown 170: TypePointer UniformConstant 169
171: TypePointer UniformConstant 170 171(itexCube): 170(ptr) Variable UniformConstant
172(itexCube): 171(ptr) Variable UniformConstant 174: TypeSampledImage 169
175: TypeSampledImage 170 176: TypeImage 32(int) 2D array sampled format:Unknown
177: TypeImage 32(int) 2D array sampled format:Unknown 177: TypePointer UniformConstant 176
178: TypePointer UniformConstant 177 178(itex2DArray): 177(ptr) Variable UniformConstant
179(itex2DArray): 178(ptr) Variable UniformConstant 181: TypeSampledImage 176
182: TypeSampledImage 177 183: TypeImage 27(int) 2D sampled format:Unknown
184: TypeImage 27(int) 2D sampled format:Unknown 184: TypePointer UniformConstant 183
185: TypePointer UniformConstant 184 185(utex2D): 184(ptr) Variable UniformConstant
186(utex2D): 185(ptr) Variable UniformConstant 188: TypeSampledImage 183
189: TypeSampledImage 184 190: TypeImage 27(int) 3D sampled format:Unknown
191: TypeImage 27(int) 3D sampled format:Unknown 191: TypePointer UniformConstant 190
192: TypePointer UniformConstant 191 192(utex3D): 191(ptr) Variable UniformConstant
193(utex3D): 192(ptr) Variable UniformConstant 195: TypeSampledImage 190
196: TypeSampledImage 191 197: TypeImage 27(int) Cube sampled format:Unknown
198: TypeImage 27(int) Cube sampled format:Unknown 198: TypePointer UniformConstant 197
199: TypePointer UniformConstant 198 199(utexCube): 198(ptr) Variable UniformConstant
200(utexCube): 199(ptr) Variable UniformConstant 202: TypeSampledImage 197
203: TypeSampledImage 198 204: TypeImage 27(int) 2D array sampled format:Unknown
205: TypeImage 27(int) 2D array sampled format:Unknown 205: TypePointer UniformConstant 204
206: TypePointer UniformConstant 205 206(utex2DArray): 205(ptr) Variable UniformConstant
207(utex2DArray): 206(ptr) Variable UniformConstant 209: TypeSampledImage 204
210: TypeSampledImage 205 211: TypeImage 32(int) Rect sampled format:Unknown
212: TypeImage 32(int) Rect sampled format:Unknown 212: TypePointer UniformConstant 211
213: TypePointer UniformConstant 212 213(itex2DRect): 212(ptr) Variable UniformConstant
214(itex2DRect): 213(ptr) Variable UniformConstant 216: TypeSampledImage 211
217: TypeSampledImage 212 218: TypeImage 27(int) Rect sampled format:Unknown
219: TypeImage 27(int) Rect sampled format:Unknown 219: TypePointer UniformConstant 218
220: TypePointer UniformConstant 219 220(utex2DRect): 219(ptr) Variable UniformConstant
221(utex2DRect): 220(ptr) Variable UniformConstant 223: TypeSampledImage 218
224: TypeSampledImage 219 225: TypeImage 32(int) Buffer sampled format:Unknown
226: TypeImage 32(int) Buffer sampled format:Unknown 226: TypePointer UniformConstant 225
227: TypePointer UniformConstant 226 227(itexBuffer): 226(ptr) Variable UniformConstant
228(itexBuffer): 227(ptr) Variable UniformConstant 230: TypeSampledImage 225
231: TypeSampledImage 226 232: TypeImage 27(int) Buffer sampled format:Unknown
233: TypeImage 27(int) Buffer sampled format:Unknown 233: TypePointer UniformConstant 232
234: TypePointer UniformConstant 233 234(utexBuffer): 233(ptr) Variable UniformConstant
235(utexBuffer): 234(ptr) Variable UniformConstant 237: TypeSampledImage 232
238: TypeSampledImage 233 239: TypeImage 8(float) 2D multi-sampled sampled format:Unknown
240: TypeImage 8(float) 2D multi-sampled sampled format:Unknown 240: TypePointer UniformConstant 239
241: TypePointer UniformConstant 240 241(tex2DMS): 240(ptr) Variable UniformConstant
242(tex2DMS): 241(ptr) Variable UniformConstant 244: TypeSampledImage 239
245: TypeSampledImage 240 246: TypeImage 32(int) 2D multi-sampled sampled format:Unknown
247: TypeImage 32(int) 2D multi-sampled sampled format:Unknown 247: TypePointer UniformConstant 246
248: TypePointer UniformConstant 247 248(itex2DMS): 247(ptr) Variable UniformConstant
249(itex2DMS): 248(ptr) Variable UniformConstant 251: TypeSampledImage 246
252: TypeSampledImage 247 253: TypeImage 27(int) 2D multi-sampled sampled format:Unknown
254: TypeImage 27(int) 2D multi-sampled sampled format:Unknown 254: TypePointer UniformConstant 253
255: TypePointer UniformConstant 254 255(utex2DMS): 254(ptr) Variable UniformConstant
256(utex2DMS): 255(ptr) Variable UniformConstant 258: TypeSampledImage 253
259: TypeSampledImage 254 260: TypeImage 8(float) 2D array multi-sampled sampled format:Unknown
261: TypeImage 8(float) 2D array multi-sampled sampled format:Unknown 261: TypePointer UniformConstant 260
262: TypePointer UniformConstant 261 262(tex2DMSArray): 261(ptr) Variable UniformConstant
263(tex2DMSArray): 262(ptr) Variable UniformConstant 265: TypeSampledImage 260
266: TypeSampledImage 261 267: TypeImage 32(int) 2D array multi-sampled sampled format:Unknown
268: TypeImage 32(int) 2D array multi-sampled sampled format:Unknown 268: TypePointer UniformConstant 267
269: TypePointer UniformConstant 268 269(itex2DMSArray): 268(ptr) Variable UniformConstant
270(itex2DMSArray): 269(ptr) Variable UniformConstant 272: TypeSampledImage 267
273: TypeSampledImage 268 274: TypeImage 27(int) 2D array multi-sampled sampled format:Unknown
275: TypeImage 27(int) 2D array multi-sampled sampled format:Unknown 275: TypePointer UniformConstant 274
276: TypePointer UniformConstant 275 276(utex2DMSArray): 275(ptr) Variable UniformConstant
277(utex2DMSArray): 276(ptr) Variable UniformConstant 279: TypeSampledImage 274
280: TypeSampledImage 275 281: TypeImage 8(float) 1D sampled format:Unknown
282: TypeImage 8(float) 1D sampled format:Unknown 282: TypePointer UniformConstant 281
283: TypePointer UniformConstant 282 283(tex1D): 282(ptr) Variable UniformConstant
284(tex1D): 283(ptr) Variable UniformConstant 286: TypeSampledImage 281
287: TypeSampledImage 282 290: TypeImage 8(float) 1D depth sampled format:Unknown
291: TypeImage 8(float) 1D depth sampled format:Unknown 291: TypeSampledImage 290
292: TypeSampledImage 291 293(tex3D): 36(ptr) Variable UniformConstant
294(tex3D): 36(ptr) Variable UniformConstant 299: TypeImage 8(float) 2D depth sampled format:Unknown
300: TypeImage 8(float) 2D depth sampled format:Unknown 300: TypeSampledImage 299
301: TypeSampledImage 300 302: TypeImage 8(float) Rect sampled format:Unknown
303: TypeImage 8(float) Rect sampled format:Unknown 303: TypePointer UniformConstant 302
304: TypePointer UniformConstant 303 304(tex2DRect): 303(ptr) Variable UniformConstant
305(tex2DRect): 304(ptr) Variable UniformConstant 307: TypeSampledImage 302
308: TypeSampledImage 303 311: TypeImage 8(float) Rect depth sampled format:Unknown
312: TypeImage 8(float) Rect depth sampled format:Unknown 312: TypeSampledImage 311
313: TypeSampledImage 312 316: TypeImage 8(float) 1D array sampled format:Unknown
317: TypeSampledImage 96 317: TypeSampledImage 316
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
15: 12 Load 14(t2d) 15: 12 Load 14(t2d)
@ -316,105 +316,105 @@ spv.separate.frag
95: 94 SampledImage 92 93 95: 94 SampledImage 92 93
99: 96 Load 98(tex1DArray) 99: 96 Load 98(tex1DArray)
100: 16 Load 77(sShadow) 100: 16 Load 77(sShadow)
103: 102 SampledImage 99 100 102: 101 SampledImage 99 100
107: 104 Load 106(itex1DArray) 106: 103 Load 105(itex1DArray)
108: 16 Load 18(s) 107: 16 Load 18(s)
110: 109 SampledImage 107 108 109: 108 SampledImage 106 107
114: 111 Load 113(utex1D) 113: 110 Load 112(utex1D)
115: 16 Load 18(s) 114: 16 Load 18(s)
117: 116 SampledImage 114 115 116: 115 SampledImage 113 114
121: 118 Load 120(itex1D) 120: 117 Load 119(itex1D)
122: 16 Load 18(s) 121: 16 Load 18(s)
124: 123 SampledImage 121 122 123: 122 SampledImage 120 121
128: 125 Load 127(utex1DArray) 127: 124 Load 126(utex1DArray)
129: 16 Load 18(s) 128: 16 Load 18(s)
131: 130 SampledImage 128 129 130: 129 SampledImage 127 128
135: 132 Load 134(texBuffer) 134: 131 Load 133(texBuffer)
136: 16 Load 18(s) 135: 16 Load 18(s)
138: 137 SampledImage 135 136 137: 136 SampledImage 134 135
139: 62 Load 64(texCube) 138: 62 Load 64(texCube)
140: 16 Load 77(sShadow) 139: 16 Load 77(sShadow)
143: 142 SampledImage 139 140 142: 141 SampledImage 138 139
147: 144 Load 146(tex2DArray) 146: 143 Load 145(tex2DArray)
148: 16 Load 18(s) 147: 16 Load 18(s)
150: 149 SampledImage 147 148 149: 148 SampledImage 146 147
151: 144 Load 146(tex2DArray) 150: 143 Load 145(tex2DArray)
152: 16 Load 77(sShadow) 151: 16 Load 77(sShadow)
155: 154 SampledImage 151 152 154: 153 SampledImage 150 151
159: 156 Load 158(itex2D) 158: 155 Load 157(itex2D)
160: 16 Load 18(s) 159: 16 Load 18(s)
162: 161 SampledImage 159 160 161: 160 SampledImage 158 159
166: 163 Load 165(itex3D) 165: 162 Load 164(itex3D)
167: 16 Load 18(s) 166: 16 Load 18(s)
169: 168 SampledImage 166 167 168: 167 SampledImage 165 166
173: 170 Load 172(itexCube) 172: 169 Load 171(itexCube)
174: 16 Load 18(s) 173: 16 Load 18(s)
176: 175 SampledImage 173 174 175: 174 SampledImage 172 173
180: 177 Load 179(itex2DArray) 179: 176 Load 178(itex2DArray)
181: 16 Load 18(s) 180: 16 Load 18(s)
183: 182 SampledImage 180 181 182: 181 SampledImage 179 180
187: 184 Load 186(utex2D) 186: 183 Load 185(utex2D)
188: 16 Load 18(s) 187: 16 Load 18(s)
190: 189 SampledImage 187 188 189: 188 SampledImage 186 187
194: 191 Load 193(utex3D) 193: 190 Load 192(utex3D)
195: 16 Load 18(s) 194: 16 Load 18(s)
197: 196 SampledImage 194 195 196: 195 SampledImage 193 194
201: 198 Load 200(utexCube) 200: 197 Load 199(utexCube)
202: 16 Load 18(s) 201: 16 Load 18(s)
204: 203 SampledImage 201 202 203: 202 SampledImage 200 201
208: 205 Load 207(utex2DArray) 207: 204 Load 206(utex2DArray)
209: 16 Load 18(s) 208: 16 Load 18(s)
211: 210 SampledImage 208 209 210: 209 SampledImage 207 208
215: 212 Load 214(itex2DRect) 214: 211 Load 213(itex2DRect)
216: 16 Load 18(s) 215: 16 Load 18(s)
218: 217 SampledImage 215 216 217: 216 SampledImage 214 215
222: 219 Load 221(utex2DRect) 221: 218 Load 220(utex2DRect)
223: 16 Load 18(s) 222: 16 Load 18(s)
225: 224 SampledImage 222 223 224: 223 SampledImage 221 222
229: 226 Load 228(itexBuffer) 228: 225 Load 227(itexBuffer)
230: 16 Load 18(s) 229: 16 Load 18(s)
232: 231 SampledImage 229 230 231: 230 SampledImage 228 229
236: 233 Load 235(utexBuffer) 235: 232 Load 234(utexBuffer)
237: 16 Load 18(s) 236: 16 Load 18(s)
239: 238 SampledImage 236 237 238: 237 SampledImage 235 236
243: 240 Load 242(tex2DMS) 242: 239 Load 241(tex2DMS)
244: 16 Load 18(s) 243: 16 Load 18(s)
246: 245 SampledImage 243 244 245: 244 SampledImage 242 243
250: 247 Load 249(itex2DMS) 249: 246 Load 248(itex2DMS)
251: 16 Load 18(s) 250: 16 Load 18(s)
253: 252 SampledImage 250 251 252: 251 SampledImage 249 250
257: 254 Load 256(utex2DMS) 256: 253 Load 255(utex2DMS)
258: 16 Load 18(s) 257: 16 Load 18(s)
260: 259 SampledImage 257 258 259: 258 SampledImage 256 257
264: 261 Load 263(tex2DMSArray) 263: 260 Load 262(tex2DMSArray)
265: 16 Load 18(s) 264: 16 Load 18(s)
267: 266 SampledImage 264 265 266: 265 SampledImage 263 264
271: 268 Load 270(itex2DMSArray) 270: 267 Load 269(itex2DMSArray)
272: 16 Load 18(s) 271: 16 Load 18(s)
274: 273 SampledImage 271 272 273: 272 SampledImage 270 271
278: 275 Load 277(utex2DMSArray) 277: 274 Load 276(utex2DMSArray)
279: 16 Load 18(s) 278: 16 Load 18(s)
281: 280 SampledImage 278 279 280: 279 SampledImage 277 278
285: 282 Load 284(tex1D) 284: 281 Load 283(tex1D)
286: 16 Load 18(s) 285: 16 Load 18(s)
288: 287 SampledImage 285 286 287: 286 SampledImage 284 285
289: 282 Load 284(tex1D) 288: 281 Load 283(tex1D)
290: 16 Load 77(sShadow) 289: 16 Load 77(sShadow)
293: 292 SampledImage 289 290 292: 291 SampledImage 288 289
295: 26 Load 294(tex3D) 294: 26 Load 293(tex3D)
296: 16 Load 18(s) 295: 16 Load 18(s)
297: 45 SampledImage 295 296 296: 45 SampledImage 294 295
298: 12 Load 58(tex2D) 297: 12 Load 58(tex2D)
299: 16 Load 77(sShadow) 298: 16 Load 77(sShadow)
302: 301 SampledImage 298 299 301: 300 SampledImage 297 298
306: 303 Load 305(tex2DRect) 305: 302 Load 304(tex2DRect)
307: 16 Load 18(s) 306: 16 Load 18(s)
309: 308 SampledImage 306 307 308: 307 SampledImage 305 306
310: 303 Load 305(tex2DRect) 309: 302 Load 304(tex2DRect)
311: 16 Load 77(sShadow) 310: 16 Load 77(sShadow)
314: 313 SampledImage 310 311 313: 312 SampledImage 309 310
315: 96 Load 98(tex1DArray) 314: 96 Load 98(tex1DArray)
316: 16 Load 18(s) 315: 16 Load 18(s)
318: 317 SampledImage 315 316 318: 317 SampledImage 314 315
Return Return
FunctionEnd FunctionEnd

Просмотреть файл

@ -5917,8 +5917,14 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
// Combined texture-sampler constructors are completely semantic checked // Combined texture-sampler constructors are completely semantic checked
// in constructorTextureSamplerError() // in constructorTextureSamplerError()
if (op == EOpConstructTextureSampler) if (op == EOpConstructTextureSampler) {
if (aggrNode->getSequence()[1]->getAsTyped()->getType().getSampler().shadow) {
// Transfer depth into the texture (SPIR-V image) type, as a hint
// for tools to know this texture/image is a depth image.
aggrNode->getSequence()[0]->getAsTyped()->getWritableType().getSampler().shadow = true;
}
return intermediate.setAggregateOperator(aggrNode, op, type, loc); return intermediate.setAggregateOperator(aggrNode, op, type, loc);
}
TTypeList::const_iterator memberTypes; TTypeList::const_iterator memberTypes;
if (op == EOpConstructStruct) if (op == EOpConstructStruct)