st/mesa: flush bitmap cache on query and conditional render boundaries
[mesa.git] / src / mesa / state_tracker / st_cb_condrender.c
index 64c6c117fca4efa71bff4a7720b2bda4f111c848..1ced560e1607e98834085af31014556cfa4a1dc4 100644 (file)
@@ -41,6 +41,7 @@
 #include "st_context.h"
 #include "st_cb_queryobj.h"
 #include "st_cb_condrender.h"
+#include "st_cb_bitmap.h"
 
 
 /**
@@ -55,6 +56,8 @@ st_BeginConditionalRender(struct gl_context *ctx, struct gl_query_object *q,
    struct pipe_context *pipe = st->pipe;
    uint m;
 
+   st_flush_bitmap_cache(st);
+
    switch (mode) {
    case GL_QUERY_WAIT:
       m = PIPE_RENDER_COND_WAIT;
@@ -90,6 +93,8 @@ st_EndConditionalRender(struct gl_context *ctx, struct gl_query_object *q)
    struct pipe_context *pipe = st->pipe;
    (void) q;
 
+   st_flush_bitmap_cache(st);
+
    pipe->render_condition(pipe, NULL, 0);
    st->render_condition = NULL;
 }