This fixes a regression in the cubemap.c demo which alternates between
two different vertex shaders.
/* 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);
}
}
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);
}