aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/draw.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-02-12 17:21:35 -0500
committerMarge Bot <[email protected]>2020-02-28 00:53:45 +0000
commite636a062f1a555f8795b3e75d6f32c5042038ab1 (patch)
treed7d022b6241173f80f245ee73f9d9a8403242ae3 /src/mesa/main/draw.c
parent4c5cd113b82b798634f9a71ef98241d8917c05e1 (diff)
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
Diffstat (limited to 'src/mesa/main/draw.c')
-rw-r--r--src/mesa/main/draw.c10
1 files changed, 0 insertions, 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.