New ATTRIB interpolation type for vertex program inputs/declarations.
authorBrian <brian.paul@tungstengraphics.com>
Tue, 9 Oct 2007 20:36:14 +0000 (14:36 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 9 Oct 2007 20:36:14 +0000 (14:36 -0600)
src/mesa/pipe/tgsi/exec/tgsi_build.c
src/mesa/pipe/tgsi/exec/tgsi_dump.c
src/mesa/pipe/tgsi/exec/tgsi_token.h
src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c

index 78f648a..5682772 100755 (executable)
@@ -294,7 +294,7 @@ tgsi_build_declaration_interpolation(
 {
    struct tgsi_declaration_interpolation di;
 
-   assert( interpolate <= TGSI_INTERPOLATE_PERSPECTIVE );
+   assert( interpolate <= TGSI_INTERPOLATE_ATTRIB );
 
    di = tgsi_default_declaration_interpolation();
    di.Interpolate = interpolate;
index c179659..463f841 100755 (executable)
@@ -189,14 +189,16 @@ static const char *TGSI_INTERPOLATES[] =
 {
    "INTERPOLATE_CONSTANT",
    "INTERPOLATE_LINEAR",
-   "INTERPOLATE_PERSPECTIVE"
+   "INTERPOLATE_PERSPECTIVE",
+   "INTERPOLATE_ATTRIB"
 };
 
 static const char *TGSI_INTERPOLATES_SHORT[] =
 {
    "CONSTANT",
    "LINEAR",
-   "PERSPECTIVE"
+   "PERSPECTIVE",
+   "ATTRIB"
 };
 
 static const char *TGSI_SEMANTICS[] =
index 8d5992f..80c3fcd 100644 (file)
@@ -96,6 +96,7 @@ struct tgsi_declaration_mask
 #define TGSI_INTERPOLATE_CONSTANT      0
 #define TGSI_INTERPOLATE_LINEAR        1
 #define TGSI_INTERPOLATE_PERSPECTIVE   2
+#define TGSI_INTERPOLATE_ATTRIB        3  /**< Vertex shader input attrib */
 
 struct tgsi_declaration_interpolation
 {
index e4a93cb..88de859 100644 (file)
@@ -714,7 +714,7 @@ tgsi_mesa_compile_vp_program(
    for (i = 0; i < numInputs; i++) {\r
       struct tgsi_full_declaration fulldecl;\r
       fulldecl = make_input_decl(i,\r
-                                 TGSI_INTERPOLATE_CONSTANT, /* no interp */\r
+                                 TGSI_INTERPOLATE_ATTRIB,\r
                                  TGSI_WRITEMASK_XYZW,\r
                                  GL_FALSE, inputSemanticName[i],\r
                                  inputSemanticIndex[i]);\r