From: Brian Paul Date: Tue, 19 Jun 2012 15:40:32 +0000 (-0600) Subject: st/mesa: move st_validate_state() call earlier in st_DrawPixels() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f4786ad29abbbbc4b0ebfcec8114921c1c8f6e3;p=mesa.git st/mesa: move st_validate_state() call earlier in st_DrawPixels() --- diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index d3f8d136895..aba91650252 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -1073,6 +1073,11 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y, int num_sampler_view = 1; struct st_fp_variant *fpv; + /* Mesa state should be up to date by now */ + assert(ctx->NewState == 0x0); + + st_validate_state(st); + if (format == GL_DEPTH_STENCIL) write_stencil = write_depth = GL_TRUE; else if (format == GL_STENCIL_INDEX) @@ -1088,11 +1093,6 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y, return; } - /* Mesa state should be up to date by now */ - assert(ctx->NewState == 0x0); - - st_validate_state(st); - /* * Get vertex/fragment shaders */