From a41587433c4dfd359eebf3fd266975e51e8b3fd6 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 15 Feb 2017 20:41:01 +0100 Subject: gallium/radeon: add R600_RESOURCE_FLAG_UNMAPPABLE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_buffer_common.c | 4 ++-- src/gallium/drivers/radeon/r600_pipe_common.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 5ccfb0940de..cc9d3bea1fd 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -159,8 +159,8 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen, } /* Tiled textures are unmappable. Always put them in VRAM. */ - if (res->b.b.target != PIPE_BUFFER && - !rtex->surface.is_linear) { + if ((res->b.b.target != PIPE_BUFFER && !rtex->surface.is_linear) || + res->flags & R600_RESOURCE_FLAG_UNMAPPABLE) { res->domains = RADEON_DOMAIN_VRAM; res->flags &= ~RADEON_FLAG_CPU_ACCESS; res->flags |= RADEON_FLAG_NO_CPU_ACCESS | diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index b4f0f0b55a8..e8dbf5d6d3c 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -49,6 +49,7 @@ #define R600_RESOURCE_FLAG_FLUSHED_DEPTH (PIPE_RESOURCE_FLAG_DRV_PRIV << 1) #define R600_RESOURCE_FLAG_FORCE_TILING (PIPE_RESOURCE_FLAG_DRV_PRIV << 2) #define R600_RESOURCE_FLAG_DISABLE_DCC (PIPE_RESOURCE_FLAG_DRV_PRIV << 3) +#define R600_RESOURCE_FLAG_UNMAPPABLE (PIPE_RESOURCE_FLAG_DRV_PRIV << 4) #define R600_CONTEXT_STREAMOUT_FLUSH (1u << 0) /* Pipeline & streamout query controls. */ -- cgit v1.2.3