<br><br><div class="gmail_quote">On 8 September 2011 18:06, Eric Anholt <span dir="ltr">&lt;<a href="mailto:eric@anholt.net">eric@anholt.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, 08 Sep 2011 12:57:31 -0700, Ian Romanick &lt;<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>&gt; wrote:<br>
&gt; -----BEGIN PGP SIGNED MESSAGE-----<br>
&gt; Hash: SHA1<br>
&gt;<br>
&gt; On 09/07/2011 12:51 PM, Eric Anholt wrote:<br>
&gt; &gt; Previously, it would produce:<br>
&gt; &gt;<br>
&gt; &gt; Failed to compile FS: 0:6(7): error: non-lvalue in assignment<br>
&gt; &gt;<br>
&gt; &gt; and now it produces:<br>
&gt; &gt;<br>
&gt; &gt; Failed to compile FS: 0:5(7): error: whole array assignment is not<br>
&gt; &gt; allowed in GLSL 1.10 or GLSL ES 1.00.<br>
&gt; &gt;<br>
&gt; &gt; Also, add spec quotation to the two places we have code for array<br>
&gt; &gt; lvalues in GLSL 1.10.<br>
&gt;<br>
&gt; There are two places in the code that use is_lvalue.  One is in<br>
&gt; do_assignment, and the other is in match_function_by_name (for out and<br>
&gt; inout parameters).  Since we&#39;ve already special case handle whole<br>
&gt; arrays in do_assignment, I think we should do the same in<br>
&gt; match_function_by_name and remove array_lvalue.<br>
&gt;<br>
&gt; In particular, I think we should check that out and inout parameters<br>
&gt; can be arrays when processing the function prototype.  That should be<br>
&gt; valid (and &quot;just work&quot;) in everything except desktop GLSL 1.10.  Right?<br>
&gt;<br>
&gt; That may be a reasonable thing to do as a follow-on patch...<br></div></blockquote><div><br></div><div>Call me crazy, but I would have sworn that we agreed on this plan when the three of us talked in person on Wednesday.  In any case, I&#39;m glad to have the discussion on list, and I agree 100% with this plan.  Some of my work on gl_ClipDistance is currently blocked because array_lvalue is set incorrectly for built-in arrays, and Ian&#39;s proposal for eliminating array_lvalue seems like the best way to fix it.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
</div>Paul said he needed to do some work on array_lvalue, so I&#39;m leaving that<br>
up to him in a followup patch.  I do agree that just doing it in<br>
function parameter handling sounds better than the way we&#39;ve got it<br>
wired up today.<br></blockquote><div><br></div><div>I don&#39;t have any work I need to do on array_lvalue other than the work we are discussing in this thread.  I currently have the greatest need for this change (since it&#39;s blocking my gl_ClipDistance work) so I&#39;ll take it as my task unless I hear otherwise.  But if either of the two of you would rather do it just say so--you both are way more familiar with the code base than I am and can probably do it much faster than I can.</div>
</div>