const GLuint inputMapping[],\r
const ubyte inputSemanticName[],\r
const ubyte inputSemanticIndex[],\r
+ GLuint numOutputs,\r
const GLuint outputMapping[],\r
+ const ubyte outputSemanticName[],\r
+ const ubyte outputSemanticIndex[],\r
struct tgsi_token *tokens,\r
GLuint maxTokens)\r
{\r
\r
ti = 3;\r
\r
- /* XXX todo: input/output declarations\r
- */\r
+ /* input decls */\r
for (i = 0; i < numInputs; i++) {\r
struct tgsi_full_declaration fulldecl;\r
fulldecl = make_input_decl(i,\r
maxTokens - ti );\r
}\r
\r
+ /* output decls */\r
+ for (i = 0; i < numOutputs; i++) {\r
+ struct tgsi_full_declaration fulldecl;\r
+ fulldecl = make_frag_output_decl(i,\r
+ outputSemanticName[i],\r
+ outputSemanticIndex[i],\r
+ TGSI_WRITEMASK_XYZW );\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
const GLuint inputMapping[],\r
const ubyte inputSemanticName[],\r
const ubyte inputSemanticIndex[],\r
+ GLuint numOutputs,\r
const GLuint outputMapping[],\r
+ const ubyte outputSemanticName[],\r
+ const ubyte outputSemanticIndex[],\r
struct tgsi_token *tokens,\r
GLuint maxTokens );\r
\r
vs.output_semantic_index[vs.num_outputs] = 0;
break;
case VERT_RESULT_COL0:
- vs.output_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_COLOR;
+ vs.output_semantic_name[vs.num_outputs] = TGSI_SEMANTIC_COLOR;
vs.output_semantic_index[vs.num_outputs] = 0;
break;
case VERT_RESULT_COL1:
- vs.output_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_COLOR;
+ vs.output_semantic_name[vs.num_outputs] = TGSI_SEMANTIC_COLOR;
vs.output_semantic_index[vs.num_outputs] = 1;
break;
case VERT_RESULT_BFC0:
stvp->input_to_index,
vs.input_semantic_name,
vs.input_semantic_index,
+ vs.num_outputs,
st->vertex_attrib_to_slot,
+ vs.output_semantic_name,
+ vs.output_semantic_index,
stvp->tokens, ST_FP_MAX_TOKENS );
vs.tokens = &stvp->tokens[0];