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.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.c')
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 90ed07b7857..f257eb08755 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -201,6 +201,8 @@ wsi_create_native_image(const struct wsi_swapchain *chain, VkResult result; memset(image, 0, sizeof(*image)); + for (int i = 0; i < ARRAY_SIZE(image->fds); i++) + image->fds[i] = -1; const struct wsi_image_create_info image_wsi_info = { .sType = VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA, @@ -289,10 +291,11 @@ wsi_create_native_image(const struct wsi_swapchain *chain, if (result != VK_SUCCESS) goto fail; - image->size = reqs.size; - image->row_pitch = image_layout.rowPitch; - image->offset = 0; - image->fd = fd; + image->num_planes = 1; + image->sizes[0] = reqs.size; + image->row_pitches[0] = image_layout.rowPitch; + image->offsets[0] = 0; + image->fds[0] = fd; return VK_SUCCESS; @@ -491,10 +494,11 @@ wsi_create_prime_image(const struct wsi_swapchain *chain, if (result != VK_SUCCESS) goto fail; - image->size = linear_size; - image->row_pitch = linear_stride; - image->offset = 0; - image->fd = fd; + image->num_planes = 1; + image->sizes[0] = linear_size; + image->row_pitches[0] = linear_stride; + image->offsets[0] = 0; + image->fds[0] = fd; return VK_SUCCESS; |