From e15ca7963e8b2e80eb79f6352f0761d0c1581fb5 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Mon, 29 Oct 2007 11:40:09 +0000 Subject: Remove TGSI_INTERPOLATE_ATTRIB. --- src/mesa/pipe/tgsi/exec/tgsi_build.c | 2 +- src/mesa/pipe/tgsi/exec/tgsi_token.h | 1 - src/mesa/state_tracker/st_mesa_to_tgsi.c | 18 ++++++++++-------- 3 files changed, 11 insertions(+), 10 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 56827726f5..78f648aae2 100644 --- 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_ATTRIB ); + assert( interpolate <= TGSI_INTERPOLATE_PERSPECTIVE ); di = tgsi_default_declaration_interpolation(); di.Interpolate = interpolate; diff --git a/src/mesa/pipe/tgsi/exec/tgsi_token.h b/src/mesa/pipe/tgsi/exec/tgsi_token.h index 80c3fcd434..8d5992facb 100644 --- a/src/mesa/pipe/tgsi/exec/tgsi_token.h +++ b/src/mesa/pipe/tgsi/exec/tgsi_token.h @@ -96,7 +96,6 @@ 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/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 37ba6a90b5..75195968e5 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -519,6 +519,7 @@ compile_instruction( static struct tgsi_full_declaration make_input_decl( GLuint index, + GLboolean interpolate_info, GLuint interpolate, GLuint usage_mask, GLboolean semantic_info, @@ -534,14 +535,16 @@ make_input_decl( decl.Declaration.Declare = TGSI_DECLARE_RANGE; decl.Declaration.UsageMask = usage_mask; decl.Declaration.Semantic = semantic_info; - decl.Declaration.Interpolate = 1; decl.u.DeclarationRange.First = index; decl.u.DeclarationRange.Last = index; if (semantic_info) { decl.Semantic.SemanticName = semantic_name; decl.Semantic.SemanticIndex = semantic_index; } - decl.Interpolation.Interpolate = interpolate; + if (interpolate_info) { + decl.Declaration.Interpolate = 1; + decl.Interpolation.Interpolate = interpolate; + } return decl; } @@ -685,7 +688,7 @@ tgsi_translate_mesa_program( case TGSI_SEMANTIC_POSITION: /* Fragment XY pos */ fulldecl = make_input_decl(i, - TGSI_INTERPOLATE_CONSTANT, + GL_TRUE, TGSI_INTERPOLATE_CONSTANT, TGSI_WRITEMASK_XY, GL_TRUE, TGSI_SEMANTIC_POSITION, 0 ); ti += tgsi_build_full_declaration( @@ -695,7 +698,7 @@ tgsi_translate_mesa_program( maxTokens - ti ); /* Fragment ZW pos */ fulldecl = make_input_decl(i, - TGSI_INTERPOLATE_LINEAR, + GL_TRUE, TGSI_INTERPOLATE_LINEAR, TGSI_WRITEMASK_ZW, GL_TRUE, TGSI_SEMANTIC_POSITION, 0 ); ti += tgsi_build_full_declaration(&fulldecl, @@ -705,7 +708,7 @@ tgsi_translate_mesa_program( break; default: fulldecl = make_input_decl(i, - interpMode[i], + GL_TRUE, interpMode[i], TGSI_WRITEMASK_XYZW, GL_TRUE, inputSemanticName[i], inputSemanticIndex[i]); @@ -722,10 +725,9 @@ tgsi_translate_mesa_program( for (i = 0; i < numInputs; i++) { struct tgsi_full_declaration fulldecl; fulldecl = make_input_decl(i, - TGSI_INTERPOLATE_ATTRIB, + GL_FALSE, 0, TGSI_WRITEMASK_XYZW, - GL_FALSE, inputSemanticName[i], - inputSemanticIndex[i]); + GL_FALSE, 0, 0); ti += tgsi_build_full_declaration(&fulldecl, &tokens[ti], header, -- cgit v1.2.3