[Mesa-dev] [PATCH 2/2] gallium/tgsi: s/TGSI_BUFFER/TGSI_TEXTURE_BUFFER/

Francisco Jerez currojerez at riseup.net
Fri May 11 07:03:48 PDT 2012


jfonseca at vmware.com writes:

> From: José Fonseca <jfonseca at vmware.com>
>
> For consistency.

I'm OK with this change, but, just so that you know, the only reason I
called it TGSI_BUFFER instead of TGSI_TEXTURE_BUFFER was to keep it
consistent with the pipe_texture_target enumeration.

> ---
>  src/gallium/auxiliary/tgsi/tgsi_build.c            |    4 ++--
>  .../drivers/nv50/codegen/nv50_ir_from_tgsi.cpp     |    3 +--
>  src/gallium/include/pipe/p_shader_tokens.h         |    2 +-
>  3 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
> index 869faa1..1c24b9b 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_build.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
> @@ -259,7 +259,7 @@ tgsi_default_declaration_resource(void)
>  {
>     struct tgsi_declaration_resource dr;
>  
> -   dr.Resource = TGSI_BUFFER;
> +   dr.Resource = TGSI_TEXTURE_BUFFER;
>     dr.Raw = 0;
>     dr.Writable = 0;
>  
> @@ -290,7 +290,7 @@ tgsi_default_declaration_sampler_view(void)
>  {
>     struct tgsi_declaration_sampler_view dsv;
>  
> -   dsv.Resource = TGSI_BUFFER;
> +   dsv.Resource = TGSI_TEXTURE_BUFFER;
>     dsv.ReturnTypeX = PIPE_TYPE_UNORM;
>     dsv.ReturnTypeY = PIPE_TYPE_UNORM;
>     dsv.ReturnTypeZ = PIPE_TYPE_UNORM;
> diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
> index ba08493..16f191d 100644
> --- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
> +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
> @@ -347,8 +347,7 @@ static nv50_ir::TexTarget translateTexture(uint tex)
>     NV50_IR_TEX_TARG_CASE(SHADOW2D_ARRAY, 2D_ARRAY_SHADOW);
>     NV50_IR_TEX_TARG_CASE(SHADOWCUBE, CUBE_SHADOW);
>     NV50_IR_TEX_TARG_CASE(SHADOWRECT, RECT_SHADOW);
> -   case TGSI_BUFFER:
> -      return nv50_ir::TEX_TARGET_BUFFER;
> +   NV50_IR_TEX_TARG_CASE(BUFFER, BUFFER);
>  
>     case TGSI_TEXTURE_UNKNOWN:
>     default:
> diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
> index 615a89a..6b58293 100644
> --- a/src/gallium/include/pipe/p_shader_tokens.h
> +++ b/src/gallium/include/pipe/p_shader_tokens.h
> @@ -490,7 +490,7 @@ struct tgsi_instruction_label
>     unsigned Padding  : 8;
>  };
>  
> -#define TGSI_BUFFER                 0
> +#define TGSI_TEXTURE_BUFFER         0
>  #define TGSI_TEXTURE_1D             1
>  #define TGSI_TEXTURE_2D             2
>  #define TGSI_TEXTURE_3D             3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120511/d86efe33/attachment.pgp>


More information about the mesa-dev mailing list