Split loop header from condition testing for for/while loops.

This commit is contained in:
Dejan Mircevski 2016-01-20 11:51:43 -05:00
parent 7349eab099
commit 213bbbe4a7
14 changed files with 1905 additions and 1828 deletions

View file

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