summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2021-03-12 08:53:21 -0500
committerDylan Baker <dylan.c.baker@intel.com>2021-03-15 11:37:35 -0700
commitdf545c771e99ddfad96ec8bfca16224a321b6932 (patch)
tree48f4d536fa3b713ad30c8dd2e991b106d5396941 /src
parent9286242e96b631759a62dcdde56dff67f3f98be8 (diff)
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: 6be19765cf2 ("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> (cherry picked from commit 536533f556b5a18df17313202549e90df10b7fe0)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/frontends/lavapipe/lvp_execute.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c
index cfc77ae38a9..f882de5b118 100644
--- a/src/gallium/frontends/lavapipe/lvp_execute.c
+++ b/src/gallium/frontends/lavapipe/lvp_execute.c
@@ -2354,7 +2354,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];
@@ -2388,6 +2390,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];