gallium/radeon: add R600_RESOURCE_FLAG_UNMAPPABLE
authorMarek Olšák <marek.olsak@amd.com>
Wed, 15 Feb 2017 19:41:01 +0000 (20:41 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 18 Feb 2017 00:22:08 +0000 (01:22 +0100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_buffer_common.c
src/gallium/drivers/radeon/r600_pipe_common.h

index 5ccfb0940de47932efba3bcea2f29308cd6e5455..cc9d3bea1fd1d6ff4169eb0cc17d7e380da7067e 100644 (file)
@@ -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 |
index b4f0f0b55a8d36738e94f8cbc0576cb8b1966eb0..e8dbf5d6d3c3a7876dcedf8c23c9b41e00e3b7f7 100644 (file)
@@ -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. */