aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pipe_validate.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2011-02-11 11:14:27 +0000
committerJosé Fonseca <[email protected]>2011-02-11 11:24:55 +0000
commit4586e6c8cb5b391536a370faa0c419c3fd541693 (patch)
treea2ee659642b0c3a26576ab1b3cb39df84524bdec /src/gallium/auxiliary/draw/draw_pipe_validate.c
parent7ac2db893a87684641f298b40e25a3b2d9991b53 (diff)
draw: Don't use the pipeline when drawing lines with fractional widths.
Spotted by Jakob Bornecrantz.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_validate.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_validate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_validate.c b/src/gallium/auxiliary/draw/draw_pipe_validate.c
index c575a8ac7ca..27afba5af3d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_validate.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c
@@ -29,6 +29,7 @@
*/
#include "util/u_memory.h"
+#include "util/u_math.h"
#include "pipe/p_defines.h"
#include "draw_private.h"
#include "draw_pipe.h"
@@ -86,7 +87,7 @@ draw_need_pipeline(const struct draw_context *draw,
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 */
@@ -169,7 +170,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
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)? */