Mesa (main): crocus: change the line width workaround for gfx4/5

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Mar 4 00:17:50 UTC 2022


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Mar  3 15:37:25 2022 +1000

crocus: change the line width workaround for gfx4/5

This fixes piglit line-flat-clip-color and the hud fps counter.

Fixes: 6b7a68b7c21e ("crocus: add missing line smooth bits.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15229>

---

 src/gallium/drivers/crocus/ci/crocus-g41-fails.txt | 1 -
 src/gallium/drivers/crocus/crocus_state.c          | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/crocus/ci/crocus-g41-fails.txt b/src/gallium/drivers/crocus/ci/crocus-g41-fails.txt
index 76ac7966c62..ed25cfabe62 100644
--- a/src/gallium/drivers/crocus/ci/crocus-g41-fails.txt
+++ b/src/gallium/drivers/crocus/ci/crocus-g41-fails.txt
@@ -94,7 +94,6 @@ spec@!opengl 1.1 at windowoverlap,Fail
 spec@!opengl 1.1 at depthstencil-default_fb-blit,Fail
 
 spec@!opengl 1.1 at line-aa-width,Fail
-spec@!opengl 1.1 at line-flat-clip-color,Fail
 spec@!opengl 1.1 at linestipple,Fail
 spec@!opengl 1.1 at linestipple@Factor 2x,Fail
 spec@!opengl 1.1 at linestipple@Factor 3x,Fail
diff --git a/src/gallium/drivers/crocus/crocus_state.c b/src/gallium/drivers/crocus/crocus_state.c
index aeec07b6a2c..88c2a3b66df 100644
--- a/src/gallium/drivers/crocus/crocus_state.c
+++ b/src/gallium/drivers/crocus/crocus_state.c
@@ -1984,9 +1984,9 @@ get_line_width(const struct pipe_rasterizer_state *state)
        * "Grid Intersection Quantization" rules as specified by the
        * "Zero-Width (Cosmetic) Line Rasterization" section of the docs.
        */
-      line_width = 0.0f;
+      /* hack around this for gfx4/5 fps counters in hud. */
+      line_width = GFX_VER < 6 ? 1.5f : 0.0f;
    }
-
    return line_width;
 }
 



More information about the mesa-commit mailing list