Mesa (main): vbo: merge draws with GL_LINES regardless of line stippling
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 31 23:25:49 UTC 2021
Module: Mesa
Branch: main
Commit: 43041f244793c26e1e8b2594a19f04a905c0cccb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=43041f244793c26e1e8b2594a19f04a905c0cccb
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed Jun 16 20:07:48 2021 -0400
vbo: merge draws with GL_LINES regardless of line stippling
see the code comment
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12265>
---
src/mesa/vbo/vbo_exec.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index 7bc8520cff9..bc8e6448b16 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -186,12 +186,13 @@ vbo_merge_draws(struct gl_context *ctx, bool in_dlist,
/* This checks whether mode is equal to any line primitive type, taking
* advantage of the fact that primitives types go from 0 to 14.
+ *
+ * Lines and lines with adjacency reset the line stipple pattern for every
+ * primitive, so draws can be merged even if line stippling is enabled.
*/
if ((1 << mode0) &
- ((1 << GL_LINES) |
- (1 << GL_LINE_LOOP) |
+ ((1 << GL_LINE_LOOP) |
(1 << GL_LINE_STRIP) |
- (1 << GL_LINES_ADJACENCY) |
(1 << GL_LINE_STRIP_ADJACENCY))) {
/* "begin" resets the line stipple pattern during line stipple emulation
* in tnl.
More information about the mesa-commit
mailing list