Mesa (master): mesa: don't unroll glMultiDrawElements if one count is 0
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 01:10:27 UTC 2020
Module: Mesa
Branch: master
Commit: e636a062f1a555f8795b3e75d6f32c5042038ab1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e636a062f1a555f8795b3e75d6f32c5042038ab1
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed Feb 12 17:21:35 2020 -0500
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 <pierre-eric.pelloux-prayer at amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
---
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.
More information about the mesa-commit
mailing list