draw_vf.c \
draw_vf_generic.c \
draw_vf_sse.c \
- draw_wide_prims.c
+ draw_wide_line.c \
+ draw_wide_point.c
+
include ../../Makefile.template
'draw_vf.c',
'draw_vf_generic.c',
'draw_vf_sse.c',
- 'draw_wide_prims.c',
+ 'draw_wide_point.c',
+ 'draw_wide_line.c'
])
auxiliaries.insert(0, draw)
#endif
/* create pipeline stages */
- draw->pipeline.wide = draw_wide_stage( draw );
+ draw->pipeline.wide_line = draw_wide_line_stage( draw );
+ draw->pipeline.wide_point = draw_wide_point_stage( draw );
draw->pipeline.stipple = draw_stipple_stage( draw );
draw->pipeline.unfilled = draw_unfilled_stage( draw );
draw->pipeline.twoside = draw_twoside_stage( draw );
draw->shader_queue_flush = draw_vertex_shader_queue_flush;
+ /* these defaults are oriented toward the needs of softpipe */
draw->wide_point_threshold = 1000000.0; /* infinity */
- draw->convert_wide_lines = TRUE;
+ draw->wide_line_threshold = 1.0;
draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */
void draw_destroy( struct draw_context *draw )
{
- draw->pipeline.wide->destroy( draw->pipeline.wide );
+ draw->pipeline.wide_line->destroy( draw->pipeline.wide_line );
+ draw->pipeline.wide_point->destroy( draw->pipeline.wide_point );
draw->pipeline.stipple->destroy( draw->pipeline.stipple );
draw->pipeline.unfilled->destroy( draw->pipeline.unfilled );
draw->pipeline.twoside->destroy( draw->pipeline.twoside );
/**
- * Tells the draw module whether to convert wide lines (width != 1)
- * into triangles.
+ * Tells the draw module to draw lines with triangles if their width
+ * is greater than this threshold.
*/
void
-draw_convert_wide_lines(struct draw_context *draw, boolean enable)
+draw_wide_line_threshold(struct draw_context *draw, float threshold)
{
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
- draw->convert_wide_lines = enable;
+ draw->wide_line_threshold = threshold;
}
void draw_wide_point_threshold(struct draw_context *draw, float threshold);
-void draw_convert_wide_points(struct draw_context *draw, boolean enable);
-
-void draw_convert_wide_lines(struct draw_context *draw, boolean enable);
+void draw_wide_line_threshold(struct draw_context *draw, float threshold);
boolean draw_use_sse(struct draw_context *draw);
struct draw_stage *aapoint;
struct draw_stage *aaline;
struct draw_stage *pstipple;
- struct draw_stage *wide;
+ struct draw_stage *wide_line;
+ struct draw_stage *wide_point;
struct draw_stage *rasterize;
} pipeline;
unsigned nr_planes;
float wide_point_threshold; /**< convert pnts to tris if larger than this */
- boolean convert_wide_lines; /**< convert wide lines to tris? */
+ float wide_line_threshold; /**< convert lines to tris if wider than this */
boolean use_sse;
/* If a prim stage introduces new vertex attributes, they'll be stored here
extern struct draw_stage *draw_flatshade_stage( struct draw_context *context );
extern struct draw_stage *draw_cull_stage( struct draw_context *context );
extern struct draw_stage *draw_stipple_stage( struct draw_context *context );
-extern struct draw_stage *draw_wide_stage( struct draw_context *context );
+extern struct draw_stage *draw_wide_line_stage( struct draw_context *context );
+extern struct draw_stage *draw_wide_point_stage( struct draw_context *context );
extern struct draw_stage *draw_validate_stage( struct draw_context *context );
stage->next = next;
/* drawing wide lines? */
- wide_lines = (draw->rasterizer->line_width != 1.0
- && draw->convert_wide_lines
+ wide_lines = (draw->rasterizer->line_width > draw->wide_line_threshold
&& !draw->rasterizer->line_smooth);
/* drawing large points? */
next = draw->pipeline.aapoint;
}
- if (wide_lines ||
- wide_points ||
- draw->rasterizer->point_sprite) {
- draw->pipeline.wide->next = next;
- next = draw->pipeline.wide;
+ if (wide_lines) {
+ draw->pipeline.wide_line->next = next;
+ next = draw->pipeline.wide_line;
+ }
+
+ if (wide_points || draw->rasterizer->point_sprite) {
+ draw->pipeline.wide_point->next = next;
+ next = draw->pipeline.wide_point;
}
if (draw->rasterizer->line_stipple_enable) {