From 5e019269d64f006ee870d47df9845d554a6851a5 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Tue, 15 Jun 2021 22:25:12 -0700 Subject: [PATCH] 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 Part-of: --- 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 91a0e00..ab6fbba 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 15e4d25..1069954 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 7335e0c..d2c84cf 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 53ec0d0..8ea1586 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) { -- 2.7.4