spv::Builder::Loop constructor inits all members.
After construction, the Loop is effectively const. This perturbs the IDs in SPIR-V tests because the body block is created before generating any of the loop code, rather than only when the body is first referenced.
This commit is contained in:
@@ -26,13 +26,13 @@ Linked fragment stage:
|
||||
9: TypePointer Function 8(fvec4)
|
||||
11: TypePointer Input 8(fvec4)
|
||||
12(BaseColor): 11(ptr) Variable Input
|
||||
17: TypeBool
|
||||
18: 17(bool) ConstantTrue
|
||||
18: TypeBool
|
||||
19: 18(bool) ConstantTrue
|
||||
24: TypePointer UniformConstant 7(float)
|
||||
25(d): 24(ptr) Variable UniformConstant
|
||||
29: TypePointer UniformConstant 8(fvec4)
|
||||
30(bigColor): 29(ptr) Variable UniformConstant
|
||||
34: 17(bool) ConstantFalse
|
||||
34: 18(bool) ConstantFalse
|
||||
35: TypePointer Output 8(fvec4)
|
||||
36(gl_FragColor): 35(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
@@ -42,22 +42,22 @@ Linked fragment stage:
|
||||
Store 10(color) 13
|
||||
Branch 14
|
||||
14: Label
|
||||
16: 17(bool) Phi 18 5 34 20
|
||||
17: 18(bool) Phi 19 5 34 16
|
||||
LoopMerge 15 None
|
||||
Branch 19
|
||||
19: Label
|
||||
SelectionMerge 20 None
|
||||
BranchConditional 16 20 21
|
||||
Branch 20
|
||||
20: Label
|
||||
SelectionMerge 16 None
|
||||
BranchConditional 17 16 21
|
||||
21: Label
|
||||
22: 8(fvec4) Load 10(color)
|
||||
23: 7(float) CompositeExtract 22 0
|
||||
26: 7(float) Load 25(d)
|
||||
27: 17(bool) FOrdLessThan 23 26
|
||||
27: 18(bool) FOrdLessThan 23 26
|
||||
SelectionMerge 28 None
|
||||
BranchConditional 27 28 15
|
||||
28: Label
|
||||
Branch 20
|
||||
20: Label
|
||||
Branch 16
|
||||
16: Label
|
||||
31: 8(fvec4) Load 30(bigColor)
|
||||
32: 8(fvec4) Load 10(color)
|
||||
33: 8(fvec4) FAdd 32 31
|
||||
|
||||
Reference in New Issue
Block a user