From 47ff9428ee09a948e6b412f7e3e46ed1305881a1 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Oct 2007 14:31:45 -0600 Subject: Don't emit semantic info for vertex program inputs. --- src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c index 189c7f3edad..e4a93cb60d7 100644 --- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c +++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c @@ -475,6 +475,7 @@ make_input_decl( GLuint index, GLuint interpolate, GLuint usage_mask, + GLboolean semantic_info, GLuint semantic_name, GLuint semantic_index ) { @@ -486,12 +487,14 @@ make_input_decl( decl.Declaration.File = TGSI_FILE_INPUT; decl.Declaration.Declare = TGSI_DECLARE_RANGE; decl.Declaration.UsageMask = usage_mask; - decl.Declaration.Semantic = 1; + decl.Declaration.Semantic = semantic_info; decl.Declaration.Interpolate = 1; decl.u.DeclarationRange.First = index; decl.u.DeclarationRange.Last = index; - decl.Semantic.SemanticName = semantic_name; - decl.Semantic.SemanticIndex = semantic_index; + if (semantic_info) { + decl.Semantic.SemanticName = semantic_name; + decl.Semantic.SemanticIndex = semantic_index; + } decl.Interpolation.Interpolate = interpolate; return decl; @@ -569,7 +572,7 @@ tgsi_mesa_compile_fp_program( fulldecl = make_input_decl(i, TGSI_INTERPOLATE_CONSTANT, TGSI_WRITEMASK_XY, - TGSI_SEMANTIC_POSITION, 0 ); + GL_TRUE, TGSI_SEMANTIC_POSITION, 0 ); ti += tgsi_build_full_declaration( &fulldecl, &tokens[ti], @@ -579,7 +582,7 @@ tgsi_mesa_compile_fp_program( fulldecl = make_input_decl(i, TGSI_INTERPOLATE_LINEAR, TGSI_WRITEMASK_ZW, - TGSI_SEMANTIC_POSITION, 0 ); + GL_TRUE, TGSI_SEMANTIC_POSITION, 0 ); ti += tgsi_build_full_declaration( &fulldecl, &tokens[ti], @@ -590,7 +593,7 @@ tgsi_mesa_compile_fp_program( fulldecl = make_input_decl(i, interpMode[i], TGSI_WRITEMASK_XYZW, - inputSemanticName[i], + GL_TRUE, inputSemanticName[i], inputSemanticIndex[i]); ti += tgsi_build_full_declaration(&fulldecl, &tokens[ti], @@ -713,7 +716,7 @@ tgsi_mesa_compile_vp_program( fulldecl = make_input_decl(i, TGSI_INTERPOLATE_CONSTANT, /* no interp */ TGSI_WRITEMASK_XYZW, - inputSemanticName[i], + GL_FALSE, inputSemanticName[i], inputSemanticIndex[i]); ti += tgsi_build_full_declaration(&fulldecl, &tokens[ti], -- cgit v1.2.3