diff options
author | Daniel Stone <[email protected]> | 2018-02-09 15:43:25 -0800 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2018-02-21 22:37:10 +0000 |
commit | 61c3feb38dcae3feb1176426903ca8e0046edd12 (patch) | |
tree | dacc4ffb991846552e5f25e97363c640a3546bd9 /src/vulkan/wsi/wsi_common_wayland.c | |
parent | cdeac002677774b14b78bb234aa082bbc499f933 (diff) |
vulkan/wsi: Add multiple planes to wsi_image
Not currently used.
Signed-off-by: Daniel Stone <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/vulkan/wsi/wsi_common_wayland.c')
-rw-r--r-- | src/vulkan/wsi/wsi_common_wayland.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index be7635bbf84..8290170c9ec 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -712,15 +712,18 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain, if (result != VK_SUCCESS) return result; + /* Without passing modifiers, we can't have multi-plane RGB images. */ + assert(image->base.num_planes == 1); + image->buffer = wl_drm_create_prime_buffer(chain->drm_wrapper, - image->base.fd, /* name */ + image->base.fds[0], /* name */ chain->extent.width, chain->extent.height, chain->drm_format, - image->base.offset, - image->base.row_pitch, + image->base.offsets[0], + image->base.row_pitches[0], 0, 0, 0, 0 /* unused */); - close(image->base.fd); + close(image->base.fds[0]); if (!image->buffer) goto fail_image; |