Mesa (main): lavapipe: store whether the geometry shader outputs GL_LINES

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 5 07:41:39 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Jul  2 10:36:38 2021 -0400

lavapipe: store whether the geometry shader outputs GL_LINES

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

---

 src/gallium/frontends/lavapipe/lvp_pipeline.c | 3 +++
 src/gallium/frontends/lavapipe/lvp_private.h  | 1 +
 2 files changed, 4 insertions(+)

diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c
index 22312999129..f01f7b00bd2 100644
--- a/src/gallium/frontends/lavapipe/lvp_pipeline.c
+++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c
@@ -835,6 +835,9 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
          pipeline->pipeline_nir[MESA_SHADER_TESS_EVAL]->info.tess.ccw = !pipeline->pipeline_nir[MESA_SHADER_TESS_EVAL]->info.tess.ccw;
    }
 
+   pipeline->gs_output_lines = pipeline->pipeline_nir[MESA_SHADER_GEOMETRY] &&
+                               pipeline->pipeline_nir[MESA_SHADER_GEOMETRY]->info.gs.output_primitive == GL_LINES;
+
 
    bool has_fragment_shader = false;
    for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) {
diff --git a/src/gallium/frontends/lavapipe/lvp_private.h b/src/gallium/frontends/lavapipe/lvp_private.h
index 46b84ff28cb..35f2f07a71b 100644
--- a/src/gallium/frontends/lavapipe/lvp_private.h
+++ b/src/gallium/frontends/lavapipe/lvp_private.h
@@ -483,6 +483,7 @@ struct lvp_pipeline {
    uint16_t line_stipple_pattern;
    bool line_stipple_enable;
    bool line_smooth;
+   bool gs_output_lines;
    bool provoking_vertex_last;
 };
 



More information about the mesa-commit mailing list