draw->shader_queue_flush = draw_vertex_shader_queue_flush;
- draw->convert_wide_points = TRUE;
+ draw->wide_point_threshold = 1000000.0; /* infinity */
draw->convert_wide_lines = TRUE;
draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */
/**
- * Tells the draw module whether to convert wide points (size != 1)
- * into triangles.
+ * Tells the draw module to draw points with triangles if their size
+ * is greater than this threshold.
*/
void
-draw_convert_wide_points(struct draw_context *draw, boolean enable)
+draw_wide_point_threshold(struct draw_context *draw, float threshold)
{
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
- draw->convert_wide_points = enable;
+ draw->wide_point_threshold = threshold;
}
float plane[12][4];
unsigned nr_planes;
- boolean convert_wide_points; /**< convert wide points to tris? */
+ float wide_point_threshold; /**< convert pnts to tris if larger than this */
boolean convert_wide_lines; /**< convert wide lines to tris? */
boolean use_sse;
*/
stage->next = next;
+ /* drawing wide lines? */
+ wide_lines = (draw->rasterizer->line_width != 1.0
+ && draw->convert_wide_lines
+ && !draw->rasterizer->line_smooth);
+
+ /* drawing large points? */
+ if (draw->rasterizer->point_smooth && draw->pipeline.aapoint)
+ wide_points = FALSE;
+ else if (draw->rasterizer->point_size > draw->wide_point_threshold)
+ wide_points = TRUE;
+ else
+ wide_points = FALSE;
+
/*
* NOTE: we build up the pipeline in end-to-start order.
*
next = draw->pipeline.aapoint;
}
- /* drawing wide lines? */
- wide_lines = (draw->rasterizer->line_width != 1.0
- && draw->convert_wide_lines
- && !draw->rasterizer->line_smooth);
-
- /* drawing large points? */
- wide_points = (draw->rasterizer->point_size != 1.0
- && draw->convert_wide_points
- && !draw->pipeline.aapoint);
-
if (wide_lines ||
wide_points ||
draw->rasterizer->point_sprite) {
half_size = wide->half_point_size;
}
- left_adj = -half_size + 0.25f;
- right_adj = half_size + 0.25f;
+ left_adj = -half_size; /* + 0.25f;*/
+ right_adj = half_size; /* + 0.25f;*/
pos0[0] += left_adj;
pos0[1] -= half_size;
wide->half_point_size = 0.5f * draw->rasterizer->point_size;
- if (draw->rasterizer->point_size != 1.0) {
+ /* XXX we won't know the real size if it's computed by the vertex shader! */
+ if (draw->rasterizer->point_size > draw->wide_point_threshold) {
stage->point = wide_point;
}
else {
draw_install_pstipple_stage(softpipe->draw, &softpipe->pipe);
#endif
- /* sp_prim_setup can do wide points (don't convert to quads) */
- draw_convert_wide_points(softpipe->draw, FALSE);
-
sp_init_surface_functions(softpipe);
return &softpipe->pipe;