Mesa (master): v3d: Enable perpendicular line caps when line smoothing

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 6 22:32:48 UTC 2020


Module: Mesa
Branch: master
Commit: 137d8f98897de678b0ac6f31e535131c590e4368
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=137d8f98897de678b0ac6f31e535131c590e4368

Author: Neil Roberts <nroberts at igalia.com>
Date:   Mon Jun 22 12:50:18 2020 +0200

v3d: Enable perpendicular line caps when line smoothing

V3D has a bit to set the line caps to be perpendicular to the line
rather than aligned to the edges of the framebuffer. I don’t know what
the disadvantages are of enabling this, but I noticed by experimentation
that enabling line smoothing on the Intel driver also enables nicer line
caps, so it seems nice to enable it here too.

Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5624>

---

 src/gallium/drivers/v3d/v3dx_emit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c
index 2dad2e0e246..7a1d04efeb5 100644
--- a/src/gallium/drivers/v3d/v3dx_emit.c
+++ b/src/gallium/drivers/v3d/v3dx_emit.c
@@ -527,6 +527,12 @@ v3dX(emit_state)(struct pipe_context *pctx)
 
                         config.stencil_enable =
                                 v3d->zsa->base.stencil[0].enabled;
+
+                        /* Use nicer line caps when line smoothing is
+                         * enabled
+                         */
+                        config.line_rasterization =
+                                v3d_line_smoothing_enabled(v3d) ? 1 : 0;
                 }
 
         }



More information about the mesa-commit mailing list