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.haehnle@amd.com>
This commit is contained in:
Marek Olšák 2016-05-12 13:05:19 +02:00
parent 5e14d0ac2c
commit f330b7a14f
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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) &&