[Mesa-dev] [PATCH] glsl: Clarify error message about whole-array assignment in GLSL 1.10.

Eric Anholt eric at anholt.net
Thu Sep 8 18:06:39 PDT 2011


On Thu, 08 Sep 2011 12:57:31 -0700, Ian Romanick <idr at freedesktop.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 09/07/2011 12:51 PM, Eric Anholt wrote:
> > Previously, it would produce:
> > 
> > Failed to compile FS: 0:6(7): error: non-lvalue in assignment
> > 
> > and now it produces:
> > 
> > Failed to compile FS: 0:5(7): error: whole array assignment is not 
> > allowed in GLSL 1.10 or GLSL ES 1.00.
> > 
> > Also, add spec quotation to the two places we have code for array 
> > lvalues in GLSL 1.10.
> 
> There are two places in the code that use is_lvalue.  One is in
> do_assignment, and the other is in match_function_by_name (for out and
> inout parameters).  Since we've already special case handle whole
> arrays in do_assignment, I think we should do the same in
> match_function_by_name and remove array_lvalue.
> 
> In particular, I think we should check that out and inout parameters
> can be arrays when processing the function prototype.  That should be
> valid (and "just work") in everything except desktop GLSL 1.10.  Right?
> 
> That may be a reasonable thing to do as a follow-on patch...

Paul said he needed to do some work on array_lvalue, so I'm leaving that
up to him in a followup patch.  I do agree that just doing it in
function parameter handling sounds better than the way we've got it
wired up today.
-------------- 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/20110908/6af5b3bf/attachment.pgp>


More information about the mesa-dev mailing list