yeah, I'll probably end up pushing it together w/ freedreno/ir3
patches using it..  but that is a good point about garbage collecting
existing open-coded versions of this.. I guess I should do that
anyways.

BR,
-R


On Mon, Apr 27, 2015 at 3:11 PM, Connor Abbott <cwabbo...@gmail.com> wrote:
> When you push this, can you make sure there are users for it so it
> isn't just dead code? Either in your driver, or there are probably
> several places in core NIR where we currently open-code this.
> Otherwise,
>
> Reviewed-by: Connor Abbott <cwabbo...@gmail.com>
>
> On Mon, Apr 27, 2015 at 3:05 PM, Rob Clark <robdcl...@gmail.com> wrote:
>> From: Rob Clark <robcl...@freedesktop.org>
>>
>> I need something like this in a couple places.  And didn't see anything
>> like it anywhere.
>>
>> Signed-off-by: Rob Clark <robcl...@freedesktop.org>
>> ---
>>  src/glsl/nir/nir.h | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
>> index 98b0ec3..3a96d56 100644
>> --- a/src/glsl/nir/nir.h
>> +++ b/src/glsl/nir/nir.h
>> @@ -506,6 +506,15 @@ typedef struct {
>>     bool is_ssa;
>>  } nir_dest;
>>
>> +static inline unsigned
>> +nir_dest_num_components(nir_dest *dest)
>> +{
>> +   if (dest->is_ssa)
>> +      return dest->ssa.num_components;
>> +   else
>> +      return dest->reg.reg->num_components;
>> +}
>> +
>>  static inline nir_src
>>  nir_src_for_ssa(nir_ssa_def *def)
>>  {
>> --
>> 2.3.5
>>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to