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:
@@ -27,8 +27,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 1
|
||||
21: TypePointer Input 7(int)
|
||||
22(gl_VertexID): 21(ptr) Variable Input
|
||||
@@ -39,11 +39,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
|
||||
18: 7(int) Load 9(i)
|
||||
20: 7(int) IAdd 18 19
|
||||
Store 9(i) 20
|
||||
|
||||
Reference in New Issue
Block a user