From: Roland Scheidegger Date: Tue, 9 Feb 2010 18:32:21 +0000 (+0100) Subject: Merge branch 'gallium-nopointsizeminmax' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=653a83445f94620673f747a4ace6847a2c7fdb4d;p=mesa.git Merge branch 'gallium-nopointsizeminmax' Conflicts: src/gallium/drivers/nv10/nv10_state.c src/gallium/drivers/nv20/nv20_state.c src/gallium/drivers/nv50/nv50_program.c --- 653a83445f94620673f747a4ace6847a2c7fdb4d diff --cc src/gallium/auxiliary/draw/draw_pipe_validate.c index a69e2633bec,ac29634d677..153097e543e --- a/src/gallium/auxiliary/draw/draw_pipe_validate.c +++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c @@@ -194,10 -194,10 +194,10 @@@ static struct draw_stage *validate_pipe if (wide_lines) { draw->pipeline.wide_line->next = next; next = draw->pipeline.wide_line; - precalc_flat = 1; + precalc_flat = TRUE; } - if (wide_points || draw->rasterizer->point_sprite) { + if (wide_points || draw->rasterizer->sprite_coord_enable) { draw->pipeline.wide_point->next = next; next = draw->pipeline.wide_point; } diff --cc src/gallium/docs/source/cso/rasterizer.rst index bfa4a1170a2,00d65fc598a..24cc78c68de --- a/src/gallium/docs/source/cso/rasterizer.rst +++ b/src/gallium/docs/source/cso/rasterizer.rst @@@ -119,21 -82,23 +119,23 @@@ point_size_per_verte Whether vertices have a point size element. point_size The size of points, if not specified per-vertex. - point_size_min - The minimum size of points. - point_size_max - The maximum size of points. - point_sprite - Whether points are drawn as sprites (textured quads) + sprite_coord_enable + Specifies if a coord has its texture coordinates replaced or not. This + is a packed bitfield containing the enable for all coords - if all are 0 + point sprites are effectively disabled, though points may still be + rendered slightly different according to point_quad_rasterization. + If any coord is non-zero, point_smooth should be disabled, and + point_quad_rasterization enabled. + If enabled, the four vertices of the resulting quad will be assigned + texture coordinates, according to sprite_coord_mode. sprite_coord_mode Specifies how the value for each shader output should be computed when - drawing sprites. If PIPE_SPRITE_COORD_NONE, don't change the vertex - shader output. Otherwise, the four vertices of the resulting quad will - be assigned texture coordinates. For PIPE_SPRITE_COORD_LOWER_LEFT, the - lower left vertex will have coordinate (0,0,0,1). + drawing sprites, for each coord which has sprite_coord_enable set. + For PIPE_SPRITE_COORD_LOWER_LEFT, the lower left vertex will have + coordinate (0,0,0,1). For PIPE_SPRITE_COORD_UPPER_LEFT, the upper-left vertex will have coordinate (0,0,0,1). - This state is needed by the 'draw' module because that's where each + This state is needed by :ref:`Draw` because that's where each point vertex is converted into four quad vertices. There's no other place to emit the new vertex texture coordinates which are required for sprite rendering. diff --cc src/gallium/drivers/nv50/nv50_program.c index 3653e606ef5,593d7436037..2372cbbef69 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@@ -4401,21 -4057,23 +4401,19 @@@ nv50_pntc_replace(struct nv50_context * continue; } - for (j = 0; j < vp->info.num_outputs; ++j) { - sn = vp->info.output_semantic_name[j]; - si = vp->info.output_semantic_index[j]; - - if (sn == fp->info.input_semantic_name[k] && - si == fp->info.input_semantic_index[k]) + for (j = 0; j < vp->cfg.out_nr; ++j) + if (vp->cfg.out[j].sn == fp->cfg.in[i].sn && + vp->cfg.out[j].si == fp->cfg.in[i].si) break; - } - if (j < vp->cfg.out_nr) { - ubyte mode = nv50->rasterizer->pipe.sprite_coord_mode[ - vp->cfg.out[j].si]; + if (j < vp->info.num_outputs) { + ubyte enable = - (nv50->rasterizer->pipe.sprite_coord_enable >> si) & 1; ++ (nv50->rasterizer->pipe.sprite_coord_enable >> vp->cfg.out[j].si) & 1; - if (mode == PIPE_SPRITE_COORD_NONE) { + if (enable == 0) { m += n; continue; - } else - if (mode == PIPE_SPRITE_COORD_LOWER_LEFT) - origin = 0; + } } /* this is either PointCoord or replaced by sprite coords */