[Mesa-dev] [PATCH 1/4] svga: set POINTSIZEMIN to 1.0 for non-sprite non-aa points

Marek Olšák maraeo at gmail.com
Fri Jan 27 16:38:53 PST 2012


---
 src/gallium/drivers/svga/svga_state_rss.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c
index af68d9c..43516fa 100644
--- a/src/gallium/drivers/svga/svga_state_rss.c
+++ b/src/gallium/drivers/svga/svga_state_rss.c
@@ -78,6 +78,7 @@ static int emit_rss( struct svga_context *svga,
                      unsigned dirty )
 {
    struct rs_queue queue;
+   float point_size_min;
 
    queue.rs_count = 0;
 
@@ -211,14 +212,16 @@ static int emit_rss( struct svga_context *svga,
       if (svga->state.sw.need_pipeline)
          cullmode = SVGA3D_FACE_NONE;
 
+      point_size_min = curr->templ.point_quad_rasterization ||
+                       curr->templ.point_smooth ? 0.0f : 1.0f;
+
       EMIT_RS( svga, cullmode, CULLMODE, fail );
       EMIT_RS( svga, curr->scissortestenable, SCISSORTESTENABLE, fail );
       EMIT_RS( svga, curr->multisampleantialias, MULTISAMPLEANTIALIAS, fail );
       EMIT_RS( svga, curr->lastpixel, LASTPIXEL, fail );
       EMIT_RS( svga, curr->linepattern, LINEPATTERN, fail );
       EMIT_RS_FLOAT( svga, curr->pointsize, POINTSIZE, fail );
-      /* XXX still need to set this? */
-      EMIT_RS_FLOAT( svga, 0.0, POINTSIZEMIN, fail );
+      EMIT_RS_FLOAT( svga, point_size_min, POINTSIZEMIN, fail );
       EMIT_RS_FLOAT( svga, SVGA_MAX_POINTSIZE, POINTSIZEMAX, fail );
       EMIT_RS( svga, curr->pointsprite, POINTSPRITEENABLE, fail);
    }
-- 
1.7.5.4



More information about the mesa-dev mailing list