aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-01-05 18:28:57 -0700
committerBrian Paul <[email protected]>2016-01-06 15:53:46 -0700
commitb6bcf0864138787c21b19cda3749c80c6ad74604 (patch)
tree68d6fe7fbb4c362e04883ac6d029841591288d3d /src/mesa/state_tracker/st_cb_drawpixels.c
parentc28d72a3473ad0127c82c1244b6688dcc184e85e (diff)
st/mesa: move bitmap cache flushing out of state validation
Just do it where needed (before drawing, clearing, etc). Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 86e8a55e25e..7ed52dd2600 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -50,6 +50,7 @@
#include "st_atom.h"
#include "st_atom_constbuf.h"
+#include "st_cb_bitmap.h"
#include "st_cb_drawpixels.h"
#include "st_cb_readpixels.h"
#include "st_cb_fbo.h"
@@ -1063,6 +1064,8 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
/* Mesa state should be up to date by now */
assert(ctx->NewState == 0x0);
+ st_flush_bitmap_cache(st);
+
st_validate_state(st);
/* Limit the size of the glDrawPixels to the max texture size.
@@ -1422,6 +1425,8 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GLint readX, readY, readW, readH;
struct gl_pixelstore_attrib pack = ctx->DefaultPacking;
+ st_flush_bitmap_cache(st);
+
st_validate_state(st);
if (type == GL_DEPTH_STENCIL) {