OSDN Git Service

anv/wsi: create swapchain images using specified image usage
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 4 Jul 2016 17:06:58 +0000 (18:06 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 7 Jul 2016 15:12:32 +0000 (16:12 +0100)
commitd0e1d6b1c8eac4952497a6454345211cc58c6cba
tree8130bed9e99839b3b5b2101c69d7eda4f7d2d153
parent7d40db8cdb62d9f510a1f38e9df5b9552c7e6b20
anv/wsi: create swapchain images using specified image usage

The image usage specified by the caller of vkCreateSwapchainKHR should be
passed onto the internal image creation. Otherwise the driver might later
crash when the user tries to use the image as a combined sampler even though
the creation was explicitly created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT.

Leaving the previous VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT as this might be
expected even if the swapchain is created without any flag.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96791
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit dbbc4fb4cc8792fa25125a9c828b649d61113362)
src/intel/vulkan/anv_wsi_wayland.c
src/intel/vulkan/anv_wsi_x11.c