zink: always set VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT for non-staging resources

this is weird but sometimes gallium makes resources with bind==0, which will
crash later if we don't add this

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9066>
This commit is contained in:
Mike Blumenkrantz 2020-09-15 14:57:45 -04:00 committed by Marge Bot
parent bc37d882fc
commit 54cb05b46c

View file

@ -122,6 +122,9 @@ resource_create(struct pipe_screen *pscreen,
VK_BUFFER_USAGE_TRANSFER_DST_BIT |
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT;
if (templ->usage != PIPE_USAGE_STAGING)
bci.usage |= VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT;
/* apparently gallium thinks these are the jack-of-all-trades bind types */
if (templ->bind & (PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_QUERY_BUFFER)) {
bci.usage |= VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT |