From e636a062f1a555f8795b3e75d6f32c5042038ab1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 12 Feb 2020 17:21:35 -0500 Subject: [PATCH] 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: --- src/mesa/main/draw.c | 10 ---------- 1 file changed, 10 deletions(-) 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. -- 2.30.2