From 5d06b2ac64ac313e1c429145d6010080f6b3b983 Mon Sep 17 00:00:00 2001 From: Aleksi Sapon Date: Tue, 26 Aug 2025 10:38:25 -0400 Subject: [PATCH] draw: don't set the clipped window coordinate to NaN in debug Setting the old window coordinate to NaN is more likely to hide the problem in debug builds because the NaN vertices are dropped later in the pipeline, either through explicit NaN checks or implicit line length checks. Reviewed-by: Erik Faye-Lund Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/draw/draw_cliptest_tmp.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h index 6471820b584..b4a7067baff 100644 --- a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h +++ b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h @@ -181,17 +181,6 @@ TAG(do_cliptest)(struct pt_post_vs *pvs, position[2] = position[2] * w * scale[2] + trans[2]; position[3] = w; } -#if MESA_DEBUG - /* For debug builds, set the clipped vertex's window coordinate - * to NaN to help catch potential errors later. - */ - else { - position[0] = - position[1] = - position[2] = - position[3] = NAN; - } -#endif if ((flags & DO_EDGEFLAG) && ef) { const float *edgeflag = out->data[ef];