summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-15 20:44:24 +0100
committerMarek Olšák <[email protected]>2017-02-18 01:22:08 +0100
commit45240ce598c8ab38b5e0c10cbe7050549561eced (patch)
tree70308306e07a9ca58951c8fb992fb623864cd496 /src/gallium/drivers/radeonsi/si_pipe.c
parenta41587433c4dfd359eebf3fd266975e51e8b3fd6 (diff)
radeonsi: use R600_RESOURCE_FLAG_UNMAPPABLE where it's desirable
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index a947bad5e42..843c6b349b7 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -204,8 +204,9 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
}
sctx->ce_suballocator =
- u_suballocator_create(&sctx->b.b, 1024 * 1024,
- 0, PIPE_USAGE_DEFAULT, 0, false);
+ u_suballocator_create(&sctx->b.b, 1024 * 1024, 0,
+ PIPE_USAGE_DEFAULT,
+ R600_RESOURCE_FLAG_UNMAPPABLE, false);
if (!sctx->ce_suballocator)
goto fail;
}
@@ -257,8 +258,11 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
/* CIK cannot unbind a constant buffer (S_BUFFER_LOAD doesn't skip loads
* if NUM_RECORDS == 0). We need to use a dummy buffer instead. */
if (sctx->b.chip_class == CIK) {
- sctx->null_const_buf.buffer = pipe_buffer_create(screen, PIPE_BIND_CONSTANT_BUFFER,
- PIPE_USAGE_DEFAULT, 16);
+ sctx->null_const_buf.buffer =
+ r600_aligned_buffer_create(screen,
+ R600_RESOURCE_FLAG_UNMAPPABLE,
+ PIPE_USAGE_DEFAULT, 16,
+ sctx->screen->b.info.tcc_cache_line_size);
if (!sctx->null_const_buf.buffer)
goto fail;
sctx->null_const_buf.buffer_size = sctx->null_const_buf.buffer->width0;