From: Marek Olšák Date: Wed, 12 Feb 2020 22:21:35 +0000 (-0500) Subject: mesa: don't unroll glMultiDrawElements if one count is 0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e636a062f1a555f8795b3e75d6f32c5042038ab1;p=mesa.git mesa: don't unroll glMultiDrawElements if one count is 0 let the driver skip or submit an empty draw call. Acked-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Ian Romanick Part-of: --- diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index 3a7c390784d..aa4934fdb27 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -1212,16 +1212,6 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode, } } - /* Draw primitives individually if one count is zero, so we can easily skip - * that primitive. - */ - for (i = 0; i < primcount; i++) { - if (count[i] == 0) { - fallback = GL_TRUE; - break; - } - } - /* If the index buffer isn't in a VBO, then treating the application's * subranges of the index buffer as one large index buffer may lead to * us reading unmapped memory.