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:
@@ -29,8 +29,8 @@ Linked vertex stage:
|
||||
7: TypeInt 32 1
|
||||
8: TypePointer Function 7(int)
|
||||
10: 7(int) Constant 0
|
||||
14: 7(int) Constant 10
|
||||
15: TypeBool
|
||||
15: 7(int) Constant 10
|
||||
16: TypeBool
|
||||
19: 7(int) Constant 12
|
||||
21: 7(int) Constant 1
|
||||
23: TypePointer Input 7(int)
|
||||
@@ -43,11 +43,11 @@ Linked vertex stage:
|
||||
Store 9(i) 10
|
||||
Branch 11
|
||||
11: Label
|
||||
13: 7(int) Load 9(i)
|
||||
16: 15(bool) SLessThan 13 14
|
||||
14: 7(int) Load 9(i)
|
||||
17: 16(bool) SLessThan 14 15
|
||||
LoopMerge 12 None
|
||||
BranchConditional 16 17 12
|
||||
17: Label
|
||||
BranchConditional 17 13 12
|
||||
13: Label
|
||||
Store 18(j) 19
|
||||
20: 7(int) Load 9(i)
|
||||
22: 7(int) IAdd 20 21
|
||||
|
||||
Reference in New Issue
Block a user