summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-02-26 17:07:52 +0100
committerMarek Olšák <[email protected]>2012-02-27 16:21:45 +0100
commit4c02baade9d590787acae157ce9b2d09c6a9bf55 (patch)
tree7e4c2cc5f0040cff2c8433ade68a1a64a5feaf3b /src/gallium
parent15e60d9976f82174afeca1d026f566cb8aea5104 (diff)
r600g: fix streamout cache flush for r600
Figured out by trial and error.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_hw_context.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 8c2e1837ff4..d0ef25f4119 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -1915,13 +1915,21 @@ void r600_context_streamout_end(struct r600_context *ctx)
r600_set_streamout_enable(ctx, 0);
}
- if (ctx->chip_class < R700) {
+ /* This is needed to fix cache flushes on r600. */
+ if (ctx->chip_class == R600) {
+ if (ctx->family == CHIP_RV670 ||
+ ctx->family == CHIP_RS780 ||
+ ctx->family == CHIP_RS880) {
+ flush_flags |= S_0085F0_DEST_BASE_0_ENA(1);
+ }
+
r600_atom_dirty(ctx, &ctx->atom_r6xx_flush_and_inv);
- } else {
- ctx->atom_surface_sync.flush_flags |= flush_flags;
- r600_atom_dirty(ctx, &ctx->atom_surface_sync.atom);
}
+ /* Flush streamout caches. */
+ ctx->atom_surface_sync.flush_flags |= flush_flags;
+ r600_atom_dirty(ctx, &ctx->atom_surface_sync.atom);
+
ctx->num_cs_dw_streamout_end = 0;
#if 0