summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-07-16 14:54:50 +0200
committerMarek Olšák <[email protected]>2015-07-23 00:59:24 +0200
commit5e3974338ed7ea49a41405f8c2e4bcd5fd1f5c80 (patch)
treeb194a1203454ac94ee7d43c5368e819e4506c416 /src/gallium/drivers/radeon/r600_texture.c
parent0aa2446e2c18e4a54ccf8555a8ff3426e4eb3ded (diff)
gallium/radeon: remove buffer_unmap calls that can potentially decrease perf
buffer_unmap is currently a no-op on radeon and done correctly on amdgpu. I plan to fix it for radeon, but before that, all occurences of buffer_unmap that can negatively affect performance in the future must be removed. There are 2 reasons for removing buffer_unmap calls: - There is a likelihood that buffer_map will be called again, so we don't want to unmap yet. - The buffer is being released, which automatically unmaps it. Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index dc510c99749..e63c37e890c 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1059,18 +1059,9 @@ static void r600_texture_transfer_unmap(struct pipe_context *ctx,
struct pipe_transfer* transfer)
{
struct r600_transfer *rtransfer = (struct r600_transfer*)transfer;
- struct r600_common_context *rctx = (struct r600_common_context*)ctx;
- struct radeon_winsys_cs_handle *buf;
struct pipe_resource *texture = transfer->resource;
struct r600_texture *rtex = (struct r600_texture*)texture;
- if (rtransfer->staging) {
- buf = rtransfer->staging->cs_buf;
- } else {
- buf = r600_resource(transfer->resource)->cs_buf;
- }
- rctx->ws->buffer_unmap(buf);
-
if ((transfer->usage & PIPE_TRANSFER_WRITE) && rtransfer->staging) {
if (rtex->is_depth && rtex->resource.b.b.nr_samples <= 1) {
ctx->resource_copy_region(ctx, texture, transfer->level,