radeonsi: move const_uploader allocations to 32-bit address space
authorMarek Olšák <marek.olsak@amd.com>
Sun, 31 Dec 2017 21:51:14 +0000 (22:51 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 17 Feb 2018 03:52:17 +0000 (04:52 +0100)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/radeon/r600_buffer_common.c
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h

index aca536d7fd450e15f01739bf8e0481808b7414dc..2d64eed1c10ad41518e7df44064db16af7df38bd 100644 (file)
@@ -177,6 +177,9 @@ void si_init_resource_fields(struct si_screen *sscreen,
        if (res->b.b.flags & R600_RESOURCE_FLAG_READ_ONLY)
                res->flags |= RADEON_FLAG_READ_ONLY;
 
+       if (res->b.b.flags & R600_RESOURCE_FLAG_32BIT)
+               res->flags |= RADEON_FLAG_32BIT;
+
        /* Set expected VRAM and GART usage for the buffer. */
        res->vram_usage = 0;
        res->gart_usage = 0;
index 9e45a9f0d1d707f29dcc9b9ad2dd6e9be6a2d1c9..d46cb64651932386104540658b5bc46ae8a97e27 100644 (file)
@@ -452,8 +452,9 @@ bool si_common_context_init(struct r600_common_context *rctx,
 
        rctx->b.const_uploader = u_upload_create(&rctx->b, 128 * 1024,
                                                 0, PIPE_USAGE_DEFAULT,
-                                                sscreen->cpdma_prefetch_writes_memory ?
-                                                       0 : R600_RESOURCE_FLAG_READ_ONLY);
+                                                R600_RESOURCE_FLAG_32BIT |
+                                                (sscreen->cpdma_prefetch_writes_memory ?
+                                                       0 : R600_RESOURCE_FLAG_READ_ONLY));
        if (!rctx->b.const_uploader)
                return false;
 
index d82e123b0818081e37f9c0e0524edd913bc6f800..4f3aa1fe3cebf1af404f32619694cdd6aaf0fc61 100644 (file)
@@ -54,6 +54,7 @@ struct si_context;
 #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_RESOURCE_FLAG_READ_ONLY           (PIPE_RESOURCE_FLAG_DRV_PRIV << 5)
+#define R600_RESOURCE_FLAG_32BIT               (PIPE_RESOURCE_FLAG_DRV_PRIV << 6)
 
 /* Debug flags. */
 enum {