diff options
author | Nicolai Hähnle <[email protected]> | 2017-11-23 10:29:49 +0100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-12-06 11:19:00 +0100 |
commit | 20ccb51ffcc46a68ab0eb82a43ed55a1e1952850 (patch) | |
tree | 91404eb0755a6d3913939473582924c77e111fce /src/gallium/drivers/radeon | |
parent | 5e2962c9492e6a948516f6360f973e2e92034b01 (diff) |
radeonsi: always place sparse buffers in VRAM
Together with "radeonsi: fix the R600_RESOURCE_FLAG_UNMAPPABLE check",
this ensures that sparse buffers are placed in VRAM.
Noticed by an assertion that started triggering with commit d4fac1e1d7
("gallium/radeon: enable suballocations for VRAM with no CPU access")
Fixes KHR-GL45.sparse_buffer_tests.BufferStorageTest in debug builds.
Reviewed-by: Marek Olšák <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index f1c4780dfea..09075f3ea29 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -610,6 +610,9 @@ static struct pipe_resource *si_buffer_create(struct pipe_screen *screen, struct si_screen *sscreen = (struct si_screen*)screen; struct r600_resource *rbuffer = r600_alloc_buffer_struct(screen, templ); + if (templ->flags & PIPE_RESOURCE_FLAG_SPARSE) + rbuffer->b.b.flags |= R600_RESOURCE_FLAG_UNMAPPABLE; + si_init_resource_fields(sscreen, rbuffer, templ->width0, alignment); if (templ->flags & PIPE_RESOURCE_FLAG_SPARSE) |