gallium/tgsi: Define the TGSI_BUFFER texture target.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 30 Apr 2012 16:28:36 +0000 (18:28 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 11 May 2012 10:39:40 +0000 (12:39 +0200)
This texture type was already referred to by the documentation but it
was never defined.  Define it as 0 to match the pipe_texture_target
enumeration values.

src/gallium/auxiliary/tgsi/tgsi_build.c
src/gallium/auxiliary/tgsi/tgsi_strings.c
src/gallium/auxiliary/util/u_blitter.c
src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
src/gallium/include/pipe/p_shader_tokens.h

index b4f50038beddbda4bad8e55e83dd05f4b1b53ebe..1bcdef2e2f25c70814a11b7e1b8d9f8ae11d9067 100644 (file)
@@ -709,7 +709,7 @@ tgsi_default_instruction_texture( void )
 {
    struct tgsi_instruction_texture instruction_texture;
 
-   instruction_texture.Texture = TGSI_TEXTURE_UNKNOWN;
+   instruction_texture.Texture = TGSI_BUFFER;
    instruction_texture.NumOffsets = 0;
    instruction_texture.Padding = 0;
 
index 3c7ab3b1657c7229f81a719e29c07f690449bb4c..1d959b6e0e901efee2060a88245ddc0f99ae4335 100644 (file)
@@ -79,7 +79,7 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
 
 const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
 {
-   "UNKNOWN",
+   "BUFFER",
    "1D",
    "2D",
    "3D",
index d0b9187d1f9c7acc7558eb97359d1eb964e13fec..28e73832540b50cdc74d551197816a6df4ab2467 100644 (file)
@@ -674,7 +674,7 @@ pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target)
       return TGSI_TEXTURE_2D_ARRAY;
    default:
       assert(0 && "unexpected texture target");
-      return TGSI_TEXTURE_UNKNOWN;
+      return 0;
    }
 }
 
index 6d0147bc53fe68975633fd7515817e9f5b1ca1c7..955eb92ec3cefe8fa712b14f490ca68237f67540 100644 (file)
@@ -347,8 +347,8 @@ 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_TEXTURE_UNKNOWN:
+   case TGSI_BUFFER:
+      return nv50_ir::TEX_TARGET_BUFFER;
    default:
       assert(!"invalid texture target");
       return nv50_ir::TEX_TARGET_2D;
index 3c970723d35af44e8cd449565ce0b4d2bf133583..a62d7a2b94debefc88fdd5e328d57e76edd4e8c9 100644 (file)
@@ -466,7 +466,7 @@ struct tgsi_instruction_label
    unsigned Padding  : 8;
 };
 
-#define TGSI_TEXTURE_UNKNOWN        0
+#define TGSI_BUFFER                 0
 #define TGSI_TEXTURE_1D             1
 #define TGSI_TEXTURE_2D             2
 #define TGSI_TEXTURE_3D             3