diff options
author | Michal Krol <[email protected]> | 2007-10-29 11:40:09 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2007-10-29 13:25:00 +0000 |
commit | e15ca7963e8b2e80eb79f6352f0761d0c1581fb5 (patch) | |
tree | fd19e7e8e48c54df34610ab2b3f20b7dbd8fb241 /src | |
parent | 242b8659e40416f893157c7a0919964dabc957cf (diff) |
Remove TGSI_INTERPOLATE_ATTRIB.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/pipe/tgsi/exec/tgsi_build.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/tgsi/exec/tgsi_token.h | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 18 |
3 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_build.c b/src/mesa/pipe/tgsi/exec/tgsi_build.c index 56827726f5c..78f648aae25 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 80c3fcd4342..8d5992facbf 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 37ba6a90b58..75195968e5c 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, |