SPV: Implement OpImage functionality (emit before query).

This commit is contained in:
John Kessenich
2015-12-08 19:32:47 -07:00
parent 45457bcddb
commit 33661450c7
7 changed files with 594 additions and 559 deletions

View File

@@ -7,12 +7,12 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 277
// Id's are bound by 278
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 29 17 55 26 84 91 81 276 246
EntryPoint Fragment 4 "main" 29 17 55 26 84 91 81 277 247
ExecutionMode 4 OriginLowerLeft
Source GLSL 430
Name 4 "main"
@@ -39,17 +39,17 @@ Linked fragment stage:
Name 227 "is2DArray"
Name 237 "iv2"
Name 241 "sCubeShadow"
Name 246 "FragData"
Name 258 "is2Dms"
Name 262 "us2D"
Name 266 "us3D"
Name 270 "usCube"
Name 274 "us2DArray"
Name 276 "ic4D"
Name 247 "FragData"
Name 259 "is2Dms"
Name 263 "us2D"
Name 267 "us3D"
Name 271 "usCube"
Name 275 "us2DArray"
Name 277 "ic4D"
Decorate 81(ic3D) Flat
Decorate 84(ic1D) Flat
Decorate 91(ic2D) Flat
Decorate 276(ic4D) Flat
Decorate 277(ic4D) Flat
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -140,31 +140,31 @@ Linked fragment stage:
240: TypePointer UniformConstant 239
241(sCubeShadow): 240(ptr) Variable UniformConstant
243: 67(int) Constant 2
245: TypePointer Output 7(fvec4)
246(FragData): 245(ptr) Variable Output
250: 6(float) Constant 0
255: TypeImage 67(int) 2D multi-sampled sampled format:Unknown
256: TypeSampledImage 255
257: TypePointer UniformConstant 256
258(is2Dms): 257(ptr) Variable UniformConstant
259: TypeImage 32(int) 2D sampled format:Unknown
260: TypeSampledImage 259
261: TypePointer UniformConstant 260
262(us2D): 261(ptr) Variable UniformConstant
263: TypeImage 32(int) 3D sampled format:Unknown
264: TypeSampledImage 263
265: TypePointer UniformConstant 264
266(us3D): 265(ptr) Variable UniformConstant
267: TypeImage 32(int) Cube sampled format:Unknown
268: TypeSampledImage 267
269: TypePointer UniformConstant 268
270(usCube): 269(ptr) Variable UniformConstant
271: TypeImage 32(int) 2D array sampled format:Unknown
272: TypeSampledImage 271
273: TypePointer UniformConstant 272
274(us2DArray): 273(ptr) Variable UniformConstant
275: TypePointer Input 162(ivec4)
276(ic4D): 275(ptr) Variable Input
246: TypePointer Output 7(fvec4)
247(FragData): 246(ptr) Variable Output
251: 6(float) Constant 0
256: 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
262: TypePointer UniformConstant 261
263(us2D): 262(ptr) Variable UniformConstant
264: TypeImage 32(int) 3D sampled format:Unknown
265: TypeSampledImage 264
266: TypePointer UniformConstant 265
267(us3D): 266(ptr) Variable UniformConstant
268: TypeImage 32(int) Cube sampled format:Unknown
269: TypeSampledImage 268
270: TypePointer UniformConstant 269
271(usCube): 270(ptr) Variable UniformConstant
272: TypeImage 32(int) 2D array sampled format:Unknown
273: TypeSampledImage 272
274: TypePointer UniformConstant 273
275(us2DArray): 274(ptr) Variable UniformConstant
276: TypePointer Input 162(ivec4)
277(ic4D): 276(ptr) Variable Input
4(main): 2 Function None 3
5: Label
9(v): 8(ptr) Variable Function
@@ -345,15 +345,16 @@ Linked fragment stage:
235: 7(fvec4) FAdd 234 233
Store 9(v) 235
242: 239 Load 241(sCubeShadow)
244: 68(ivec2) ImageQuerySizeLod 242 243
Store 237(iv2) 244
247: 7(fvec4) Load 9(v)
248: 68(ivec2) Load 237(iv2)
249: 15(fvec2) ConvertSToF 248
251: 6(float) CompositeExtract 249 0
252: 6(float) CompositeExtract 249 1
253: 7(fvec4) CompositeConstruct 251 252 250 250
254: 7(fvec4) FAdd 247 253
Store 246(FragData) 254
244: 238 Image 242
245: 68(ivec2) ImageQuerySizeLod 244 243
Store 237(iv2) 245
248: 7(fvec4) Load 9(v)
249: 68(ivec2) Load 237(iv2)
250: 15(fvec2) ConvertSToF 249
252: 6(float) CompositeExtract 250 0
253: 6(float) CompositeExtract 250 1
254: 7(fvec4) CompositeConstruct 252 253 251 251
255: 7(fvec4) FAdd 248 254
Store 247(FragData) 255
Return
FunctionEnd