[Mesa-dev] [PATCH 00/12] Death to array dereferences of vectors!

Ian Romanick idr at freedesktop.org
Tue Apr 9 15:11:55 PDT 2013


On 04/09/2013 10:49 AM, Eric Anholt wrote:
> Ian Romanick <idr at freedesktop.org> writes:
>
>> This series gradually replaces array dereferences of vectors with two
>> expressions.  It takes so many patches because changes are needed to the
>> existing lowering passes and because several places in the code generate
>> array dereferences of vectors (e.g., lowering accessed to
>> gl_ClipDistance).  There is also some challenge in dealing with function
>> inout parameters that are indexed vectors.
>>
>> The two new expressions are ir_binop_vector_extract and
>> ir_triop_vector_insert.  The former has a vector operand and a scalar
>> operand.  The result is the scalar value from the vector specified by
>> the scalar.  The later takes a vector and two scalars.  The result is a
>> new vector with one indexed field replaced by a scalar value.
>>
>> Together this series fixes piglit tests glsl-vs-channel-overwrite-01 and
>> glsl-vs-channel-overwrite-03.
>
> Throughout the series, there's a bunch of introduction of new tabs for
> indentation.  Paul pointed out long ago that the devinfo.html had
> specified a no-tabs indent style in the indent command since 2006, and I
> found that basically you and I were the only ones putting tabs in, so I
> stopped.  I've found reading diffs has become easier since avoiding
> tabs, since you don't get diffs with apparently-incorrect indentation
> (thanks to "> +" being 3 sharacters, in particular).

Yeah... I agree 100%, and I thought I had fixed that. :(  It seems like 
emacs gets confused when editing code areas that use tabs.  I'm honestly 
not sure what the deal is, but I'll go back and fix that before pushing. 
  Thanks for pointing it out... I didn't notice. :(

> I'd love to see this code fixed to not use tabs.  If you use emacs,
> removing your custom configuration for Mesa and relying on
> .dir-locals.el will get you the preferred style for future work.
>
> Other than that, the patches other than the ones I commented on and the
> gl_ClipDistance ones are:
>
> Reviewed-by: Eric Anholt <eric at anholt.net>
>



More information about the mesa-dev mailing list