struct draw_stage stage;
float half_point_size;
- float point_size_min;
- float point_size_max;
float xbias;
float ybias;
/* point size is either per-vertex or fixed size */
if (wide->psize_slot >= 0) {
half_size = header->v[0]->data[wide->psize_slot][0];
-
- /* XXX: temporary -- do this in the vertex shader??
- */
- half_size = CLAMP(half_size,
- wide->point_size_min,
- wide->point_size_max);
-
half_size *= 0.5f;
}
else {
struct draw_context *draw = stage->draw;
wide->half_point_size = 0.5f * draw->rasterizer->point_size;
- wide->point_size_min = draw->rasterizer->point_size_min;
- wide->point_size_max = draw->rasterizer->point_size_max;
wide->xbias = 0.0;
wide->ybias = 0.0;
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_mode
key->point_sprite = rast->point_sprite;
key->point_attenuated = rast->point_size_per_vertex;
- key->point_size = CLAMP(rast->point_size,
- rast->point_size_min,
- rast->point_size_max);
+ key->point_size = rast->point_size;
}
static enum pipe_error
rs->point_size = pack_float_16_6x(state->point_size) |
(pack_float_16_6x(state->point_size) << R300_POINTSIZE_X_SHIFT);
- rs->point_minmax =
- ((int)(state->point_size_min * 6.0) <<
+ /* set hw limits - clamping done by state tracker in vs or point_size
+ XXX always need to emit this? */
+ rs->point_minmax =
+ ((int)(0.0 * 6.0) <<
R300_GA_POINT_MINMAX_MIN_SHIFT) |
- ((int)(state->point_size_max * 6.0) <<
+ ((int)(4096.0 * 6.0) <<
R300_GA_POINT_MINMAX_MAX_SHIFT);
rs->line_control = pack_float_16_6x(state->line_width) |
#define SVGA_TEX_UNITS 8
+#define SVGA_MAX_POINTSIZE 80.0
struct draw_vertex_shader;
struct svga_shader_result;
float slopescaledepthbias;
float depthbias;
float pointsize;
- float pointsize_min;
- float pointsize_max;
unsigned hw_unfilled:16; /* PIPE_POLYGON_MODE_x */
unsigned need_pipeline:16; /* which prims do we need help for? */
rast->antialiasedlineenable = templ->line_smooth;
rast->lastpixel = templ->line_last_pixel;
rast->pointsize = templ->point_size;
- rast->pointsize_min = templ->point_size_min;
- rast->pointsize_max = templ->point_size_max;
rast->hw_unfilled = PIPE_POLYGON_MODE_FILL;
/* Use swtnl + decomposition implement these:
/* Keep this to a reasonable size to avoid failures in
* conform/pntaa.c:
*/
- return 80.0;
+ return SVGA_MAX_POINTSIZE;
case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
return 4.0;
EMIT_RS( svga, curr->lastpixel, LASTPIXEL, fail );
EMIT_RS( svga, curr->linepattern, LINEPATTERN, fail );
EMIT_RS_FLOAT( svga, curr->pointsize, POINTSIZE, fail );
- EMIT_RS_FLOAT( svga, curr->pointsize_min, POINTSIZEMIN, fail );
- EMIT_RS_FLOAT( svga, curr->pointsize_max, POINTSIZEMAX, fail );
+ /* XXX still need to set this? */
+ EMIT_RS_FLOAT( svga, 0.0, POINTSIZEMIN, fail );
+ EMIT_RS_FLOAT( svga, SVGA_MAX_POINTSIZE, POINTSIZEMAX, fail );
}
if (dirty & (SVGA_NEW_RAST | SVGA_NEW_FRAME_BUFFER | SVGA_NEW_NEED_PIPELINE))
trace_dump_member(float, state, line_width);
trace_dump_member(float, state, point_size);
- trace_dump_member(float, state, point_size_min);
- trace_dump_member(float, state, point_size_max);
trace_dump_member(float, state, offset_units);
trace_dump_member(float, state, offset_scale);
float line_width;
float point_size; /**< used when no per-vertex size */
- float point_size_min; /* XXX - temporary, will go away */
- float point_size_max; /* XXX - temporary, will go away */
float offset_units;
float offset_scale;
ubyte sprite_coord_mode[PIPE_MAX_SHADER_OUTPUTS]; /**< PIPE_SPRITE_COORD_ */
*/
raster->point_size = ctx->Point.Size;
- raster->point_size_min = 0; /* temporary, will go away */
- raster->point_size_max = 1000; /* temporary, will go away */
-
raster->point_smooth = ctx->Point.SmoothFlag;
raster->point_sprite = ctx->Point.PointSprite;
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {