Spotted by Jakob Bornecrantz.
draw_wide_line_threshold(struct draw_context *draw, float threshold)
{
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
- draw->pipeline.wide_line_threshold = threshold;
+ draw->pipeline.wide_line_threshold = roundf(threshold);
}
return FALSE;
/* these defaults are oriented toward the needs of softpipe */
- draw->pipeline.wide_point_threshold = 1000000.0; /* infinity */
- draw->pipeline.wide_line_threshold = 1.0;
+ draw->pipeline.wide_point_threshold = 1000000.0f; /* infinity */
+ draw->pipeline.wide_line_threshold = 1.0f;
draw->pipeline.wide_point_sprites = FALSE;
draw->pipeline.line_stipple = TRUE;
draw->pipeline.point_sprite = TRUE;
*/
#include "util/u_memory.h"
+#include "util/u_math.h"
#include "pipe/p_defines.h"
#include "draw_private.h"
#include "draw_pipe.h"
return TRUE;
/* wide lines */
- if (rasterizer->line_width > draw->pipeline.wide_line_threshold)
+ if (roundf(rasterizer->line_width) > draw->pipeline.wide_line_threshold)
return TRUE;
/* AA lines */
stage->next = next;
/* drawing wide lines? */
- wide_lines = (rast->line_width > draw->pipeline.wide_line_threshold
+ wide_lines = (roundf(rast->line_width) > draw->pipeline.wide_line_threshold
&& !rast->line_smooth);
/* drawing large/sprite points (but not AA points)? */