Mesa (master): lavapipe: fix push descriptor set indexing
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Mar 12 21:13:26 UTC 2021
Module: Mesa
Branch: master
Commit: 536533f556b5a18df17313202549e90df10b7fe0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=536533f556b5a18df17313202549e90df10b7fe0
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Mar 12 08:53:21 2021 -0500
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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9558>
---
src/gallium/frontends/lavapipe/lvp_execute.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c
index 3a2870b52b9..a06dabd7dab 100644
--- a/src/gallium/frontends/lavapipe/lvp_execute.c
+++ b/src/gallium/frontends/lavapipe/lvp_execute.c
@@ -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];
More information about the mesa-commit
mailing list