mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
pass vs output semantics to tgsi_mesa_compile_vp_program() to generate output DECs
This commit is contained in:
parent
f38881c542
commit
9f96c5d619
3 changed files with 25 additions and 4 deletions
|
|
@ -686,7 +686,10 @@ tgsi_mesa_compile_vp_program(
|
|||
const GLuint inputMapping[],
|
||||
const ubyte inputSemanticName[],
|
||||
const ubyte inputSemanticIndex[],
|
||||
GLuint numOutputs,
|
||||
const GLuint outputMapping[],
|
||||
const ubyte outputSemanticName[],
|
||||
const ubyte outputSemanticIndex[],
|
||||
struct tgsi_token *tokens,
|
||||
GLuint maxTokens)
|
||||
{
|
||||
|
|
@ -705,8 +708,7 @@ tgsi_mesa_compile_vp_program(
|
|||
|
||||
ti = 3;
|
||||
|
||||
/* XXX todo: input/output declarations
|
||||
*/
|
||||
/* input decls */
|
||||
for (i = 0; i < numInputs; i++) {
|
||||
struct tgsi_full_declaration fulldecl;
|
||||
fulldecl = make_input_decl(i,
|
||||
|
|
@ -720,6 +722,19 @@ tgsi_mesa_compile_vp_program(
|
|||
maxTokens - ti );
|
||||
}
|
||||
|
||||
/* output decls */
|
||||
for (i = 0; i < numOutputs; i++) {
|
||||
struct tgsi_full_declaration fulldecl;
|
||||
fulldecl = make_frag_output_decl(i,
|
||||
outputSemanticName[i],
|
||||
outputSemanticIndex[i],
|
||||
TGSI_WRITEMASK_XYZW );
|
||||
ti += tgsi_build_full_declaration(&fulldecl,
|
||||
&tokens[ti],
|
||||
header,
|
||||
maxTokens - ti );
|
||||
}
|
||||
|
||||
|
||||
for( i = 0; i < program->Base.NumInstructions; i++ ) {
|
||||
if( compile_instruction(
|
||||
|
|
|
|||
|
|
@ -26,7 +26,10 @@ tgsi_mesa_compile_vp_program(
|
|||
const GLuint inputMapping[],
|
||||
const ubyte inputSemanticName[],
|
||||
const ubyte inputSemanticIndex[],
|
||||
GLuint numOutputs,
|
||||
const GLuint outputMapping[],
|
||||
const ubyte outputSemanticName[],
|
||||
const ubyte outputSemanticIndex[],
|
||||
struct tgsi_token *tokens,
|
||||
GLuint maxTokens );
|
||||
|
||||
|
|
|
|||
|
|
@ -136,11 +136,11 @@ st_translate_vertex_shader(struct st_context *st,
|
|||
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:
|
||||
|
|
@ -187,7 +187,10 @@ st_translate_vertex_shader(struct st_context *st,
|
|||
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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue