Previously, we used SSA for variables where possible, which I believed to have performance benefits, which is likely not the case, because compiling glsl to spirv uses OpVariable for variables. It also had some minor other advantages, but resolving which variables names could be done with SSA and which needed variables is tricky and error-prone. So this changes that.
Some side effects:
Annotations for variable names are now also visible in SpirV.
You can now no longer use a single variable to store objects of different types. This deviates from Python, so maybe this will be "fixed" later. Let's see how this goes.
Doing x = a or b was prohibited, but is now enabled. It results in a real logical or (instead of control flow)! And you can trigger it in an if by doing if (a or b) vs if a or b.
Previously, we used SSA for variables where possible, which I believed to have performance benefits, which is likely not the case, because compiling glsl to spirv uses
OpVariable
for variables. It also had some minor other advantages, but resolving which variables names could be done with SSA and which needed variables is tricky and error-prone. So this changes that.Some side effects:
x = a or b
was prohibited, but is now enabled. It results in a real logical or (instead of control flow)! And you can trigger it in an if by doingif (a or b)
vsif a or b
.