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
This is relatively simple and straightforward.
Note that this is much more permissive than GLSL compilers seem to be;
for example I'm pretty sure this will allow much more in a case label
than it should (I think a literal int must come after). But I don't
think it will cause the minifier to emit invalid GLSL unless the input
was invalid already.
It's actually somewhat unclear what the right grammar even is here.
Looking at the 4.5 spec linked in laurentlb#18 -- section 9 (the normative
grammar), page 205 says that a `case_label` is `CASE expression COLON`,
but from testing with an actual compiler it looks like it needs to be a
literal integer. Also the definition of `switch_statement_list` doesn't
include `case_label`. So by my reading that's a bug in the spec (or at
least a place that compilers are quite reasonably more restrictive) so
even if we did want to be perfectly correct here I'm not sure what
exactly that looks like :)
Fixeslaurentlb#18.
Apparently, some people use them. :)
The exact grammar is in the spec: https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.4.50.pdf
The text was updated successfully, but these errors were encountered: