mesa/es: Validate the state in st_DrawTex.
authorChia-I Wu <olv@lunarg.com>
Thu, 11 Mar 2010 10:13:18 +0000 (18:13 +0800)
committerChia-I Wu <olv@lunarg.com>
Thu, 11 Mar 2010 15:31:18 +0000 (23:31 +0800)
Without the validation, the function might draw with outdated textures.

src/mesa/es/state_tracker/st_cb_drawtex.c

index e4b895499178adcd746ae6eaf8ccae62555023d0..f75f4861a2fe02bf6975ae90366ba4382e373781 100644 (file)
@@ -123,6 +123,8 @@ st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
    struct pipe_vertex_element velements[2 + MAX_TEXTURE_UNITS];
    GLbitfield inputs = VERT_BIT_POS;
 
+   st_validate_state(st);
+
    /* determine if we need vertex color */
    if (ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL0)
       emitColor = GL_TRUE;