summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2023-04-06 19:08:06 -0400
committerMarge Bot <emma+marge@anholt.net>2023-04-10 21:35:57 +0000
commite33fda373253fa28afec8387d20b243ed8c2dbbb (patch)
treec4af6ea54f650dc4c533d7a7cbb29b623457cafb
parent14be6b084e7321a6a88bf7d17caf120037b2552d (diff)
downloadmesa-e33fda373253fa28afec8387d20b243ed8c2dbbb.tar.gz
mesa-e33fda373253fa28afec8387d20b243ed8c2dbbb.tar.bz2
mesa-e33fda373253fa28afec8387d20b243ed8c2dbbb.zip
lavapipe: copy fragment shader when merging GPL pipelines
this otherwise loses access data and causes flakiness with atomic ops Fixes: 6e5fe71599b ("lavapipe: split out shader struct members into their own struct") Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22352>
-rw-r--r--src/gallium/frontends/lavapipe/lvp_pipeline.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c
index 5468abafe80..8fb207dad19 100644
--- a/src/gallium/frontends/lavapipe/lvp_pipeline.c
+++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c
@@ -830,8 +830,12 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
pipeline->shaders[i].tess_ccw = NULL; //this gets handled later
}
}
- if (p->stages & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT)
+ if (p->stages & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT) {
pipeline->force_min_sample = p->force_min_sample;
+ memcpy(&pipeline->shaders[MESA_SHADER_FRAGMENT], &p->shaders[MESA_SHADER_FRAGMENT], sizeof(struct lvp_shader));
+ pipeline->shaders[MESA_SHADER_FRAGMENT].pipeline_nir = NULL; //this gets handled later
+ pipeline->shaders[MESA_SHADER_FRAGMENT].tess_ccw = NULL; //this gets handled later
+ }
if (p->stages & layout_stages) {
if (!layout || (layout->vk.create_flags & VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT))
merge_layouts(&device->vk, pipeline, p->layout);