[Mesa-stable] [Mesa-dev] [PATCH 1/2] glsl: Add is_horizontal() method to ir_expression.
Matt Turner
mattst88 at gmail.com
Mon Feb 24 10:02:59 PST 2014
On Mon, Feb 24, 2014 at 9:43 AM, Ian Romanick <idr at freedesktop.org> wrote:
> On 02/22/2014 04:35 PM, Matt Turner wrote:
>>
>> Cc: "10.1" <mesa-stable at lists.freedesktop.org>
>> ---
>> src/glsl/ir.h | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/src/glsl/ir.h b/src/glsl/ir.h
>> index e27e30a..55ec5ff 100644
>> --- a/src/glsl/ir.h
>> +++ b/src/glsl/ir.h
>> @@ -1458,6 +1458,16 @@ public:
>> }
>>
>> /**
>> + * Return whether the expression operates on vectors horizontally.
>> + */
>> + bool is_horizontal() const
>> + {
>> + return operation == ir_binop_all_equal ||
>> + operation == ir_binop_any_nequal ||
>> + operation == ir_binop_dot;
>
>
> I'm pretty sure ir_unop_any should also be in this list I also wonder a bit
> about the various pack / unpack opcodes. Maybe ir_quadop_vector too, but we
> get rid of most of those.
Yeah, ir_unop_any definitely should. I'll add quadop_vector as well. I
think all of the pack / unpack opcodes are safe though, after
reminding myself what the split opcodes do.
More information about the mesa-stable
mailing list