mesa: call _mesa_set_vp_override in glDrawTex*
authorChia-I Wu <olvaffe@gmail.com>
Thu, 24 Mar 2011 19:10:51 +0000 (03:10 +0800)
committerChia-I Wu <olv@lunarg.com>
Tue, 23 Aug 2011 01:12:12 +0000 (09:12 +0800)
The driver may install its own vertex shader.  _mesa_set_vp_override
must be called so that core mesa can generate correct fragment program..

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/drawtex.c

index 2089cdf..83485a9 100644 (file)
@@ -45,11 +45,15 @@ draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
       return;
    }
 
+   _mesa_set_vp_override(ctx, GL_TRUE);
+
    if (ctx->NewState)
       _mesa_update_state(ctx);
 
    ASSERT(ctx->Driver.DrawTex);
    ctx->Driver.DrawTex(ctx, x, y, z, width, height);
+
+   _mesa_set_vp_override(ctx, GL_FALSE);
 }