zink: always allow sampling of images
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 1 Nov 2019 09:37:08 +0000 (10:37 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 6 Nov 2019 11:37:36 +0000 (11:37 +0000)
This is required if we're going to blit from/to it using u_blitter.

src/gallium/drivers/zink/zink_resource.c

index 09d84ba71a517f38b19d0ea18b25753c8162a7e6..2785b986b3082c9fe44ec765490afd887967f3d8 100644 (file)
@@ -192,10 +192,9 @@ resource_create(struct pipe_screen *pscreen,
          ici.tiling = VK_IMAGE_TILING_LINEAR;
 
       /* sadly, gallium doesn't let us know if it'll ever need this, so we have to assume */
-      ici.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
-
-      if (templ->bind & PIPE_BIND_SAMPLER_VIEW)
-         ici.usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
+      ici.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
+                  VK_IMAGE_USAGE_TRANSFER_DST_BIT |
+                  VK_IMAGE_USAGE_SAMPLED_BIT;
 
       if (templ->bind & PIPE_BIND_SHADER_IMAGE)
          ici.usage |= VK_IMAGE_USAGE_STORAGE_BIT;