grab vertex program pointer after state validation
authorBrian <brian.paul@tungstengraphics.com>
Wed, 19 Sep 2007 16:16:46 +0000 (10:16 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 19 Sep 2007 16:16:46 +0000 (10:16 -0600)
src/mesa/state_tracker/st_draw.c

index bff0ad7ef7adde8905e09d97ac9eb188eac42563..6efe3ce8b8e993a85c2e512f6f2bfc4e9332e6f6 100644 (file)
@@ -187,7 +187,7 @@ st_draw_vbo(GLcontext *ctx,
             GLuint max_index)
 {
    struct pipe_context *pipe = ctx->st->pipe;
-   const struct st_vertex_program *vp = ctx->st->vp;
+   const struct st_vertex_program *vp;
    const struct pipe_shader_state *vs;
    const unsigned attr0_offset = (unsigned) arrays[0]->Ptr;
    GLboolean needDefaultAttribs = GL_FALSE;
@@ -195,7 +195,8 @@ st_draw_vbo(GLcontext *ctx,
 
    st_validate_state(ctx->st);
 
-   /* must do this after state validation! */
+   /* must get these after state validation! */
+   vp = ctx->st->vp;
    vs = ctx->st->state.vs;
 
    /* loop over TGSI shader inputs */