From 893ddb068fcc74465f318582bebbee7e397067c4 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 19 Oct 2012 06:01:42 -0700 Subject: [PATCH] _mesa_create_exec_table: de-deprecate GetPointerv. glGetPointerv was de-deprecated in GL 4.3, because GL 4.3 adds functionality from KHR_debug and ARB_debug_output, which require glGetPointerv. This patch modifies _mesa_create_exec_table() to populate glGetPointerv in the dispatch table for core contexts. Technically this is not in compliance with the spec--what we really ought to do for core contexts is expose glGetPointerv only when a GL 4.3 context is in use or one of the two extensions is present. However, it seems silly to go to that extra work, since the only client-visible effect would be for glGetPointerv to raise an INVALID_OPERATION error instead of an INVALID_ENUM error. Besides, the other functions set up by _mesa_create_exec_table() only depend on the API in use, not on the GL version or extensions supported. Reviewed-by: Brian Paul Reviewed-by: Jordan Justen Reviewed-by: Ian Romanick --- src/mesa/main/api_exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index e2a503d96a3..995849612ca 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -322,10 +322,12 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_DisableClientState(exec, _mesa_DisableClientState); SET_EdgeFlagPointer(exec, _mesa_EdgeFlagPointer); SET_EnableClientState(exec, _mesa_EnableClientState); - SET_GetPointerv(exec, _mesa_GetPointerv); SET_IndexPointer(exec, _mesa_IndexPointer); SET_InterleavedArrays(exec, _mesa_InterleavedArrays); } + if (ctx->API != API_OPENGLES2) { + SET_GetPointerv(exec, _mesa_GetPointerv); + } SET_IsTexture(exec, _mesa_IsTexture); if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) { SET_NormalPointer(exec, _mesa_NormalPointer); -- 2.30.2