anv/wsi: create swapchain images using specified image usage
[mesa.git] / src / intel / vulkan / anv_wsi_x11.c
index d1e23a65d9878cf0eab97b1567d7d1764c259aa4..2895d6b7cfe50bbbdbd1ae92cd50a599a47f64f4 100644 (file)
@@ -606,7 +606,8 @@ x11_image_init(struct anv_device *device, struct x11_swapchain *chain,
          .samples = 1,
          /* FIXME: Need a way to use X tiling to allow scanout */
          .tiling = VK_IMAGE_TILING_OPTIMAL,
-         .usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
+         .usage = (pCreateInfo->imageUsage |
+                   VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT),
          .flags = 0,
       }},
       NULL,