diff options
author | Brian <[email protected]> | 2007-09-20 13:39:17 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-09-20 13:43:23 -0600 |
commit | 745f0cbe0528ac925096f5c1b85de7280fee7fbc (patch) | |
tree | bfd710a9a9bfb4fbb44916aee494d32f25c607e6 /src/mesa/state_tracker | |
parent | 768302c53971ad0405ee6e2a30db96fc5f51913b (diff) |
Always update st->state.vs, not just when the program is dirty.
This fixes a regression in the cubemap.c demo which alternates between
two different vertex shaders.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_fs.c | 8 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_vs.c | 9 |
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 91e58f58316..340c7ec69f6 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 cc61436f53c..9c2994fddf3 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); } |