Module: Mesa
Branch: master
Commit: f330b7a14fd913c50a5df227ee3d5699113357d1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f330b7a14fd913c50a5df227ee3d5699113357d1

Author: Marek Olšák <marek.ol...@amd.com>
Date:   Thu May 12 13:05:19 2016 +0200

gallium/radeon: handle VRAM_GTT placements as having slow CPU reads

not sure if we should include GTT WC too

Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com>

---

 src/gallium/drivers/radeon/r600_buffer_common.c | 2 +-
 src/gallium/drivers/radeon/r600_texture.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c 
b/src/gallium/drivers/radeon/r600_buffer_common.c
index 9e8384d..145cc9f 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -359,7 +359,7 @@ static void *r600_buffer_transfer_map(struct pipe_context 
*ctx,
        else if ((usage & PIPE_TRANSFER_READ) &&
                 !(usage & (PIPE_TRANSFER_WRITE |
                            PIPE_TRANSFER_PERSISTENT)) &&
-                rbuffer->domains == RADEON_DOMAIN_VRAM &&
+                rbuffer->domains & RADEON_DOMAIN_VRAM &&
                 r600_can_dma_copy_buffer(rctx, 0, box->x, box->width)) {
                struct r600_resource *staging;
 
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index b22fca8..a00dedc 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1247,7 +1247,7 @@ static void *r600_texture_transfer_map(struct 
pipe_context *ctx,
        if (rtex->surface.level[0].mode >= RADEON_SURF_MODE_1D) {
                use_staging_texture = TRUE;
        } else if ((usage & PIPE_TRANSFER_READ) &&
-           (rtex->resource.domains == RADEON_DOMAIN_VRAM)) {
+                  rtex->resource.domains & RADEON_DOMAIN_VRAM) {
                /* Untiled buffers in VRAM, which is slow for CPU reads */
                use_staging_texture = TRUE;
        } else if (!(usage & PIPE_TRANSFER_READ) &&

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to