aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-11-01 10:37:08 +0100
committerErik Faye-Lund <[email protected]>2019-11-06 11:37:36 +0000
commit7b9d17fe8410aff373a15145b7279ec3f0f65f81 (patch)
treea5ce0f7017a4d287a984e240ba1c08029f038152 /src
parent1277192d55cbcc4342027da0e77fa5b1e7637992 (diff)
zink: always allow sampling of images
This is required if we're going to blit from/to it using u_blitter.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/zink/zink_resource.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 09d84ba71a5..2785b986b30 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -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;