[Mesa-dev] [PATCH 09/16] vulkan/wsi: Add multiple planes to wsi_image_base

Daniel Stone daniel at fooishbar.org
Tue Feb 13 15:29:56 UTC 2018


Hi Jason,
This should be titled '... wsi_image', not '... wsi_image_base'.

On 9 February 2018 at 23:43, Jason Ekstrand <jason at jlekstrand.net> wrote:
> diff --git a/src/vulkan/wsi/wsi_common_private.h b/src/vulkan/wsi/wsi_common_private.h
> index 503b2a0..c5002ec 100644
> --- a/src/vulkan/wsi/wsi_common_private.h
> +++ b/src/vulkan/wsi/wsi_common_private.h
> @@ -35,10 +35,11 @@ struct wsi_image {
>        VkCommandBuffer *blit_cmd_buffers;
>     } prime;
>
> -   uint32_t size;
> -   uint32_t offset;
> -   uint32_t row_pitch;
> -   int fd;
> +   int num_planes;
> +   uint32_t sizes[4];
> +   uint32_t offsets[4];
> +   uint32_t row_pitches[4];
> +   int fds[4];
>  };

I'd also like to squash this in:
@@ -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;


Current users are safe, but it's allocated with zalloc(), and
debugging something with stdout having been closed can be pretty
frustrating. :)

Cheers,
Daniel


More information about the mesa-dev mailing list