mesa/src
Kenneth Graunke b4b50b074b mesa: Make glGet queries initialize ctx->Debug when necessary.
dEQP-GLES31.functional.debug.state_query.debug_group_stack_depth_*
tries to call glGet on GL_DEBUG_GROUP_STACK_DEPTH right away, before
doing any other debug setup.  This should return 1.

However, because ctx->Debug wasn't allocated, we bailed and returned 0.

This patch removes the open-coded locking and switches the two glGet
functions to use _mesa_lock_debug_state(), which takes care of
allocating and initializing that state on the first time.  It also
conveniently takes care of unlocking on failure for us, so we don't
need to handle that in every caller.

Fixes dEQP-GLES31.functional.debug.state_query.debug_group_stack_depth_
{getboolean,getfloat,getinteger,getinteger64}.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-03-03 21:31:22 -08:00
..
compiler glsl/opt_array_splitting: Fix indentation 2016-03-03 09:12:41 +01:00
egl Android: clean-up and fix DRI module path handling 2016-02-29 10:51:44 +00:00
gallium radeonsi: Do colorformat endian swap for PIPE_USAGE_STAGING 2016-03-03 09:20:08 +02:00
gbm gbm.h: Add a missing stddef.h include for size_t. 2015-10-30 19:12:14 +00:00
getopt
glx glx: update to updated version of EXT_create_context_es2_profile 2016-02-03 15:44:51 -05:00
gtest
hgl
loader virtio_gpu: Add PCI ID to driver map 2016-01-23 12:35:24 +10:00
mapi mesa: Add dispatch and extension XML for GL_ARB_internalformat_query2 2016-03-03 15:14:06 +01:00
mesa mesa: Make glGet queries initialize ctx->Debug when necessary. 2016-03-03 21:31:22 -08:00
util util: fix new gcc6 warnings 2016-02-18 17:10:55 -05:00
Makefile.am glsl: move to compiler/ 2016-01-26 16:08:33 +00:00
SConscript glsl: move to compiler/ 2016-01-26 16:08:33 +00:00