svga: Stippled lines can also be drawn with triangles.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 11 Feb 2011 07:47:34 +0000 (07:47 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 11 Feb 2011 07:48:05 +0000 (07:48 +0000)
src/gallium/drivers/svga/svga_pipe_rasterizer.c
src/gallium/drivers/svga/svga_swtnl_state.c

index c6657e7..d391fde 100644 (file)
@@ -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;
index a759238..efda2f6 100644 (file)
@@ -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;