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

2017-02-10 Thread Roland Scheidegger
Am 10.02.2017 um 20:23 schrieb Emil Velikov:
> On 10 February 2017 at 19:03, Roland Scheidegger  wrote:
>> 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:
>> But yes, TGSI_OPCODE_CAL isn't used by st/mesa.
>>
> Do add a note (used by XXX) to deter people from nuking it ;-)

Actually on closer look it seems it's not really needed. Since we only
used it for TGSI_OPCODE_CAL we can just use ureg_CAL instead which will
do exactly the same thing (this is also what nine does).
So, I'm not reverting it after all.

Roland

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-02-10 Thread Emil Velikov
On 10 February 2017 at 19:03, Roland Scheidegger  wrote:
> 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.
>
Do add a note (used by XXX) to deter people from nuking it ;-)

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-02-10 Thread Roland Scheidegger
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, _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.lur...@redhat.com:
>> From: Marc-André Lureau 
>>
>> Unused since commit 2897cb3dba9287011f9c43cd2f214100952370c0.
>>
>> Signed-off-by: Marc-André Lureau 
>> ---
>>  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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-02-10 Thread 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.lur...@redhat.com:
> From: Marc-André Lureau 
> 
> Unused since commit 2897cb3dba9287011f9c43cd2f214100952370c0.
> 
> Signed-off-by: Marc-André Lureau 
> ---
>  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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-02-10 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Thu, Feb 9, 2017 at 3:36 PM,   wrote:
> From: Marc-André Lureau 
>
> Unused since commit 2897cb3dba9287011f9c43cd2f214100952370c0.
>
> Signed-off-by: Marc-André Lureau 
> ---
>  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,
> --
> 2.11.0.295.gd7dffce1c.dirty
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-02-09 Thread marcandre . lureau
From: Marc-André Lureau 

Unused since commit 2897cb3dba9287011f9c43cd2f214100952370c0.

Signed-off-by: Marc-André Lureau 
---
 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,
-- 
2.11.0.295.gd7dffce1c.dirty

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev