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 body of a do-while loop introduces a new scope lasting only between the do and while (not including the while test
expression), whether or not the body is simple or compound:
int i = 17;
do
int i = 4; // okay, in nested scope_
while (i == 0); // i is 17, scoped outside the do-while body
However, when trying to compile this very code from the specification, glslangValidator produces a compilation error:
Page 45 of the GLSL 4.60.7 specification says:
However, when trying to compile this very code from the specification,
glslangValidator
produces a compilation error:I discovered this while discussing another related issue in Mesa in https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/569. As far as I can tell, NVIDIA closed-source drivers correctly compile this code.
The text was updated successfully, but these errors were encountered: