X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsvga%2Fsvga_pipe_rasterizer.c;h=a9a23966d6b0fe97c79a817c8dc260db31e673f3;hb=725671a83a67cc8cf16c0913f6e1835fb272c2fb;hp=c6657e79ef3718569f3a4d5afceea90142b9d4a3;hpb=c523f31f4a35f8396ab35859c70fb041c210cedb;p=mesa.git diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c index c6657e79ef3..a9a23966d6b 100644 --- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c +++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c @@ -77,9 +77,8 @@ svga_create_rasterizer_state(struct pipe_context *pipe, /* point_quad_rasterization - ? */ /* point_size_per_vertex - ? */ /* sprite_coord_mode - ??? */ - /* bypass_vs_viewport_and_clip - handled by viewport setup */ /* flatshade_first - handled by index translation */ - /* gl_rasterization_rules - XXX - viewport code */ + /* half_pixel_center - XXX - viewport code */ /* line_width - draw module */ /* fill_cw, fill_ccw - draw module or index translation */ @@ -90,6 +89,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe, rast->multisampleantialias = templ->multisample; rast->antialiasedlineenable = templ->line_smooth; rast->lastpixel = templ->line_last_pixel; + rast->pointsprite = templ->sprite_coord_enable != 0x0; rast->pointsize = templ->point_size; rast->hw_unfilled = PIPE_POLYGON_MODE_FILL; @@ -100,15 +100,15 @@ svga_create_rasterizer_state(struct pipe_context *pipe, rast->need_pipeline_tris_str = "poly stipple"; } - if (templ->line_width != 1.0 && - templ->line_width != 0.0 && + if (templ->line_width >= 1.5f && !svga->debug.no_line_width) { rast->need_pipeline |= SVGA_PIPELINE_FLAG_LINES; rast->need_pipeline_lines_str = "line width"; } 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; @@ -127,6 +127,11 @@ svga_create_rasterizer_state(struct pipe_context *pipe, rast->need_pipeline_points_str = "smooth points"; } + if (templ->line_smooth) { + rast->need_pipeline |= SVGA_PIPELINE_FLAG_LINES; + rast->need_pipeline_lines_str = "smooth lines"; + } + { int fill_front = templ->fill_front; int fill_back = templ->fill_back; @@ -215,9 +220,6 @@ svga_create_rasterizer_state(struct pipe_context *pipe, rast->hw_unfilled = fill; } - - - if (rast->need_pipeline & SVGA_PIPELINE_FLAG_TRIS) { /* Turn off stuff which will get done in the draw module: */ @@ -235,11 +237,11 @@ static void svga_bind_rasterizer_state( struct pipe_context *pipe, struct svga_context *svga = svga_context(pipe); struct svga_rasterizer_state *raster = (struct svga_rasterizer_state *)state; - svga->curr.rast = raster; draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL, state); - + svga->curr.rast = raster; + svga->dirty |= SVGA_NEW_RAST; }