diff options
author | Brian Paul <[email protected]> | 2018-02-06 15:33:37 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-02-08 09:49:03 -0700 |
commit | b03ade55b9fbb48b87123b2bd34a6c24ceb2b5b1 (patch) | |
tree | 866833dc6f6c0d3d7e56195221d5c2ddf7abd5f1 /src/gallium/auxiliary | |
parent | 5cf342704d4a481845f2f7c921dda5df5cf5a256 (diff) |
cso: add a couple sanity check assertions in cso_draw_vbo()
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index dd9821e8285..1b5d4b55987 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 { |