Mesa (master): zink: always allow sampling of images
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 6 12:04:53 UTC 2019
Module: Mesa
Branch: master
Commit: 7b9d17fe8410aff373a15145b7279ec3f0f65f81
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b9d17fe8410aff373a15145b7279ec3f0f65f81
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Fri Nov 1 10:37:08 2019 +0100
zink: always allow sampling of images
This is required if we're going to blit from/to it using u_blitter.
---
src/gallium/drivers/zink/zink_resource.c | 7 +++----
1 file 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;
More information about the mesa-commit
mailing list