[Mesa-dev] [PATCH 1/7] gallium: add CONSTBUF type to tgsi_file_type

Roland Scheidegger sroland at vmware.com
Tue Aug 22 14:51:16 UTC 2017


I am probably missing something here, but why do you need a new register
file? Since you couldn't use LOAD with TGSI_FILE_CONSTANT before, can't
you just allow LOAD with TGSI_FILE_CONSTANT and achieve the same thing?
Or do you need to know how it's going to be accessed in advance?

Roland

Am 22.08.2017 um 14:14 schrieb Timothy Arceri:
> This will be use to distinguish between load types when using
> the TGSI_OPCODE_LOAD opcode.
> ---
>  src/gallium/auxiliary/tgsi/tgsi_strings.c  | 1 +
>  src/gallium/include/pipe/p_shader_tokens.h | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
> index 7ce12d3655..0872db9ce8 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
> @@ -50,20 +50,21 @@ static const char *tgsi_file_names[] =
>     "OUT",
>     "TEMP",
>     "SAMP",
>     "ADDR",
>     "IMM",
>     "SV",
>     "IMAGE",
>     "SVIEW",
>     "BUFFER",
>     "MEMORY",
> +   "CONSTBUF",
>  };
>  
>  const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
>  {
>     "POSITION",
>     "COLOR",
>     "BCOLOR",
>     "FOG",
>     "PSIZE",
>     "GENERIC",
> diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
> index aa0fb3e3b3..f9cb6183ce 100644
> --- a/src/gallium/include/pipe/p_shader_tokens.h
> +++ b/src/gallium/include/pipe/p_shader_tokens.h
> @@ -67,20 +67,21 @@ enum tgsi_file_type {
>     TGSI_FILE_OUTPUT,
>     TGSI_FILE_TEMPORARY,
>     TGSI_FILE_SAMPLER,
>     TGSI_FILE_ADDRESS,
>     TGSI_FILE_IMMEDIATE,
>     TGSI_FILE_SYSTEM_VALUE,
>     TGSI_FILE_IMAGE,
>     TGSI_FILE_SAMPLER_VIEW,
>     TGSI_FILE_BUFFER,
>     TGSI_FILE_MEMORY,
> +   TGSI_FILE_CONSTBUF,
>     TGSI_FILE_COUNT,      /**< how many TGSI_FILE_ types */
>  };
>  
>  
>  #define TGSI_WRITEMASK_NONE     0x00
>  #define TGSI_WRITEMASK_X        0x01
>  #define TGSI_WRITEMASK_Y        0x02
>  #define TGSI_WRITEMASK_XY       0x03
>  #define TGSI_WRITEMASK_Z        0x04
>  #define TGSI_WRITEMASK_XZ       0x05
> 



More information about the mesa-dev mailing list