Mesa (master): cso: add a couple sanity check assertions in cso_draw_vbo()
Brian Paul
brianp at kemper.freedesktop.org
Thu Feb 8 17:31:20 UTC 2018
Module: Mesa
Branch: master
Commit: b03ade55b9fbb48b87123b2bd34a6c24ceb2b5b1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b03ade55b9fbb48b87123b2bd34a6c24ceb2b5b1
Author: Brian Paul <brianp at vmware.com>
Date: Tue Feb 6 15:33:37 2018 -0700
cso: add a couple sanity check assertions in cso_draw_vbo()
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
---
src/gallium/auxiliary/cso_cache/cso_context.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index dd9821e828..1b5d4b5598 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1686,6 +1686,12 @@ cso_draw_vbo(struct cso_context *cso,
{
struct u_vbuf *vbuf = cso->vbuf;
+ /* We can't have both indirect drawing and SO-vertex-count drawing */
+ assert(info->indirect == NULL || info->count_from_stream_output == NULL);
+
+ /* We can't have SO-vertex-count drawing with an index buffer */
+ assert(info->count_from_stream_output == NULL || info->index_size == 0);
+
if (vbuf) {
u_vbuf_draw_vbo(vbuf, info);
} else {
More information about the mesa-commit
mailing list