summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-02 05:01:20 +0200
committerMarek Olšák <[email protected]>2012-04-04 13:09:47 +0200
commitc7d0e9ec32edfbb6c77715d51170608deb41f1b7 (patch)
tree9d99f89e17164dc874a8bab43c4be829c5fec919 /src/gallium/drivers/r600
parenta633d82ce352a69fd54a2b0e262a91f27f478119 (diff)
r600g: invalidate caches at the beginning of CS
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_hw_context.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 46c8c0461d1..e898a598e3e 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -1197,7 +1197,16 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags)
ctx->pm4_dirty_cdwords = 0;
ctx->flags = 0;
+ /* Begin a new CS. */
r600_emit_atom(ctx, &ctx->start_cs_cmd.atom);
+
+ /* Invalidate caches. */
+ r600_inval_vertex_cache(ctx);
+ r600_inval_texture_cache(ctx);
+ r600_inval_shader_cache(ctx);
+ r600_flush_framebuffer(ctx, false);
+
+ /* Re-emit states. */
r600_atom_dirty(ctx, &ctx->db_misc_state.atom);
r600_atom_dirty(ctx, &ctx->vertex_buffer_state);