summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/state_tracker/st_atom_fs.c8
-rw-r--r--src/mesa/state_tracker/st_atom_vs.c9
2 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_atom_fs.c b/src/mesa/state_tracker/st_atom_fs.c
index 91e58f5831..340c7ec69f 100644
--- a/src/mesa/state_tracker/st_atom_fs.c
+++ b/src/mesa/state_tracker/st_atom_fs.c
@@ -177,11 +177,13 @@ static void update_fs( struct st_context *st )
/* if new binding, or shader has changed */
if (st->fp != stfp || stfp->dirty) {
- /* Bind the program */
- st->fp = stfp;
if (stfp->dirty)
- st->state.fs = st_translate_fragment_shader( st, st->fp );
+ (void) st_translate_fragment_shader( st, stfp );
+
+ /* Bind the vertex program and TGSI shader */
+ st->fp = stfp;
+ st->state.fs = stfp->fs;
st->pipe->bind_fs_state(st->pipe, st->state.fs->data);
}
diff --git a/src/mesa/state_tracker/st_atom_vs.c b/src/mesa/state_tracker/st_atom_vs.c
index cc61436f53..9c2994fddf 100644
--- a/src/mesa/state_tracker/st_atom_vs.c
+++ b/src/mesa/state_tracker/st_atom_vs.c
@@ -188,11 +188,12 @@ static void update_vs( struct st_context *st )
}
if (st->vp != stvp || stvp->dirty) {
- /* Bind the vertex program */
- st->vp = stvp;
-
if (stvp->dirty)
- st->state.vs = st_translate_vertex_shader( st, st->vp );
+ (void) st_translate_vertex_shader( st, stvp );
+
+ /* Bind the vertex program and TGSI shader */
+ st->vp = stvp;
+ st->state.vs = stvp->vs;
st->pipe->bind_vs_state(st->pipe, st->state.vs->data);
}