[Mesa-dev] [PATCH] vulkan: Allow storage images in the WSI.

Jason Ekstrand jason at jlekstrand.net
Wed Nov 21 19:09:25 UTC 2018


We don't support storage on any WSI image formats but that shouldn't be an
actual problem.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Tue, Nov 20, 2018 at 3:30 PM Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
wrote:

> Since apps also have to follow the ImageFormatProperties query,
> we can disallow formats that don't allow image stores (for AMD
> that would be SRGB formats).
>
> Note that this only affects anything if the app actually decides
> to use the flag.
>
> Had someone ask for this on IRC and at least on the AMD side we
> can support it.
>
> CC: Jason Ekstrand <jason at jlekstrand.net>
> ---
>  src/vulkan/wsi/wsi_common_display.c | 1 +
>  src/vulkan/wsi/wsi_common_wayland.c | 1 +
>  src/vulkan/wsi/wsi_common_x11.c     | 1 +
>  3 files changed, 3 insertions(+)
>
> diff --git a/src/vulkan/wsi/wsi_common_display.c
> b/src/vulkan/wsi/wsi_common_display.c
> index fd0d30ad80c..edfb166fa69 100644
> --- a/src/vulkan/wsi/wsi_common_display.c
> +++ b/src/vulkan/wsi/wsi_common_display.c
> @@ -834,6 +834,7 @@ wsi_display_surface_get_capabilities(VkIcdSurfaceBase
> *surface_base,
>        VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
>        VK_IMAGE_USAGE_SAMPLED_BIT |
>        VK_IMAGE_USAGE_TRANSFER_DST_BIT |
> +      VK_IMAGE_USAGE_STORAGE_BIT |
>        VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
>
>     return VK_SUCCESS;
> diff --git a/src/vulkan/wsi/wsi_common_wayland.c
> b/src/vulkan/wsi/wsi_common_wayland.c
> index 3d3a60167bf..c0132566ead 100644
> --- a/src/vulkan/wsi/wsi_common_wayland.c
> +++ b/src/vulkan/wsi/wsi_common_wayland.c
> @@ -508,6 +508,7 @@ wsi_wl_surface_get_capabilities(VkIcdSurfaceBase
> *surface,
>        VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
>        VK_IMAGE_USAGE_SAMPLED_BIT |
>        VK_IMAGE_USAGE_TRANSFER_DST_BIT |
> +      VK_IMAGE_USAGE_STORAGE_BIT |
>        VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
>
>     return VK_SUCCESS;
> diff --git a/src/vulkan/wsi/wsi_common_x11.c
> b/src/vulkan/wsi/wsi_common_x11.c
> index c740726fe54..6146c8f3da8 100644
> --- a/src/vulkan/wsi/wsi_common_x11.c
> +++ b/src/vulkan/wsi/wsi_common_x11.c
> @@ -515,6 +515,7 @@ x11_surface_get_capabilities(VkIcdSurfaceBase
> *icd_surface,
>        VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
>        VK_IMAGE_USAGE_SAMPLED_BIT |
>        VK_IMAGE_USAGE_TRANSFER_DST_BIT |
> +      VK_IMAGE_USAGE_STORAGE_BIT |
>        VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
>
>     return VK_SUCCESS;
> --
> 2.19.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181121/8ac657e9/attachment-0001.html>


More information about the mesa-dev mailing list