diff options
author | Marek Olšák <[email protected]> | 2015-07-16 14:54:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-23 00:59:24 +0200 |
commit | 5e3974338ed7ea49a41405f8c2e4bcd5fd1f5c80 (patch) | |
tree | b194a1203454ac94ee7d43c5368e819e4506c416 /src/gallium/drivers/r300/r300_transfer.c | |
parent | 0aa2446e2c18e4a54ccf8555a8ff3426e4eb3ded (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/r300/r300_transfer.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_transfer.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c index bc0835d1875..4fa360a042d 100644 --- a/src/gallium/drivers/r300/r300_transfer.c +++ b/src/gallium/drivers/r300/r300_transfer.c @@ -251,16 +251,12 @@ void r300_texture_transfer_unmap(struct pipe_context *ctx, struct r300_resource *tex = r300_resource(transfer->resource); if (trans->linear_texture) { - rws->buffer_unmap(trans->linear_texture->cs_buf); - if (transfer->usage & PIPE_TRANSFER_WRITE) { r300_copy_into_tiled_texture(ctx, trans); } pipe_resource_reference( (struct pipe_resource**)&trans->linear_texture, NULL); - } else { - rws->buffer_unmap(tex->cs_buf); } FREE(transfer); } |