iris: Add support for the always_flush_cache=true debug option.
[mesa.git] / src / gallium / drivers / iris / iris_draw.c
index dc7fa98480267527ca6a5ae7837a4629aa93b985..caf5c002eecad4f57b6e8ede3c92d91a1a92c2e7 100644 (file)
@@ -241,11 +241,15 @@ iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
 
    ice->vtbl.update_surface_base_address(batch, &ice->state.binder);
 
+   iris_handle_always_flush_cache(batch);
+
    if (info->indirect)
       iris_indirect_draw_vbo(ice, info);
    else
       iris_simple_draw_vbo(ice, info);
 
+   iris_handle_always_flush_cache(batch);
+
    iris_postdraw_update_resolve_tracking(ice, batch);
 
    ice->state.dirty &= ~IRIS_ALL_DIRTY_FOR_RENDER;
@@ -342,8 +346,12 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid)
       ice->state.compute_predicate = NULL;
    }
 
+   iris_handle_always_flush_cache(batch);
+
    ice->vtbl.upload_compute_state(ice, batch, grid);
 
+   iris_handle_always_flush_cache(batch);
+
    ice->state.dirty &= ~IRIS_ALL_DIRTY_FOR_COMPUTE;
 
    /* Note: since compute shaders can't access the framebuffer, there's