[Mesa-dev] [PATCH] glsl2: do not create __retval names (two underscores is a reserved name)

Eric Anholt eric at anholt.net
Mon Aug 9 11:04:41 PDT 2010

On Mon, 9 Aug 2010 11:22:16 +0300, Aras Pranckevicius <aras at unity3d.com> wrote:
> Hi,
> Attached patch changes __retval variable to _ret_val. According to GLSL
> spec, "all identifiers containing two consecutive underscores are reserved
> as possible future keywords". Windows Radeon 5xxx drivers actually complain
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100809/9657424b/attachment.pgp>

More information about the mesa-dev mailing list