This can be useful for debugging missing flushes.
DRI_CONF_SECTION_DEBUG
DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION("false")
DRI_CONF_DISABLE_THROTTLING("false")
+ DRI_CONF_ALWAYS_FLUSH_CACHE("false")
DRI_CONF_SECTION_END
DRI_CONF_SECTION_PERFORMANCE
params->y1 - params->y0, scale);
}
+ iris_handle_always_flush_cache(batch);
+
blorp_exec(blorp_batch, params);
+ iris_handle_always_flush_cache(batch);
+
/* We've smashed all state compared to what the normal 3D pipeline
* rendering tracks for GL.
*/
uint64_t imm);
void iris_emit_end_of_pipe_sync(struct iris_batch *batch,
const char *reason, uint32_t flags);
+void iris_flush_all_caches(struct iris_batch *batch);
+
+#define iris_handle_always_flush_cache(batch) \
+ if (unlikely(batch->screen->driconf.always_flush_cache)) \
+ iris_flush_all_caches(batch);
void iris_init_flush_functions(struct pipe_context *ctx);
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;
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
batch->screen->workaround_bo, 0, 0);
}
+/**
+ * Flush and invalidate all caches (for debugging purposes).
+ */
+void
+iris_flush_all_caches(struct iris_batch *batch)
+{
+ iris_emit_pipe_control_flush(batch, "debug: flush all caches",
+ PIPE_CONTROL_CS_STALL |
+ PIPE_CONTROL_DATA_CACHE_FLUSH |
+ PIPE_CONTROL_DEPTH_CACHE_FLUSH |
+ PIPE_CONTROL_RENDER_TARGET_FLUSH |
+ PIPE_CONTROL_VF_CACHE_INVALIDATE |
+ PIPE_CONTROL_INSTRUCTION_INVALIDATE |
+ PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE |
+ PIPE_CONTROL_CONST_CACHE_INVALIDATE |
+ PIPE_CONTROL_STATE_CACHE_INVALIDATE);
+}
+
static void
iris_texture_barrier(struct pipe_context *ctx, unsigned flags)
{
driQueryOptionb(config->options, "dual_color_blend_by_location");
screen->driconf.disable_throttling =
driQueryOptionb(config->options, "disable_throttling");
+ screen->driconf.always_flush_cache =
+ driQueryOptionb(config->options, "always_flush_cache");
screen->precompile = env_var_as_boolean("shader_precompile", true);
/** Dual color blend by location instead of index (for broken apps) */
bool dual_color_blend_by_location;
bool disable_throttling;
+ bool always_flush_cache;
} driconf;
unsigned subslice_total;