summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-09 12:19:21 +0100
committerMarek Olšák <[email protected]>2017-02-10 11:27:50 +0100
commit43a2ba1b7dee769d476a754cc3a8332f7f3b7f39 (patch)
tree0f0902c34bc040bbc707e5fb2bf287e388f68b9c
parentdc7483f445b8948a5c53073b7906ed8fb24e2bc1 (diff)
gallium/radeon: use staging for texture read mappings from GTT WC
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 55c8e6f7842..5d84eb4a086 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1456,8 +1456,8 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx,
/* Tiled textures need to be converted into a linear texture for CPU
* access. The staging texture is always linear and is placed in GART.
*
- * Reading from VRAM is slow, always use the staging texture in
- * this case.
+ * Reading from VRAM or GTT WC is slow, always use the staging
+ * texture in this case.
*
* Use the staging texture for uploads if the underlying BO
* is busy.
@@ -1465,8 +1465,9 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx,
if (!rtex->surface.is_linear)
use_staging_texture = true;
else if (usage & PIPE_TRANSFER_READ)
- use_staging_texture = (rtex->resource.domains &
- RADEON_DOMAIN_VRAM) != 0;
+ use_staging_texture =
+ rtex->resource.domains & RADEON_DOMAIN_VRAM ||
+ rtex->resource.flags & RADEON_FLAG_GTT_WC;
/* Write & linear only: */
else if (r600_rings_is_buffer_referenced(rctx, rtex->resource.buf,
RADEON_USAGE_READWRITE) ||