Mesa (master): svga: Stippled lines can also be drawn with triangles.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Feb 11 10:26:35 UTC 2011


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Feb 11 07:47:34 2011 +0000

svga: Stippled lines can also be drawn with triangles.

---

 src/gallium/drivers/svga/svga_pipe_rasterizer.c |    3 ++-
 src/gallium/drivers/svga/svga_swtnl_state.c     |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
index c6657e7..d391fde 100644
--- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c
+++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
@@ -108,7 +108,8 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
    }
 
    if (templ->line_stipple_enable) {
-      /* LinePattern not implemented on all backends. 
+      /* XXX: LinePattern not implemented on all backends, and there is no
+       * mechanism to query it.
        */
       if (!svga->debug.force_hw_line_stipple) {
          SVGA3dLinePattern lp;
diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c
index a759238..efda2f6 100644
--- a/src/gallium/drivers/svga/svga_swtnl_state.c
+++ b/src/gallium/drivers/svga/svga_swtnl_state.c
@@ -61,7 +61,7 @@ static void set_draw_viewport( struct svga_context *svga )
        * going to be drawn with triangles, but we're not catching all
        * cases where that will happen.
        */
-      if (svga->curr.rast->templ.line_width > 1.0) 
+      if (svga->curr.rast->need_pipeline & SVGA_PIPELINE_FLAG_LINES)
       {
          adjx = SVGA_LINE_ADJ_X + 0.175;
          adjy = SVGA_LINE_ADJ_Y - 0.175;




More information about the mesa-commit mailing list