mesa: fix incorrect prim.begin/end for glMultiDrawElements
authorMarek Olšák <marek.olsak@amd.com>
Fri, 14 Feb 2020 03:56:54 +0000 (22:56 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Feb 2020 00:53:45 +0000 (00:53 +0000)
This has no effect on Gallium, but it affects tnl.

Cc: 19.3 20.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Mathias Fröhlich <mathias.froehlich@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

index a997fcb670e9334ef2a1dbc8e80e77aa502ba4dd..6877a6b06b6a059b3e6106920ce6f7eb2d251090 100644 (file)
@@ -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;