summaryrefslogtreecommitdiff
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-03-02 23:19:27 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2016-03-04 14:48:25 +0000
commitc9da4f896685e061947f41664d4fb7492a31327d (patch)
tree883245885cc1099a94cc397f608b308e3d6dbba1 /src/mesa/main/get.c
parenta07e84278c06a8008087c0b9526b208cb257844a (diff)
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> (cherry picked from commit b4b50b074beae9b679e5acdbb4b49193e539576d)
Diffstat (limited to 'src/mesa/main/get.c')
0 files changed, 0 insertions, 0 deletions