Front-end: Fix: Cubemap arrays only use 3-component coord when accessed as an image.

4 components are needed when used a texture, but not an image, which multiplies
layers and faces into the same coordinate.  This fixes it from using 4 everywhere,
to only using 4 for textures and 3 for images.
This commit is contained in:
John Kessenich 2015-10-01 12:40:48 -06:00
parent 3cd0024ea8
commit 6373574b13
6 changed files with 940 additions and 833 deletions

View File

@ -265,6 +265,10 @@ uniform writeonly imageCubeArray CA1;
uniform writeonly iimageCubeArray CA2; uniform writeonly iimageCubeArray CA2;
uniform writeonly uimageCubeArray CA3; uniform writeonly uimageCubeArray CA3;
layout(rgba16f) uniform readonly imageCubeArray rCA1;
layout(rgba32i) uniform readonly iimageCubeArray rCA2;
layout(r32ui) uniform readonly uimageCubeArray rCA3;
#ifdef GL_OES_texture_cube_map_array #ifdef GL_OES_texture_cube_map_array
uniform samplerCubeArray CA4; uniform samplerCubeArray CA4;
uniform samplerCubeArrayShadow CA5; uniform samplerCubeArrayShadow CA5;
@ -304,6 +308,14 @@ void CAT()
highp ivec3 s1 = imageSize(CA1); highp ivec3 s1 = imageSize(CA1);
highp ivec3 s2 = imageSize(CA2); highp ivec3 s2 = imageSize(CA2);
highp ivec3 s3 = imageSize(CA3); highp ivec3 s3 = imageSize(CA3);
imageStore(CA1, s3, vec4(1));
imageStore(CA2, s3, ivec4(1));
imageStore(CA3, s3, uvec4(1));
highp vec4 cl1 = imageLoad(rCA1, s3);
highp ivec4 cl2 = imageLoad(rCA2, s3);
highp uvec4 cl3 = imageLoad(rCA3, s3);
} }
uniform sampler2DMSArray bad2DMS; // ERROR, reserved uniform sampler2DMSArray bad2DMS; // ERROR, reserved

File diff suppressed because it is too large Load Diff

View File

@ -32,12 +32,12 @@ Linked fragment stage:
Name 133 "ic1D" Name 133 "ic1D"
Name 143 "ic2D" Name 143 "ic2D"
Name 153 "ic3D" Name 153 "ic3D"
Name 172 "ic4D" Name 231 "ui"
Name 234 "ui" Name 235 "ii1D"
Name 238 "ii1D" Name 249 "ui2D"
Name 252 "ui2D" Name 252 "value"
Name 255 "value" Name 367 "fragData"
Name 370 "fragData" Name 382 "ic4D"
Decorate 15(i1D) Binding 0 Decorate 15(i1D) Binding 0
Decorate 25(i2D) Binding 1 Decorate 25(i2D) Binding 1
Decorate 36(i3D) Binding 2 Decorate 36(i3D) Binding 2
@ -49,8 +49,9 @@ Linked fragment stage:
Decorate 87(iBuffer) Binding 8 Decorate 87(iBuffer) Binding 8
Decorate 97(i2DMS) Binding 9 Decorate 97(i2DMS) Binding 9
Decorate 107(i2DMSArray) Binding 10 Decorate 107(i2DMSArray) Binding 10
Decorate 238(ii1D) Binding 11 Decorate 235(ii1D) Binding 11
Decorate 252(ui2D) Binding 12 Decorate 249(ui2D) Binding 12
Decorate 382(ic4D) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -103,46 +104,46 @@ Linked fragment stage:
143(ic2D): 142(ptr) Variable UniformConstant 143(ic2D): 142(ptr) Variable UniformConstant
152: TypePointer UniformConstant 7(ivec3) 152: TypePointer UniformConstant 7(ivec3)
153(ic3D): 152(ptr) Variable UniformConstant 153(ic3D): 152(ptr) Variable UniformConstant
170: TypeVector 6(int) 4 211: 6(int) Constant 1
171: TypePointer UniformConstant 170(ivec4) 217: 6(int) Constant 2
172(ic4D): 171(ptr) Variable UniformConstant 221: 6(int) Constant 3
214: 6(int) Constant 1 227: 6(int) Constant 4
220: 6(int) Constant 2 229: TypeInt 32 0
224: 6(int) Constant 3 230: TypePointer Function 229(int)
230: 6(int) Constant 4 232: 229(int) Constant 0
232: TypeInt 32 0 233: TypeImage 6(int) 1D nonsampled format:R32i
233: TypePointer Function 232(int) 234: TypePointer UniformConstant 233
235: 232(int) Constant 0 235(ii1D): 234(ptr) Variable UniformConstant
236: TypeImage 6(int) 1D nonsampled format:R32i 237: 6(int) Constant 10
237: TypePointer UniformConstant 236 238: TypePointer Image 6(int)
238(ii1D): 237(ptr) Variable UniformConstant 240: 229(int) Constant 1
240: 6(int) Constant 10 247: TypeImage 229(int) 2D nonsampled format:R32ui
241: TypePointer Image 6(int) 248: TypePointer UniformConstant 247
243: 232(int) Constant 1 249(ui2D): 248(ptr) Variable UniformConstant
250: TypeImage 232(int) 2D nonsampled format:R32ui 251: TypePointer UniformConstant 229(int)
251: TypePointer UniformConstant 250 252(value): 251(ptr) Variable UniformConstant
252(ui2D): 251(ptr) Variable UniformConstant 254: TypePointer Image 229(int)
254: TypePointer UniformConstant 232(int) 260: 6(int) Constant 11
255(value): 254(ptr) Variable UniformConstant 275: 6(int) Constant 12
257: TypePointer Image 232(int) 290: 6(int) Constant 13
263: 6(int) Constant 11 305: 6(int) Constant 14
278: 6(int) Constant 12 320: 6(int) Constant 15
293: 6(int) Constant 13 335: 6(int) Constant 16
308: 6(int) Constant 14 350: 6(int) Constant 18
323: 6(int) Constant 15 351: 6(int) Constant 17
338: 6(int) Constant 16 360: 229(int) Constant 19
353: 6(int) Constant 18 366: TypePointer Output 126(fvec4)
354: 6(int) Constant 17 367(fragData): 366(ptr) Variable Output
363: 232(int) Constant 19 373: TypeBool
369: TypePointer Output 126(fvec4) 380: TypeVector 6(int) 4
370(fragData): 369(ptr) Variable Output 381: TypePointer UniformConstant 380(ivec4)
376: TypeBool 382(ic4D): 381(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(iv): 8(ptr) Variable Function 9(iv): 8(ptr) Variable Function
128(v): 127(ptr) Variable Function 128(v): 127(ptr) Variable Function
234(ui): 233(ptr) Variable Function 231(ui): 230(ptr) Variable Function
371: 127(ptr) Variable Function 368: 127(ptr) Variable Function
Store 9(iv) 11 Store 9(iv) 11
16: 13 Load 15(i1D) 16: 13 Load 15(i1D)
17: 6(int) ImageQuerySize 16 17: 6(int) ImageQuerySize 16
@ -278,220 +279,220 @@ Linked fragment stage:
168: 126(fvec4) Load 128(v) 168: 126(fvec4) Load 128(v)
ImageWrite 166 167 168 ImageWrite 166 167 168
169: 51 Load 53(iCubeArray) 169: 51 Load 53(iCubeArray)
173: 170(ivec4) Load 172(ic4D) 170: 7(ivec3) Load 153(ic3D)
174: 126(fvec4) ImageRead 169 173 171: 126(fvec4) ImageRead 169 170
175: 126(fvec4) Load 128(v) 172: 126(fvec4) Load 128(v)
176: 126(fvec4) FAdd 175 174 173: 126(fvec4) FAdd 172 171
Store 128(v) 176 Store 128(v) 173
177: 51 Load 53(iCubeArray) 174: 51 Load 53(iCubeArray)
178: 170(ivec4) Load 172(ic4D) 175: 7(ivec3) Load 153(ic3D)
179: 126(fvec4) Load 128(v) 176: 126(fvec4) Load 128(v)
ImageWrite 177 178 179 ImageWrite 174 175 176
180: 58 Load 60(i2DRect) 177: 58 Load 60(i2DRect)
181: 27(ivec2) Load 143(ic2D) 178: 27(ivec2) Load 143(ic2D)
182: 126(fvec4) ImageRead 180 181 179: 126(fvec4) ImageRead 177 178
183: 126(fvec4) Load 128(v) 180: 126(fvec4) Load 128(v)
184: 126(fvec4) FAdd 183 182 181: 126(fvec4) FAdd 180 179
Store 128(v) 184 Store 128(v) 181
185: 58 Load 60(i2DRect) 182: 58 Load 60(i2DRect)
183: 27(ivec2) Load 143(ic2D)
184: 126(fvec4) Load 128(v)
ImageWrite 182 183 184
185: 68 Load 70(i1DArray)
186: 27(ivec2) Load 143(ic2D) 186: 27(ivec2) Load 143(ic2D)
187: 126(fvec4) Load 128(v) 187: 126(fvec4) ImageRead 185 186
ImageWrite 185 186 187 188: 126(fvec4) Load 128(v)
188: 68 Load 70(i1DArray) 189: 126(fvec4) FAdd 188 187
189: 27(ivec2) Load 143(ic2D) Store 128(v) 189
190: 126(fvec4) ImageRead 188 189 190: 68 Load 70(i1DArray)
191: 126(fvec4) Load 128(v) 191: 27(ivec2) Load 143(ic2D)
192: 126(fvec4) FAdd 191 190 192: 126(fvec4) Load 128(v)
Store 128(v) 192 ImageWrite 190 191 192
193: 68 Load 70(i1DArray) 193: 78 Load 80(i2DArray)
194: 27(ivec2) Load 143(ic2D) 194: 7(ivec3) Load 153(ic3D)
195: 126(fvec4) Load 128(v) 195: 126(fvec4) ImageRead 193 194
ImageWrite 193 194 195 196: 126(fvec4) Load 128(v)
196: 78 Load 80(i2DArray) 197: 126(fvec4) FAdd 196 195
197: 7(ivec3) Load 153(ic3D) Store 128(v) 197
198: 126(fvec4) ImageRead 196 197 198: 78 Load 80(i2DArray)
199: 126(fvec4) Load 128(v) 199: 7(ivec3) Load 153(ic3D)
200: 126(fvec4) FAdd 199 198 200: 126(fvec4) Load 128(v)
Store 128(v) 200 ImageWrite 198 199 200
201: 78 Load 80(i2DArray) 201: 85 Load 87(iBuffer)
202: 7(ivec3) Load 153(ic3D) 202: 6(int) Load 133(ic1D)
203: 126(fvec4) Load 128(v) 203: 126(fvec4) ImageRead 201 202
ImageWrite 201 202 203 204: 126(fvec4) Load 128(v)
204: 85 Load 87(iBuffer) 205: 126(fvec4) FAdd 204 203
205: 6(int) Load 133(ic1D) Store 128(v) 205
206: 126(fvec4) ImageRead 204 205 206: 85 Load 87(iBuffer)
207: 126(fvec4) Load 128(v) 207: 6(int) Load 133(ic1D)
208: 126(fvec4) FAdd 207 206 208: 126(fvec4) Load 128(v)
Store 128(v) 208 ImageWrite 206 207 208
209: 85 Load 87(iBuffer) 209: 95 Load 97(i2DMS)
210: 6(int) Load 133(ic1D) 210: 27(ivec2) Load 143(ic2D)
211: 126(fvec4) Load 128(v) 212: 126(fvec4) ImageRead 209 210
ImageWrite 209 210 211 213: 126(fvec4) Load 128(v)
212: 95 Load 97(i2DMS) 214: 126(fvec4) FAdd 213 212
213: 27(ivec2) Load 143(ic2D) Store 128(v) 214
215: 126(fvec4) ImageRead 212 213 215: 95 Load 97(i2DMS)
216: 126(fvec4) Load 128(v) 216: 27(ivec2) Load 143(ic2D)
217: 126(fvec4) FAdd 216 215 218: 126(fvec4) Load 128(v)
Store 128(v) 217 ImageWrite 215 216 217
218: 95 Load 97(i2DMS) 219: 105 Load 107(i2DMSArray)
219: 27(ivec2) Load 143(ic2D) 220: 7(ivec3) Load 153(ic3D)
221: 126(fvec4) Load 128(v) 222: 126(fvec4) ImageRead 219 220
ImageWrite 218 219 220 223: 126(fvec4) Load 128(v)
222: 105 Load 107(i2DMSArray) 224: 126(fvec4) FAdd 223 222
223: 7(ivec3) Load 153(ic3D) Store 128(v) 224
225: 126(fvec4) ImageRead 222 223 225: 105 Load 107(i2DMSArray)
226: 126(fvec4) Load 128(v) 226: 7(ivec3) Load 153(ic3D)
227: 126(fvec4) FAdd 226 225 228: 126(fvec4) Load 128(v)
Store 128(v) 227 ImageWrite 225 226 227
228: 105 Load 107(i2DMSArray) Store 231(ui) 232
229: 7(ivec3) Load 153(ic3D) 236: 6(int) Load 133(ic1D)
231: 126(fvec4) Load 128(v) 239: 238(ptr) ImageTexelPointer 235(ii1D) 236 0
ImageWrite 228 229 230 241: 6(int) AtomicIAdd 239 240 232 237
Store 234(ui) 235 242: 7(ivec3) Load 9(iv)
239: 6(int) Load 133(ic1D) 243: 6(int) CompositeExtract 242 0
242: 241(ptr) ImageTexelPointer 238(ii1D) 239 0 244: 6(int) IAdd 243 241
244: 6(int) AtomicIAdd 242 243 235 240
245: 7(ivec3) Load 9(iv) 245: 7(ivec3) Load 9(iv)
246: 6(int) CompositeExtract 245 0 246: 7(ivec3) CompositeInsert 244 245 0
247: 6(int) IAdd 246 244 Store 9(iv) 246
248: 7(ivec3) Load 9(iv) 250: 27(ivec2) Load 143(ic2D)
249: 7(ivec3) CompositeInsert 247 248 0 253: 229(int) Load 252(value)
Store 9(iv) 249 255: 254(ptr) ImageTexelPointer 249(ui2D) 250 0
253: 27(ivec2) Load 143(ic2D) 256: 229(int) AtomicIAdd 255 240 232 253
256: 232(int) Load 255(value) 257: 229(int) Load 231(ui)
258: 257(ptr) ImageTexelPointer 252(ui2D) 253 0 258: 229(int) IAdd 257 256
259: 232(int) AtomicIAdd 258 243 235 256 Store 231(ui) 258
260: 232(int) Load 234(ui) 259: 6(int) Load 133(ic1D)
261: 232(int) IAdd 260 259 261: 238(ptr) ImageTexelPointer 235(ii1D) 259 0
Store 234(ui) 261 262: 6(int) AtomicSMin 261 240 232 260
262: 6(int) Load 133(ic1D) 263: 7(ivec3) Load 9(iv)
264: 241(ptr) ImageTexelPointer 238(ii1D) 262 0 264: 6(int) CompositeExtract 263 0
265: 6(int) AtomicSMin 264 243 235 263 265: 6(int) IAdd 264 262
266: 7(ivec3) Load 9(iv) 266: 7(ivec3) Load 9(iv)
267: 6(int) CompositeExtract 266 0 267: 7(ivec3) CompositeInsert 265 266 0
268: 6(int) IAdd 267 265 Store 9(iv) 267
269: 7(ivec3) Load 9(iv) 268: 27(ivec2) Load 143(ic2D)
270: 7(ivec3) CompositeInsert 268 269 0 269: 229(int) Load 252(value)
Store 9(iv) 270 270: 254(ptr) ImageTexelPointer 249(ui2D) 268 0
271: 27(ivec2) Load 143(ic2D) 271: 229(int) AtomicUMin 270 240 232 269
272: 232(int) Load 255(value) 272: 229(int) Load 231(ui)
273: 257(ptr) ImageTexelPointer 252(ui2D) 271 0 273: 229(int) IAdd 272 271
274: 232(int) AtomicUMin 273 243 235 272 Store 231(ui) 273
275: 232(int) Load 234(ui) 274: 6(int) Load 133(ic1D)
276: 232(int) IAdd 275 274 276: 238(ptr) ImageTexelPointer 235(ii1D) 274 0
Store 234(ui) 276 277: 6(int) AtomicSMax 276 240 232 275
277: 6(int) Load 133(ic1D) 278: 7(ivec3) Load 9(iv)
279: 241(ptr) ImageTexelPointer 238(ii1D) 277 0 279: 6(int) CompositeExtract 278 0
280: 6(int) AtomicSMax 279 243 235 278 280: 6(int) IAdd 279 277
281: 7(ivec3) Load 9(iv) 281: 7(ivec3) Load 9(iv)
282: 6(int) CompositeExtract 281 0 282: 7(ivec3) CompositeInsert 280 281 0
283: 6(int) IAdd 282 280 Store 9(iv) 282
284: 7(ivec3) Load 9(iv) 283: 27(ivec2) Load 143(ic2D)
285: 7(ivec3) CompositeInsert 283 284 0 284: 229(int) Load 252(value)
Store 9(iv) 285 285: 254(ptr) ImageTexelPointer 249(ui2D) 283 0
286: 27(ivec2) Load 143(ic2D) 286: 229(int) AtomicUMax 285 240 232 284
287: 232(int) Load 255(value) 287: 229(int) Load 231(ui)
288: 257(ptr) ImageTexelPointer 252(ui2D) 286 0 288: 229(int) IAdd 287 286
289: 232(int) AtomicUMax 288 243 235 287 Store 231(ui) 288
290: 232(int) Load 234(ui) 289: 6(int) Load 133(ic1D)
291: 232(int) IAdd 290 289 291: 238(ptr) ImageTexelPointer 235(ii1D) 289 0
Store 234(ui) 291 292: 6(int) AtomicAnd 291 240 232 290
292: 6(int) Load 133(ic1D) 293: 7(ivec3) Load 9(iv)
294: 241(ptr) ImageTexelPointer 238(ii1D) 292 0 294: 6(int) CompositeExtract 293 0
295: 6(int) AtomicAnd 294 243 235 293 295: 6(int) IAdd 294 292
296: 7(ivec3) Load 9(iv) 296: 7(ivec3) Load 9(iv)
297: 6(int) CompositeExtract 296 0 297: 7(ivec3) CompositeInsert 295 296 0
298: 6(int) IAdd 297 295 Store 9(iv) 297
299: 7(ivec3) Load 9(iv) 298: 27(ivec2) Load 143(ic2D)
300: 7(ivec3) CompositeInsert 298 299 0 299: 229(int) Load 252(value)
Store 9(iv) 300 300: 254(ptr) ImageTexelPointer 249(ui2D) 298 0
301: 27(ivec2) Load 143(ic2D) 301: 229(int) AtomicAnd 300 240 232 299
302: 232(int) Load 255(value) 302: 229(int) Load 231(ui)
303: 257(ptr) ImageTexelPointer 252(ui2D) 301 0 303: 229(int) IAdd 302 301
304: 232(int) AtomicAnd 303 243 235 302 Store 231(ui) 303
305: 232(int) Load 234(ui) 304: 6(int) Load 133(ic1D)
306: 232(int) IAdd 305 304 306: 238(ptr) ImageTexelPointer 235(ii1D) 304 0
Store 234(ui) 306 307: 6(int) AtomicOr 306 240 232 305
307: 6(int) Load 133(ic1D) 308: 7(ivec3) Load 9(iv)
309: 241(ptr) ImageTexelPointer 238(ii1D) 307 0 309: 6(int) CompositeExtract 308 0
310: 6(int) AtomicOr 309 243 235 308 310: 6(int) IAdd 309 307
311: 7(ivec3) Load 9(iv) 311: 7(ivec3) Load 9(iv)
312: 6(int) CompositeExtract 311 0 312: 7(ivec3) CompositeInsert 310 311 0
313: 6(int) IAdd 312 310 Store 9(iv) 312
314: 7(ivec3) Load 9(iv) 313: 27(ivec2) Load 143(ic2D)
315: 7(ivec3) CompositeInsert 313 314 0 314: 229(int) Load 252(value)
Store 9(iv) 315 315: 254(ptr) ImageTexelPointer 249(ui2D) 313 0
316: 27(ivec2) Load 143(ic2D) 316: 229(int) AtomicOr 315 240 232 314
317: 232(int) Load 255(value) 317: 229(int) Load 231(ui)
318: 257(ptr) ImageTexelPointer 252(ui2D) 316 0 318: 229(int) IAdd 317 316
319: 232(int) AtomicOr 318 243 235 317 Store 231(ui) 318
320: 232(int) Load 234(ui) 319: 6(int) Load 133(ic1D)
321: 232(int) IAdd 320 319 321: 238(ptr) ImageTexelPointer 235(ii1D) 319 0
Store 234(ui) 321 322: 6(int) AtomicXor 321 240 232 320
322: 6(int) Load 133(ic1D) 323: 7(ivec3) Load 9(iv)
324: 241(ptr) ImageTexelPointer 238(ii1D) 322 0 324: 6(int) CompositeExtract 323 0
325: 6(int) AtomicXor 324 243 235 323 325: 6(int) IAdd 324 322
326: 7(ivec3) Load 9(iv) 326: 7(ivec3) Load 9(iv)
327: 6(int) CompositeExtract 326 0 327: 7(ivec3) CompositeInsert 325 326 0
328: 6(int) IAdd 327 325 Store 9(iv) 327
329: 7(ivec3) Load 9(iv) 328: 27(ivec2) Load 143(ic2D)
330: 7(ivec3) CompositeInsert 328 329 0 329: 229(int) Load 252(value)
Store 9(iv) 330 330: 254(ptr) ImageTexelPointer 249(ui2D) 328 0
331: 27(ivec2) Load 143(ic2D) 331: 229(int) AtomicXor 330 240 232 329
332: 232(int) Load 255(value) 332: 229(int) Load 231(ui)
333: 257(ptr) ImageTexelPointer 252(ui2D) 331 0 333: 229(int) IAdd 332 331
334: 232(int) AtomicXor 333 243 235 332 Store 231(ui) 333
335: 232(int) Load 234(ui) 334: 6(int) Load 133(ic1D)
336: 232(int) IAdd 335 334 336: 238(ptr) ImageTexelPointer 235(ii1D) 334 0
Store 234(ui) 336 337: 6(int) AtomicExchange 336 240 232 335
337: 6(int) Load 133(ic1D) 338: 7(ivec3) Load 9(iv)
339: 241(ptr) ImageTexelPointer 238(ii1D) 337 0 339: 6(int) CompositeExtract 338 0
340: 6(int) AtomicExchange 339 243 235 338 340: 6(int) IAdd 339 337
341: 7(ivec3) Load 9(iv) 341: 7(ivec3) Load 9(iv)
342: 6(int) CompositeExtract 341 0 342: 7(ivec3) CompositeInsert 340 341 0
343: 6(int) IAdd 342 340 Store 9(iv) 342
344: 7(ivec3) Load 9(iv) 343: 27(ivec2) Load 143(ic2D)
345: 7(ivec3) CompositeInsert 343 344 0 344: 229(int) Load 252(value)
Store 9(iv) 345 345: 254(ptr) ImageTexelPointer 249(ui2D) 343 0
346: 27(ivec2) Load 143(ic2D) 346: 229(int) AtomicExchange 345 240 232 344
347: 232(int) Load 255(value) 347: 229(int) Load 231(ui)
348: 257(ptr) ImageTexelPointer 252(ui2D) 346 0 348: 229(int) IAdd 347 346
349: 232(int) AtomicExchange 348 243 235 347 Store 231(ui) 348
350: 232(int) Load 234(ui) 349: 6(int) Load 133(ic1D)
351: 232(int) IAdd 350 349 352: 238(ptr) ImageTexelPointer 235(ii1D) 349 0
Store 234(ui) 351 353: 6(int) AtomicCompareExchange 352 240 232 232 351 350
352: 6(int) Load 133(ic1D) 354: 7(ivec3) Load 9(iv)
355: 241(ptr) ImageTexelPointer 238(ii1D) 352 0 355: 6(int) CompositeExtract 354 0
356: 6(int) AtomicCompareExchange 355 243 235 235 354 353 356: 6(int) IAdd 355 353
357: 7(ivec3) Load 9(iv) 357: 7(ivec3) Load 9(iv)
358: 6(int) CompositeExtract 357 0 358: 7(ivec3) CompositeInsert 356 357 0
359: 6(int) IAdd 358 356 Store 9(iv) 358
360: 7(ivec3) Load 9(iv) 359: 27(ivec2) Load 143(ic2D)
361: 7(ivec3) CompositeInsert 359 360 0 361: 229(int) Load 252(value)
Store 9(iv) 361 362: 254(ptr) ImageTexelPointer 249(ui2D) 359 0
362: 27(ivec2) Load 143(ic2D) 363: 229(int) AtomicCompareExchange 362 240 232 232 361 360
364: 232(int) Load 255(value) 364: 229(int) Load 231(ui)
365: 257(ptr) ImageTexelPointer 252(ui2D) 362 0 365: 229(int) IAdd 364 363
366: 232(int) AtomicCompareExchange 365 243 235 235 364 363 Store 231(ui) 365
367: 232(int) Load 234(ui) 369: 229(int) Load 231(ui)
368: 232(int) IAdd 367 366 370: 7(ivec3) Load 9(iv)
Store 234(ui) 368 371: 6(int) CompositeExtract 370 1
372: 232(int) Load 234(ui) 372: 229(int) Bitcast 371
373: 7(ivec3) Load 9(iv) 374: 373(bool) INotEqual 369 372
374: 6(int) CompositeExtract 373 1 SelectionMerge 376 None
375: 232(int) Bitcast 374 BranchConditional 374 375 378
377: 376(bool) INotEqual 372 375 375: Label
SelectionMerge 379 None 377: 126(fvec4) Load 128(v)
BranchConditional 377 378 381 Store 368 377
Branch 376
378: Label 378: Label
380: 126(fvec4) Load 128(v) Store 368 130
Store 371 380 Branch 376
Branch 379 376: Label
381: Label 379: 126(fvec4) Load 368
Store 371 130 Store 367(fragData) 379
Branch 379
379: Label
382: 126(fvec4) Load 371
Store 370(fragData) 382
Return Return
FunctionEnd FunctionEnd

View File

@ -51,8 +51,8 @@ void main()
imageStore(i3D, ic3D, v); imageStore(i3D, ic3D, v);
v += imageLoad(iCube, ic3D); v += imageLoad(iCube, ic3D);
imageStore(iCube, ic3D, v); imageStore(iCube, ic3D, v);
v += imageLoad(iCubeArray, ic4D); v += imageLoad(iCubeArray, ic3D);
imageStore(iCubeArray, ic4D, v); imageStore(iCubeArray, ic3D, v);
v += imageLoad(i2DRect, ic2D); v += imageLoad(i2DRect, ic2D);
imageStore(i2DRect, ic2D, v); imageStore(i2DRect, ic2D, v);
v += imageLoad(i1DArray, ic2D); v += imageLoad(i1DArray, ic2D);

View File

@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "3.0.776" #define GLSLANG_REVISION "3.0.777"
#define GLSLANG_DATE "30-Sep-2015" #define GLSLANG_DATE "01-Oct-2015"

View File

@ -2024,7 +2024,11 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, TString& typeName, int versi
// //
void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int version, EProfile profile) void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
{ {
int dims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); int dims = dimMap[sampler.dim];
// most things with an array add a dimension, except for cubemaps
if (sampler.arrayed && sampler.dim != EsdCube)
++dims;
TString imageParams = typeName; TString imageParams = typeName;
if (dims == 1) if (dims == 1)
imageParams.append(", int"); imageParams.append(", int");