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.
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 */