zink: always set RESOURCE usage for descriptor buffers

all types of descriptors may use buffer-type descriptors, even samplers

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20912>
(cherry picked from commit cc9fa060ee)
This commit is contained in:
Mike Blumenkrantz 2023-01-25 11:44:06 -05:00 committed by Dylan Baker
parent 364a15c352
commit 3adff1c9d7
2 changed files with 4 additions and 2 deletions

View file

@ -499,7 +499,7 @@
"description": "zink: always set RESOURCE usage for descriptor buffers",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -1323,7 +1323,9 @@ zink_batch_descriptor_init(struct zink_screen *screen, struct zink_batch_state *
for (unsigned i = 0; i < ZINK_DESCRIPTOR_NON_BINDLESS_TYPES; i++) {
if (!screen->db_size[i])
continue;
unsigned bind = i == ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW ? ZINK_BIND_SAMPLER_DESCRIPTOR : ZINK_BIND_RESOURCE_DESCRIPTOR;
unsigned bind = ZINK_BIND_RESOURCE_DESCRIPTOR;
if (i == ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW)
bind |= ZINK_BIND_SAMPLER_DESCRIPTOR;
if (screen->compact_descriptors && i == ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW)
bind |= ZINK_BIND_RESOURCE_DESCRIPTOR;
struct pipe_resource *pres = pipe_buffer_create(&screen->base, bind, 0, screen->db_size[i]);