Mesa (master): _mesa_create_exec_table: de-deprecate GetPointerv.

Paul Berry stereotype441 at kemper.freedesktop.org
Tue Oct 23 17:25:16 UTC 2012


Module: Mesa
Branch: master
Commit: 893ddb068fcc74465f318582bebbee7e397067c4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=893ddb068fcc74465f318582bebbee7e397067c4

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Fri Oct 19 06:01:42 2012 -0700

_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 <brianp at vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/main/api_exec.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index e2a503d..9958496 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);




More information about the mesa-commit mailing list