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:
@@ -14,7 +14,7 @@ Linked fragment stage:
|
||||
Name 4 "main"
|
||||
Name 10 "color"
|
||||
Name 12 "BaseColor"
|
||||
Name 19 "d"
|
||||
Name 20 "d"
|
||||
Name 25 "bigColor"
|
||||
Name 30 "gl_FragColor"
|
||||
Decorate 12(BaseColor) Smooth
|
||||
@@ -26,9 +26,9 @@ Linked fragment stage:
|
||||
9: TypePointer Function 8(fvec4)
|
||||
11: TypePointer Input 8(fvec4)
|
||||
12(BaseColor): 11(ptr) Variable Input
|
||||
18: TypePointer UniformConstant 7(float)
|
||||
19(d): 18(ptr) Variable UniformConstant
|
||||
21: TypeBool
|
||||
19: TypePointer UniformConstant 7(float)
|
||||
20(d): 19(ptr) Variable UniformConstant
|
||||
22: TypeBool
|
||||
24: TypePointer UniformConstant 8(fvec4)
|
||||
25(bigColor): 24(ptr) Variable UniformConstant
|
||||
29: TypePointer Output 8(fvec4)
|
||||
@@ -40,13 +40,13 @@ Linked fragment stage:
|
||||
Store 10(color) 13
|
||||
Branch 14
|
||||
14: Label
|
||||
16: 8(fvec4) Load 10(color)
|
||||
17: 7(float) CompositeExtract 16 0
|
||||
20: 7(float) Load 19(d)
|
||||
22: 21(bool) FOrdLessThan 17 20
|
||||
17: 8(fvec4) Load 10(color)
|
||||
18: 7(float) CompositeExtract 17 0
|
||||
21: 7(float) Load 20(d)
|
||||
23: 22(bool) FOrdLessThan 18 21
|
||||
LoopMerge 15 None
|
||||
BranchConditional 22 23 15
|
||||
23: Label
|
||||
BranchConditional 23 16 15
|
||||
16: Label
|
||||
26: 8(fvec4) Load 25(bigColor)
|
||||
27: 8(fvec4) Load 10(color)
|
||||
28: 8(fvec4) FAdd 27 26
|
||||
|
||||
Reference in New Issue
Block a user