Update .out files with new loop SPIR-V.

Also update breakForLoop and call builder.closeLoop() in code
generation.

Remove dead code.

Change-Id: Ic8ce5b208530f8787989ef45a2efa405f1b45310
This commit is contained in:
Dejan Mircevski
2016-01-11 14:48:36 -05:00
parent 7819bee82c
commit c8fbbab419
15 changed files with 2766 additions and 2793 deletions

View File

@@ -1,62 +1,64 @@
spv.whileLoop.frag
Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 34
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 11
ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main"
Name 9 "color"
Name 11 "BaseColor"
Name 22 "d"
Name 27 "bigColor"
Name 32 "gl_FragColor"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Function 7(fvec4)
10: TypePointer Input 7(fvec4)
11(BaseColor): 10(ptr) Variable Input
16: TypeInt 32 0
17: 16(int) Constant 0
18: TypePointer Function 6(float)
21: TypePointer UniformConstant 6(float)
22(d): 21(ptr) Variable UniformConstant
24: TypeBool
26: TypePointer UniformConstant 7(fvec4)
27(bigColor): 26(ptr) Variable UniformConstant
31: TypePointer Output 7(fvec4)
32(gl_FragColor): 31(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(color): 8(ptr) Variable Function
12: 7(fvec4) Load 11(BaseColor)
Store 9(color) 12
Branch 13
13: Label
19: 18(ptr) AccessChain 9(color) 17
20: 6(float) Load 19
23: 6(float) Load 22(d)
25: 24(bool) FOrdLessThan 20 23
LoopMerge 14 13 None
BranchConditional 25 15 14
15: Label
28: 7(fvec4) Load 27(bigColor)
29: 7(fvec4) Load 9(color)
30: 7(fvec4) FAdd 29 28
Store 9(color) 30
Branch 13
14: Label
33: 7(fvec4) Load 9(color)
Store 32(gl_FragColor) 33
Return
FunctionEnd
spv.whileLoop.frag
Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 35
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 11
ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main"
Name 9 "color"
Name 11 "BaseColor"
Name 23 "d"
Name 28 "bigColor"
Name 33 "gl_FragColor"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Function 7(fvec4)
10: TypePointer Input 7(fvec4)
11(BaseColor): 10(ptr) Variable Input
17: TypeInt 32 0
18: 17(int) Constant 0
19: TypePointer Function 6(float)
22: TypePointer UniformConstant 6(float)
23(d): 22(ptr) Variable UniformConstant
25: TypeBool
27: TypePointer UniformConstant 7(fvec4)
28(bigColor): 27(ptr) Variable UniformConstant
32: TypePointer Output 7(fvec4)
33(gl_FragColor): 32(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(color): 8(ptr) Variable Function
12: 7(fvec4) Load 11(BaseColor)
Store 9(color) 12
Branch 16
13: Label
29: 7(fvec4) Load 28(bigColor)
30: 7(fvec4) Load 9(color)
31: 7(fvec4) FAdd 30 29
Store 9(color) 31
Branch 15
14: Label
34: 7(fvec4) Load 9(color)
Store 33(gl_FragColor) 34
Return
15: Label
Branch 16
16: Label
20: 19(ptr) AccessChain 9(color) 18
21: 6(float) Load 20
24: 6(float) Load 23(d)
26: 25(bool) FOrdLessThan 21 24
LoopMerge 14 15 None
BranchConditional 26 13 14
FunctionEnd