summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_texture.c
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2014-04-02 09:09:32 -0400
committerChristian König <[email protected]>2014-04-04 16:21:04 +0200
commit0817182b2f3ec73cc79fab72f791e14d98d5306f (patch)
tree0536c31153c531be2ce0061ef5351482a8c6f6bf /src/gallium/drivers/radeon/r600_texture.c
parentde1a59b7a71583ae4fb09f9e4ee049895f14ca5f (diff)
Revert "radeon: just don't map VRAM buffers at all"
This reverts commit 96e8b916a7a39a9ba58e92d1ad77b5501de63ac7. In the case of VCE encoding with raw YUV file, CPU load directly to VRAM is faster than combination of CPU writing to GTT and then blit to VRAM with GPU. Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 45a95088534..3dfddca8b1c 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -928,8 +928,8 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx,
if (rtex->surface.level[level].mode >= RADEON_SURF_MODE_1D)
use_staging_texture = TRUE;
- /* Untiled buffers in VRAM, which is slow for CPU reads and writes */
- if (!(usage & PIPE_TRANSFER_MAP_DIRECTLY) &&
+ /* Untiled buffers in VRAM, which is slow for CPU reads */
+ if ((usage & PIPE_TRANSFER_READ) && !(usage & PIPE_TRANSFER_MAP_DIRECTLY) &&
(rtex->resource.domains == RADEON_DOMAIN_VRAM)) {
use_staging_texture = TRUE;
}