mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 05:00:09 +01:00
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:
parent
bc37d882fc
commit
54cb05b46c
1 changed files with 3 additions and 0 deletions
|
|
@ -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 |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue