Remove error when calling glGenQueries/glDeleteQueries while a query is active
authorCarl Worth <cworth@cworth.org>
Thu, 17 Oct 2013 17:54:56 +0000 (10:54 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 28 Oct 2013 19:56:49 +0000 (12:56 -0700)
commit29996e219912fb1fdf35a6595d8f6261384a18dc
treec39102134d27050839bf6a1af725bbe5e66e9281
parent5563dfabc8c1b7cc1a67e4d64311ea29aef43087
Remove error when calling glGenQueries/glDeleteQueries while a query is active

There is nothing in the OpenGL specification which prevents the user from
calling glGenQueries to generate a new query object while another object is
active. Neither is there anything in the Mesa implementation which prevents
this. So remove the INVALID_OPERATION errors in this case.

Similarly, it is explicitly allowed by the OpenGL specification to delete an
active query, so remove the assertion for that case, replacing it with the
necesssary state updates to end the query, (clear the bindpt pointer and call
into the driver's EndQuery hook).

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
src/mesa/main/queryobj.c