lavapipe: fix push descriptor set indexing

the push set index isn't always 0, so the offsets need to be updated
in order to avoid clobbering other sets

Fixes: 6be19765cf ("lavapipe: add support for VK_KHR_push_descriptor")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9558>
This commit is contained in:
Mike Blumenkrantz 2021-03-12 08:53:21 -05:00 committed by Marge Bot
parent 8e36f7da85
commit 536533f556
1 changed files with 7 additions and 1 deletions

View File

@ -2596,7 +2596,9 @@ static void handle_compute_push_descriptor_set(struct lvp_cmd_buffer_entry *cmd,
if (!(layout->shader_stages & VK_SHADER_STAGE_COMPUTE_BIT))
return;
for (unsigned i = 0; i < pds->set; i++) {
increment_dyn_info(dyn_info, pds->layout->set[i].layout, false);
}
unsigned info_idx = 0;
for (unsigned i = 0; i < pds->descriptor_write_count; i++) {
struct lvp_write_descriptor *desc = &pds->descriptors[i];
@ -2630,6 +2632,10 @@ static void handle_push_descriptor_set(struct lvp_cmd_buffer_entry *cmd,
handle_compute_push_descriptor_set(cmd, &dyn_info, state);
}
for (unsigned i = 0; i < pds->set; i++) {
increment_dyn_info(&dyn_info, pds->layout->set[i].layout, false);
}
unsigned info_idx = 0;
for (unsigned i = 0; i < pds->descriptor_write_count; i++) {
struct lvp_write_descriptor *desc = &pds->descriptors[i];