gallium/tgsi: add helper tgsi_get_interp_mode
[mesa.git] / src / mesa / state_tracker / st_cb_flush.c
index 36f7f2320c8ee4770d8dcf939a1328c0a107e721..08b645433ac40d15a33434b904e784285ea322f5 100644 (file)
@@ -52,8 +52,6 @@ st_flush(struct st_context *st,
          struct pipe_fence_handle **fence,
          unsigned flags)
 {
-   st_flush_bitmap_cache(st);
-
    /* We want to call this function periodically.
     * Typically, it has nothing to do so it shouldn't be expensive.
     */
@@ -71,6 +69,7 @@ st_finish(struct st_context *st)
 {
    struct pipe_fence_handle *fence = NULL;
 
+   st_flush_bitmap_cache(st);
    st_flush(st, &fence, PIPE_FLUSH_ASYNC | PIPE_FLUSH_HINT_FINISH);
 
    if (fence) {
@@ -92,6 +91,8 @@ st_glFlush(struct gl_context *ctx)
 {
    struct st_context *st = st_context(ctx);
 
+   st_flush_bitmap_cache(st);
+
    /* Don't call st_finish() here.  It is not the state tracker's
     * responsibilty to inject sleeps in the hope of avoiding buffer
     * synchronization issues.  Calling finish() here will just hide