Mesa (main): gallium/draw: Garbage collect draw_set_force_passthrough

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 21 20:47:27 UTC 2021


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

Author: Emma Anholt <emma at anholt.net>
Date:   Tue Jun 15 22:25:12 2021 -0700

gallium/draw: Garbage collect draw_set_force_passthrough

Introduced in c48da7d78b4e ("draw: add switch for drivers to force vertex
data passthrough") in 2008 and never used.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11410>

---

 src/gallium/auxiliary/draw/draw_context.c |  8 -------
 src/gallium/auxiliary/draw/draw_context.h |  4 ----
 src/gallium/auxiliary/draw/draw_private.h |  2 --
 src/gallium/auxiliary/draw/draw_pt.c      | 40 ++++++++++++++-----------------
 4 files changed, 18 insertions(+), 36 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 91a0e003d0d..ab6fbbaba26 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -583,14 +583,6 @@ draw_enable_point_sprites(struct draw_context *draw, boolean enable)
 }
 
 
-void
-draw_set_force_passthrough( struct draw_context *draw, boolean enable )
-{
-   draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
-   draw->force_passthrough = enable;
-}
-
-
 
 /**
  * Allocate an extra vertex/geometry shader vertex attribute, if it doesn't
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index 15e4d25acf6..1069954c9ef 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -344,10 +344,6 @@ void draw_set_driver_clipping( struct draw_context *draw,
                                boolean guard_band_xy,
                                boolean bypass_clip_points);
 
-void draw_set_force_passthrough( struct draw_context *draw, 
-                                 boolean enable );
-
-
 /*******************************************************************************
  * Draw statistics
  */
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 7335e0cb24a..d2c84cfedc9 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -284,8 +284,6 @@ struct draw_context
    boolean guard_band_xy;
    boolean guard_band_points_xy;
 
-   boolean force_passthrough; /**< never clip or shade */
-
    boolean dump_vs;
 
    /** Depth format and bias related settings. */
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index 53ec0d099a9..8ea15863d49 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -62,33 +62,29 @@ draw_pt_arrays(struct draw_context *draw,
 {
    struct draw_pt_front_end *frontend = NULL;
    struct draw_pt_middle_end *middle = NULL;
-   unsigned opt = 0;
+   unsigned opt = PT_SHADE;
 
-   if (!draw->force_passthrough) {
-      unsigned out_prim = prim;
+   unsigned out_prim = prim;
 
-      if (draw->gs.geometry_shader)
-         out_prim = draw->gs.geometry_shader->output_primitive;
-      else if (draw->tes.tess_eval_shader)
-         out_prim = get_tes_output_prim(draw->tes.tess_eval_shader);
+   if (draw->gs.geometry_shader)
+      out_prim = draw->gs.geometry_shader->output_primitive;
+   else if (draw->tes.tess_eval_shader)
+      out_prim = get_tes_output_prim(draw->tes.tess_eval_shader);
 
-      if (!draw->render) {
-         opt |= PT_PIPELINE;
-      }
-
-      if (draw_need_pipeline(draw,
-                             draw->rasterizer,
-                             out_prim)) {
-         opt |= PT_PIPELINE;
-      }
+   if (!draw->render) {
+      opt |= PT_PIPELINE;
+   }
 
-      if ((draw->clip_xy ||
-           draw->clip_z ||
-           draw->clip_user) && !draw->pt.test_fse) {
-         opt |= PT_CLIPTEST;
-      }
+   if (draw_need_pipeline(draw,
+                           draw->rasterizer,
+                           out_prim)) {
+      opt |= PT_PIPELINE;
+   }
 
-      opt |= PT_SHADE;
+   if ((draw->clip_xy ||
+         draw->clip_z ||
+         draw->clip_user) && !draw->pt.test_fse) {
+      opt |= PT_CLIPTEST;
    }
 
    if (draw->pt.middle.llvm) {



More information about the mesa-commit mailing list