[Mesa-dev] [PATCH] tgsi: remove ureg_label_insn

Roland Scheidegger sroland at vmware.com
Fri Feb 10 19:21:32 UTC 2017


Err, "required" maybe isn't the right word. But nonetheless this helper
simplifies translation nicely - you can just do something like
ureg_label_insn(ureg, TGSI_OPCODE_CAL, 0, 0, &tgsi_label);
without having to worry about doing all that stuff yourself.

Roland

Am 10.02.2017 um 20:03 schrieb Roland Scheidegger:
> Sorry that I didn't catch that earlier, but I'll have to revert this.
> This is required when dealing with the TGSI_OPCODE_CAL (and
> TGSI_OPCODE_CALLNZ, albeit we don't actually need the latter and I don't
> think anyone implements that, since we just emit a uif/cal/endif instead).
> This corresponds to the d3d shader model 4 (and older actually) call
> instruction:
> https://msdn.microsoft.com/en-us/library/windows/desktop/hh446849(v=vs.85).aspx
> But yes, TGSI_OPCODE_CAL isn't used by st/mesa.
> 
> Roland
> 
> 
> Am 09.02.2017 um 15:36 schrieb marcandre.lureau at redhat.com:
>> From: Marc-André Lureau <marcandre.lureau at redhat.com>
>>
>> Unused since commit 2897cb3dba9287011f9c43cd2f214100952370c0.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
>> ---
>>  src/gallium/auxiliary/tgsi/tgsi_ureg.c | 31 -------------------------------
>>  src/gallium/auxiliary/tgsi/tgsi_ureg.h |  7 -------
>>  2 files changed, 38 deletions(-)
>>
>> diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
>> index 196a893b75..8d1b6cc7da 100644
>> --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
>> +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
>> @@ -1488,37 +1488,6 @@ ureg_tex_insn(struct ureg_program *ureg,
>>  
>>  
>>  void
>> -ureg_label_insn(struct ureg_program *ureg,
>> -                unsigned opcode,
>> -                const struct ureg_src *src,
>> -                unsigned nr_src,
>> -                unsigned *label_token )
>> -{
>> -   struct ureg_emit_insn_result insn;
>> -   unsigned i;
>> -
>> -   insn = ureg_emit_insn(ureg,
>> -                         opcode,
>> -                         FALSE,
>> -                         FALSE,
>> -                         FALSE,
>> -                         TGSI_SWIZZLE_X,
>> -                         TGSI_SWIZZLE_Y,
>> -                         TGSI_SWIZZLE_Z,
>> -                         TGSI_SWIZZLE_W,
>> -                         0,
>> -                         nr_src);
>> -
>> -   ureg_emit_label( ureg, insn.extended_token, label_token );
>> -
>> -   for (i = 0; i < nr_src; i++)
>> -      ureg_emit_src( ureg, src[i] );
>> -
>> -   ureg_fixup_insn_size( ureg, insn.insn_token );
>> -}
>> -
>> -
>> -void
>>  ureg_memory_insn(struct ureg_program *ureg,
>>                   unsigned opcode,
>>                   const struct ureg_dst *dst,
>> diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
>> index 51f69853b7..99908d9ce0 100644
>> --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
>> +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
>> @@ -571,13 +571,6 @@ ureg_tex_insn(struct ureg_program *ureg,
>>  
>>  
>>  void
>> -ureg_label_insn(struct ureg_program *ureg,
>> -                unsigned opcode,
>> -                const struct ureg_src *src,
>> -                unsigned nr_src,
>> -                unsigned *label);
>> -
>> -void
>>  ureg_memory_insn(struct ureg_program *ureg,
>>                   unsigned opcode,
>>                   const struct ureg_dst *dst,
>>
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list