cso: add a couple sanity check assertions in cso_draw_vbo()

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
Brian Paul 2018-02-06 15:33:37 -07:00
parent 5cf342704d
commit b03ade55b9
1 changed files with 6 additions and 0 deletions

View File

@ -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 {