mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()
authorBrian Paul <brianp@vmware.com>
Wed, 21 Sep 2011 14:22:07 +0000 (08:22 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 21 Sep 2011 14:22:07 +0000 (08:22 -0600)
commit0e6646db3248057b7750031d825535cd7a0e5aec
tree25fc910e905a30d3b7c0d04c84e71305a6e76ca9
parent51002968c97758c30511eefab1bd1358b8380e15
mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()

We now raise an GL_INVALID_ENUM in glBegin() if mode is illegal, as was
done in Yuanhan Liu's original patch.

Take geometry shaders support into account too.

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
src/mesa/main/api_validate.c
src/mesa/main/api_validate.h
src/mesa/main/dlist.c
src/mesa/vbo/vbo_exec_api.c