[Mesa-dev] [PATCH 06/10] gallium: swap TGSI_PROCESSOR_VERTEX and TGSI_PROCESSOR_FRAGMENT

José Fonseca jfonseca at vmware.com
Mon Sep 6 07:19:59 PDT 2010


Luca,

I think this is not a worthwhile change, at least not by itself.

First, this will cause the binary TGSI representation to change, and can
break some code which expects this particular ordering. For example, you
forgot to update tgsi_dump.c's processor_type_names[] array. And there
might be more. (And we'll have to review all private branches and update
them for this).

Furthermore, if the idea is to make PIPE_PROCESSOR_* and
TGSI_PROCESSOR_* match, then the first thing that comes to mind is: why
do we need two equal named enums? If we're going through the trouble of
changing this, then IMO, the change should be to delete one of these
enums.

Jose


On Sun, 2010-09-05 at 18:30 -0700, Luca Barbieri wrote:
> These didn't match PIPE_SHADER_*, and it seems much better to make
> all such indices match.
> 
> Vertex is first because cards with vertex shaders came first.
> ---
>  src/gallium/include/pipe/p_shader_tokens.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
> index c4bd17e..636e7f0 100644
> --- a/src/gallium/include/pipe/p_shader_tokens.h
> +++ b/src/gallium/include/pipe/p_shader_tokens.h
> @@ -40,8 +40,8 @@ struct tgsi_header
>     unsigned BodySize   : 24;
>  };
>  
> -#define TGSI_PROCESSOR_FRAGMENT  0
> -#define TGSI_PROCESSOR_VERTEX    1
> +#define TGSI_PROCESSOR_VERTEX    0
> +#define TGSI_PROCESSOR_FRAGMENT  1
>  #define TGSI_PROCESSOR_GEOMETRY  2
>  
>  struct tgsi_processor




More information about the mesa-dev mailing list