Mesa (master): mesa: fix incorrect prim.begin/end for glMultiDrawElements

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 01:10:27 UTC 2020


Module: Mesa
Branch: master
Commit: 1a61a5b1d4693631a1b6fb7e83c877792dfbf33d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a61a5b1d4693631a1b6fb7e83c877792dfbf33d

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Thu Feb 13 22:56:54 2020 -0500

mesa: fix incorrect prim.begin/end for glMultiDrawElements

This has no effect on Gallium, but it affects tnl.

Cc: 19.3 20.0 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Mathias Fröhlich <mathias.froehlich at web.de>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>

---

 src/mesa/main/draw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c
index a997fcb670e..6877a6b06b6 100644
--- a/src/mesa/main/draw.c
+++ b/src/mesa/main/draw.c
@@ -1236,8 +1236,8 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
       ib.ptr = (void *) min_index_ptr;
 
       for (i = 0; i < primcount; i++) {
-         prim[i].begin = (i == 0);
-         prim[i].end = (i == primcount - 1);
+         prim[i].begin = 1;
+         prim[i].end = 1;
          prim[i].mode = mode;
          prim[i].start =
             ((uintptr_t) indices[i] - min_index_ptr) / index_type_size;



More information about the mesa-commit mailing list