You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code vec4 main() { vec4 bb; return bb; }
minimizes to vec4 main(){return bb;}
The original is clearly bad code but according to the spec is legal with undefined results.
The minimized version is not legal glsl and will not compile.
I had much more complicated (autogenerated) code where the result was well-defined despite the uninitialized variables.
I don't think it worth posting that here, but could if it helped.
* Stop removing side-effecting init of unused locals.
* Stop removing unassigned-but-used locals.
This is accomplished by moving the unassigned removal from the "simple" inlining to the "safe" inlining.
Very helpful project, thank you.
The code
vec4 main() { vec4 bb; return bb; }
minimizes to
vec4 main(){return bb;}
The original is clearly bad code but according to the spec is legal with undefined results.
The minimized version is not legal glsl and will not compile.
I had much more complicated (autogenerated) code where the result was well-defined despite the uninitialized variables.
I don't think it worth posting that here, but could if it helped.
slightly related to #153
The text was updated successfully, but these errors were encountered: