From: Erik Faye-Lund Date: Fri, 1 Nov 2019 09:37:08 +0000 (+0100) Subject: zink: always allow sampling of images X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b9d17fe8410aff373a15145b7279ec3f0f65f81;p=mesa.git zink: always allow sampling of images This is required if we're going to blit from/to it using u_blitter. --- 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;