From 31bd01f93b0f5795e290897e79c3f16d90e1f202 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Oct 2007 14:36:14 -0600 Subject: New ATTRIB interpolation type for vertex program inputs/declarations. --- src/mesa/pipe/tgsi/exec/tgsi_build.c | 2 +- src/mesa/pipe/tgsi/exec/tgsi_dump.c | 6 ++++-- src/mesa/pipe/tgsi/exec/tgsi_token.h | 1 + src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/pipe/tgsi/exec/tgsi_build.c b/src/mesa/pipe/tgsi/exec/tgsi_build.c index 78f648aae2..56827726f5 100755 --- a/src/mesa/pipe/tgsi/exec/tgsi_build.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_build.c @@ -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; diff --git a/src/mesa/pipe/tgsi/exec/tgsi_dump.c b/src/mesa/pipe/tgsi/exec/tgsi_dump.c index c179659aee..463f841dde 100755 --- a/src/mesa/pipe/tgsi/exec/tgsi_dump.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_dump.c @@ -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[] = diff --git a/src/mesa/pipe/tgsi/exec/tgsi_token.h b/src/mesa/pipe/tgsi/exec/tgsi_token.h index 8d5992facb..80c3fcd434 100644 --- a/src/mesa/pipe/tgsi/exec/tgsi_token.h +++ b/src/mesa/pipe/tgsi/exec/tgsi_token.h @@ -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 { diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c index e4a93cb60d..88de85994a 100644 --- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c +++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c @@ -714,7 +714,7 @@ tgsi_mesa_compile_vp_program( for (i = 0; i < numInputs; i++) { struct tgsi_full_declaration fulldecl; fulldecl = make_input_decl(i, - TGSI_INTERPOLATE_CONSTANT, /* no interp */ + TGSI_INTERPOLATE_ATTRIB, TGSI_WRITEMASK_XYZW, GL_FALSE, inputSemanticName[i], inputSemanticIndex[i]); -- cgit v1.2.3