mesa: raise error for glEnable(GL_VERTEX_ARRAY), etc. in core profile
authorBrian Paul <brianp@vmware.com>
Mon, 23 May 2016 16:28:24 +0000 (10:28 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 24 May 2016 16:26:26 +0000 (10:26 -0600)
commit55c19527a6c28e6a7d8984f6cb6d9ce9d553a5c3
treed0650f6fab4b22d770072fa7e0088c49ed8056cc
parenta9b2b5e24112c5aa6e5a82e72bc209e269359c20
mesa: raise error for glEnable(GL_VERTEX_ARRAY), etc. in core profile

Otherwise, if the call executes normally we'll hit an assertion later
in the VBO code when we draw something.  Note that these cases were
already handled correctly for the glIsEnabled() function (and the API
checks were copied from there).

Tested with new piglit gl-3.1-enable-vertex-array test.

v2: fix compat/es mix-up, per Ilia.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/main/enable.c