From 7b9d17fe8410aff373a15145b7279ec3f0f65f81 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 1 Nov 2019 10:37:08 +0100 Subject: [PATCH] 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; -- 2.30.2