Module: Mesa
Branch: master
Commit: 021cdd698bb57ae9b12b84582302a8d7f656db0c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=021cdd698bb57ae9b12b84582302a8d7f656db0c

Author: Chia-I Wu <[email protected]>
Date:   Thu Mar 11 18:13:18 2010 +0800

mesa/es: Validate the state in st_DrawTex.

Without the validation, the function might draw with outdated textures.

---

 src/mesa/es/state_tracker/st_cb_drawtex.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/es/state_tracker/st_cb_drawtex.c 
b/src/mesa/es/state_tracker/st_cb_drawtex.c
index e4b8954..f75f486 100644
--- a/src/mesa/es/state_tracker/st_cb_drawtex.c
+++ b/src/mesa/es/state_tracker/st_cb_drawtex.c
@@ -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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to