radeon: just don't map VRAM buffers at all
authorChristian König <christian.koenig@amd.com>
Mon, 27 Jan 2014 10:40:25 +0000 (03:40 -0700)
committerChristian König <christian.koenig@amd.com>
Thu, 6 Feb 2014 15:08:22 +0000 (16:08 +0100)
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index 878b26f20936a793cb43b472da1ac1256128e0fc..eb1e191d0f9915af2020b508121e24c4770adc82 100644 (file)
@@ -911,8 +911,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 */
-       if ((usage & PIPE_TRANSFER_READ) && !(usage & PIPE_TRANSFER_MAP_DIRECTLY) &&
+       /* Untiled buffers in VRAM, which is slow for CPU reads and writes */
+       if (!(usage & PIPE_TRANSFER_MAP_DIRECTLY) &&
            (rtex->resource.domains == RADEON_DOMAIN_VRAM)) {
                use_staging_texture = TRUE;
        }