diff options
author | Eric Anholt <[email protected]> | 2018-10-26 18:02:20 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-11-27 15:03:02 -0800 |
commit | e113b21cb77976eb527373b50c03235448a83f51 (patch) | |
tree | fe8077d334411054f83733ff70c3f8b222da4534 /src/gallium/drivers/v3d/v3d_screen.c | |
parent | 55edafa73eccbb0cd04f5203dd47bc0840eda956 (diff) |
v3d: Add renderonly support.
I've been using this with the kmsro series to test v3d on VKMS without my
old KMS hack in the v3d kernel driver. KMSRO still needs some cleanup,
but v3d RO support seems reasonable.
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_screen.c')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_screen.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index 1d59dbfc12a..4ed40ff855d 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -465,7 +465,7 @@ v3d_screen_get_compiler_options(struct pipe_screen *pscreen, } struct pipe_screen * -v3d_screen_create(int fd) +v3d_screen_create(int fd, struct renderonly *ro) { struct v3d_screen *screen = rzalloc(NULL, struct v3d_screen); struct pipe_screen *pscreen; @@ -480,6 +480,14 @@ v3d_screen_create(int fd) pscreen->is_format_supported = v3d_screen_is_format_supported; screen->fd = fd; + if (ro) { + screen->ro = renderonly_dup(ro); + if (!screen->ro) { + fprintf(stderr, "Failed to dup renderonly object\n"); + ralloc_free(screen); + return NULL; + } + } list_inithead(&screen->bo_cache.time_list); (void)mtx_init(&screen->bo_handles_mutex, mtx_plain); screen->bo_handles = util_hash_table_create(handle_hash, handle_compare); |