}\r
\r
static struct tgsi_full_declaration\r
-make_frag_input_decl(\r
+make_input_decl(\r
GLuint index,\r
GLuint interpolate,\r
GLuint usage_mask,\r
switch (inputSemanticName[i]) {\r
case TGSI_SEMANTIC_POSITION:\r
/* Fragment XY pos */\r
- fulldecl = make_frag_input_decl(i,\r
- TGSI_INTERPOLATE_CONSTANT,\r
- TGSI_WRITEMASK_XY,\r
- TGSI_SEMANTIC_POSITION, 0 );\r
+ fulldecl = make_input_decl(i,\r
+ TGSI_INTERPOLATE_CONSTANT,\r
+ TGSI_WRITEMASK_XY,\r
+ TGSI_SEMANTIC_POSITION, 0 );\r
ti += tgsi_build_full_declaration(\r
&fulldecl,\r
&tokens[ti],\r
header,\r
maxTokens - ti );\r
/* Fragment ZW pos */\r
- fulldecl = make_frag_input_decl(i,\r
- TGSI_INTERPOLATE_LINEAR,\r
- TGSI_WRITEMASK_ZW,\r
- TGSI_SEMANTIC_POSITION, 0 );\r
+ fulldecl = make_input_decl(i,\r
+ TGSI_INTERPOLATE_LINEAR,\r
+ TGSI_WRITEMASK_ZW,\r
+ TGSI_SEMANTIC_POSITION, 0 );\r
ti += tgsi_build_full_declaration(\r
&fulldecl,\r
&tokens[ti],\r
maxTokens - ti );\r
break;\r
default:\r
- fulldecl = make_frag_input_decl(i,\r
- interpMode[i],\r
- TGSI_WRITEMASK_XYZW,\r
- inputSemanticName[i],\r
- inputSemanticIndex[i]);\r
+ fulldecl = make_input_decl(i,\r
+ interpMode[i],\r
+ TGSI_WRITEMASK_XYZW,\r
+ inputSemanticName[i],\r
+ inputSemanticIndex[i]);\r
ti += tgsi_build_full_declaration(&fulldecl,\r
&tokens[ti],\r
header,\r
GLboolean\r
tgsi_mesa_compile_vp_program(\r
const struct gl_vertex_program *program,\r
+ GLuint numInputs,\r
const GLuint inputMapping[],\r
+ const ubyte inputSemanticName[],\r
+ const ubyte inputSemanticIndex[],\r
const GLuint outputMapping[],\r
struct tgsi_token *tokens,\r
GLuint maxTokens)\r
\r
/* XXX todo: input/output declarations\r
*/\r
+ 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_WRITEMASK_XYZW,\r
+ inputSemanticName[i],\r
+ inputSemanticIndex[i]);\r
+ ti += tgsi_build_full_declaration(&fulldecl,\r
+ &tokens[ti],\r
+ header,\r
+ maxTokens - ti );\r
+ }\r
+\r
\r
for( i = 0; i < program->Base.NumInstructions; i++ ) {\r
if( compile_instruction(\r