Turn on SpecConstantOpMode based on node qualifier
Move SpecConstantOpModeGuard from makeSpvConstantFromConstSubTree() to visitbinary() and visitunary(). Checking if the visiting node is a spec constants, if so, turn on the SpecConstantOpMode, otherwise, stay in the normal mode.
This commit is contained in:
@@ -39,16 +39,16 @@ Linked compute stage:
|
||||
15: TypeVector 6(int) 3
|
||||
16: 15(ivec3) SpecConstantComposite 12 13 14
|
||||
17: 6(int) Constant 0
|
||||
18: 6(int) SpecConstantOp 81 16 0
|
||||
19: 6(int) Constant 1
|
||||
20: 6(int) SpecConstantOp 81 16 1(GLSL.std.450)
|
||||
21: 6(int) SpecConstantOp 132 18 20
|
||||
22: 6(int) Constant 2
|
||||
23: 6(int) SpecConstantOp 81 16 2
|
||||
24: 6(int) SpecConstantOp 132 21 23
|
||||
25: TypePointer Uniform 6(int)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
18: 6(int) CompositeExtract 16 0
|
||||
20: 6(int) CompositeExtract 16 1
|
||||
21: 6(int) IMul 18 20
|
||||
23: 6(int) CompositeExtract 16 2
|
||||
24: 6(int) IMul 21 23
|
||||
26: 25(ptr) AccessChain 9(bi) 11
|
||||
Store 26 24
|
||||
Return
|
||||
|
||||
Reference in New Issue
Block a user