[Mesa-dev] [PATCH] glsl2: do not create __retval names (two underscores is a reserved name)
aras at unity3d.com
Mon Aug 9 12:00:55 PDT 2010
> > Attached patch changes __retval variable to _ret_val. According to GLSL
> > spec, "all identifiers containing two consecutive underscores are
> > as possible future keywords". Windows Radeon 5xxx drivers actually
> > about this case.
> You definitely need something to process names to produce unique, safe
> names for usage in your GLSL-to-GLSL compiler. The names used
> internally in the compiler are not unique or safe to use as identifiers
> in GLSL.
Yeah, I realized that patch is not directly related to Mesa just after
sending it. Oh well.
Otherwise, I do explicitly unique-ify the names in my GLSL-to-GLSL compiler
fork (e.g. append unique postfixes to local variables after inlining, etc.).
I haven't ran into other issues yet, except this double underscore thing in
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev