Mesa (main): lavapipe: add a pipeline library assert

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 24 00:28:19 UTC 2022


Module: Mesa
Branch: main
Commit: f8a92d28adc6208d8cb3c4a6d317acdb05149379
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8a92d28adc6208d8cb3c4a6d317acdb05149379

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Jun 23 10:27:51 2022 -0400

lavapipe: add a pipeline library assert

ensure that pipeline libraries are created with the library bit

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17219>

---

 src/gallium/frontends/lavapipe/lvp_pipeline.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c
index 7e546c32ae9..dda92404789 100644
--- a/src/gallium/frontends/lavapipe/lvp_pipeline.c
+++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c
@@ -1372,6 +1372,11 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
       }
    }
 
+   assert(pipeline->library || pipeline->stages == (VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT |
+                                                    VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT |
+                                                    VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT |
+                                                    VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT));
+
    pipeline->device = device;
 
    for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) {



More information about the mesa-commit mailing list