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>
This commit is contained in:
Mike Blumenkrantz
2023-01-25 11:44:06 -05:00
committed by Marge Bot
parent 59989d0462
commit cc9fa060ee

View File

@@ -1317,7 +1317,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]);