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

2010-08-09 Thread Aras Pranckevicius
>
> > 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.
>

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
__retval.


-- 
Aras Pranckevičius
work: http://unity3d.com
home: http://aras-p.info
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2010-08-09 Thread Eric Anholt
On Mon, 9 Aug 2010 11:22:16 +0300, Aras Pranckevicius  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.


pgpky4eQM6Rby.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2010-08-09 Thread Aras Pranckevicius
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.


-- 
Aras Pranckevičius
work: http://unity3d.com
home: http://aras-p.info


do-not-use-__retval-name.patch
Description: Binary data
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev