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)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 4 Jul 2016 17:15:48 +0000 (10:15 -0700)
commitdbbc4fb4cc8792fa25125a9c828b649d61113362
tree04e718150eece7f160df43bb668158e190a8b099
parent51227b41c6b026f5b0a3925093b91800cdfcc923
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>
src/intel/vulkan/anv_wsi_wayland.c
src/intel/vulkan/anv_wsi_x11.c