summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_private.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-10-17 12:07:32 -0600
committerBrian Paul <[email protected]>2015-10-20 19:14:51 -0600
commitb48e16fa2f8b96bb36a6e0a92b6d842c1c246006 (patch)
tree67ab298905c4b3d008de221eb12079b4848e94b9 /src/gallium/auxiliary/draw/draw_private.h
parent876d07d8377bb61417ba2f443afa8b7a30b9de81 (diff)
draw: fix splitting of line loops (v2)
When the draw module splits long line loops, the sections are emitted as line strips. But the primitive type wasn't set correctly so each section was being drawn as a loop, introducing extra line segments. To fix this, we pass a new DRAW_LINE_LOOP_AS_STRIP flag to the run() function. The linear/elt_run() functions have to check for this flag and set their primitive type accordingly. No piglit regressions. Fixes piglit's lineloop with -count 4097 or higher. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81174 Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_private.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 0ad94bb031f..5584c4a222c 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -355,8 +355,9 @@ struct draw_vertex_info {
};
/* these flags are set if the primitive is a segment of a larger one */
-#define DRAW_SPLIT_BEFORE 0x1
-#define DRAW_SPLIT_AFTER 0x2
+#define DRAW_SPLIT_BEFORE 0x1
+#define DRAW_SPLIT_AFTER 0x2
+#define DRAW_LINE_LOOP_AS_STRIP 0x4
struct draw_prim_info {
boolean linear;