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_x11.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_x11.c')
-rw-r--r-- | src/vulkan/wsi/wsi_common_x11.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index c29e0a2d30d..b42b8234064 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -936,18 +936,21 @@ x11_image_init(VkDevice device_h, struct x11_swapchain *chain, image->pixmap = xcb_generate_id(chain->conn); + /* Without passing modifiers, we can't have multi-plane RGB images. */ + assert(image->base.num_planes == 1); + cookie = xcb_dri3_pixmap_from_buffer_checked(chain->conn, image->pixmap, chain->window, - image->base.size, + image->base.sizes[0], pCreateInfo->imageExtent.width, pCreateInfo->imageExtent.height, - image->base.row_pitch, + image->base.row_pitches[0], chain->depth, bpp, - image->base.fd); + image->base.fds[0]); xcb_discard_reply(chain->conn, cookie.sequence); - image->base.fd = -1; /* XCB has now taken ownership of the FD */ + image->base.fds[0] = -1; /* XCB has now taken ownership of the FD */ int fence_fd = xshmfence_alloc_shm(); if (fence_fd < 0) |