vbo: fix parameter validation for saving dlist glDraw* functions
authorBrian Paul <brianp@vmware.com>
Thu, 2 May 2013 01:15:32 +0000 (19:15 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 2 May 2013 15:03:15 +0000 (09:03 -0600)
commitd6f3ef92d7cdc48c3fee50aac09e33148aec035f
treea2452b32c728d7f70cd0719333f9bcc2491c6026
parent94c7caf406debc0d35153267f491e30a203f9a72
vbo: fix parameter validation for saving dlist glDraw* functions

The _save_OBE_DrawArrays/Elements/RangeElements() functions are
called when building a display list and we know we're outside
glBegin/End.

We shouldn't call the normal _mesa_validate_DrawArrays/Elements()
functions here because those functions only work properly in immediate
mode or during dlist execution.  At dlist compile time, we can't call
_mesa_update_state(), etc. and examine the current state since it won't
apply when the list is executed later.

Fixes several failures in piglit's gl-1.0-beginend-coverage test.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/vbo/vbo_save_api.c