diff options
author | Marek Olšák <[email protected]> | 2016-05-26 17:25:46 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-06-04 15:42:33 +0200 |
commit | eff94af79437d9434deb9bae553b6db5cc05a832 (patch) | |
tree | c5ce26cd7cae22b87fe200af44d9fd0b67e738c6 /src/gallium/drivers/r600 | |
parent | 9e62012c30812091e5400d449869f5022ac945ca (diff) |
r600g: only do necessary cache flushes in cp_dma_copy_buffer
The main impact is that {upload, draw, upload, draw, ..} doesn't flush
framebuffer caches before every upload.
Reviewed-by: Alex Deucher <[email protected]>
Tested-by: Grazvydas Ignotas <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_context.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index 3ba723d0541..ed4820d6cbb 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -447,15 +447,7 @@ void r600_cp_dma_copy_buffer(struct r600_context *rctx, src_offset += r600_resource(src)->gpu_address; /* Flush the caches where the resources are bound. */ - rctx->b.flags |= R600_CONTEXT_INV_CONST_CACHE | - R600_CONTEXT_INV_VERTEX_CACHE | - R600_CONTEXT_INV_TEX_CACHE | - R600_CONTEXT_FLUSH_AND_INV | - R600_CONTEXT_FLUSH_AND_INV_CB | - R600_CONTEXT_FLUSH_AND_INV_DB | - R600_CONTEXT_FLUSH_AND_INV_CB_META | - R600_CONTEXT_FLUSH_AND_INV_DB_META | - R600_CONTEXT_STREAMOUT_FLUSH | + rctx->b.flags |= r600_get_flush_flags(R600_COHERENCY_SHADER) | R600_CONTEXT_WAIT_3D_IDLE; /* There are differences between R700 and EG in CP DMA, @@ -513,11 +505,6 @@ void r600_cp_dma_copy_buffer(struct r600_context *rctx, * should precede it. */ r600_emit_pfp_sync_me(rctx); - - /* Invalidate the read caches. */ - rctx->b.flags |= R600_CONTEXT_INV_CONST_CACHE | - R600_CONTEXT_INV_VERTEX_CACHE | - R600_CONTEXT_INV_TEX_CACHE; } void r600_dma_copy_buffer(struct r600_context *rctx, |