gallium/radeon: implement sparse buffer creation
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 7 Feb 2017 17:03:55 +0000 (18:03 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 5 Apr 2017 08:37:19 +0000 (10:37 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_buffer_common.c

index 5fde0d6c146839d34835286b677f95cb42b45445..a1e8228e6b3fa0fa236e5e88de5cf1887003750d 100644 (file)
@@ -543,6 +543,8 @@ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
 
        if (templ->bind & PIPE_BIND_SHARED)
                rbuffer->flags |= RADEON_FLAG_HANDLE;
+       if (templ->flags & PIPE_RESOURCE_FLAG_SPARSE)
+               rbuffer->flags |= RADEON_FLAG_SPARSE;
 
        if (!r600_alloc_resource(rscreen, rbuffer)) {
                FREE(rbuffer);