summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2009-12-16 22:12:16 +0100
committerRoland Scheidegger <[email protected]>2009-12-16 22:12:16 +0100
commit50caff5675888c0063c73fa64b88129db7aa11dd (patch)
treef01b9ae711eccbc022b29cfc631f15e38a61da47 /src/mesa/state_tracker/st_program.c
parenta0127b6ced257919180ba3a1bf534b68d9c750be (diff)
gallium: edgeflags change fixes
use correct number of vertex inputs fix not running pipeline in case of edgeflags changes to mesa to tgsi translation still very broken
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 24f2387429e..45ab8504ae5 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -113,6 +113,9 @@ st_prepare_vertex_program(struct st_context *st,
stvp->num_inputs++;
}
}
+ /* bit of a hack, presetup potentially unused edgeflag input */
+ stvp->input_to_index[VERT_ATTRIB_EDGEFLAG] = stvp->num_inputs;
+ stvp->index_to_input[stvp->num_inputs] = VERT_ATTRIB_EDGEFLAG;
/* Compute mapping of vertex program outputs to slots.
*/
@@ -199,6 +202,8 @@ st_translate_vertex_program(struct st_context *st,
if (ureg == NULL)
return NULL;
+ vpv->num_inputs = stvp->num_inputs;
+
error =
st_translate_mesa_program(st->ctx,
TGSI_PROCESSOR_VERTEX,
@@ -224,7 +229,8 @@ st_translate_vertex_program(struct st_context *st,
if (key->passthrough_edgeflags) {
ureg_MOV( ureg,
ureg_DECL_output( ureg, TGSI_SEMANTIC_EDGEFLAG, 0 ),
- ureg_DECL_next_vs_input(ureg));
+ ureg_DECL_vs_input( ureg, vpv->num_inputs ));
+ vpv->num_inputs++;
}
vpv->state.tokens = ureg_get_tokens( ureg, NULL );