diff --git a/.pick_status.json b/.pick_status.json index ea34ca848d3..1e37278a895 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -674,7 +674,7 @@ "description": "Get rid of 5 remaining references to glapitable.h", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0cebfb15b568c79bfc7c3298954dff7302407722", "notes": null diff --git a/src/glx/apple/apple_glapi.c b/src/glx/apple/apple_glapi.c index cab61c451be..008380760ab 100644 --- a/src/glx/apple/apple_glapi.c +++ b/src/glx/apple/apple_glapi.c @@ -39,7 +39,7 @@ #include #include "glapi.h" -#include "glapitable.h" +#include "dispatch.h" #include "apple_glx.h" #include "apple_xgl_api.h" @@ -55,9 +55,10 @@ static void _apple_glapi_create_table(void) { __ogl_framework_api = _glapi_create_table_from_handle(apple_cgl_get_dl_handle(), "gl"); assert(__ogl_framework_api); - __applegl_api = malloc(sizeof(struct _glapi_table)); + size_t glapi_table_size = _gloffset_COUNT * sizeof(_glapi_proc*); + __applegl_api = malloc(glapi_table_size); assert(__applegl_api); - memcpy(__applegl_api, __ogl_framework_api, sizeof(struct _glapi_table)); + memcpy(__applegl_api, __ogl_framework_api, glapi_table_size); _glapi_table_patch(__applegl_api, "ReadPixels", __applegl_glReadPixels); _glapi_table_patch(__applegl_api, "CopyPixels", __applegl_glCopyPixels); @@ -72,6 +73,7 @@ void apple_mesa_glapi_set_dispatch(void) { void apple_glapi_oglfw_viewport_scissor(GLint x, GLint y, GLsizei width, GLsizei height) { _apple_glapi_create_table(); - __ogl_framework_api->Viewport(x, y, width, height); - __ogl_framework_api->Scissor(x, y, width, height); + + CALL_Viewport(__ogl_framework_api, (x, y, width, height)); + CALL_Scissor(__ogl_framework_api, (x, y, width, height)); } diff --git a/src/glx/apple/apple_xgl_api_read.c b/src/glx/apple/apple_xgl_api_read.c index 4e6826a3036..6b6d0c0fe5d 100644 --- a/src/glx/apple/apple_xgl_api_read.c +++ b/src/glx/apple/apple_xgl_api_read.c @@ -37,7 +37,8 @@ #include "glxclient.h" #include "apple_glx_context.h" #include "apple_xgl_api.h" -#include "glapitable.h" +#include "glapi.h" +#include "dispatch.h" extern struct _glapi_table * __ogl_framework_api; @@ -102,8 +103,7 @@ __applegl_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, struct apple_xgl_saved_state saved; SetRead(&saved); - - __ogl_framework_api->ReadPixels(x, y, width, height, format, type, pixels); + CALL_ReadPixels(__ogl_framework_api, (x, y, width, height, format, type, pixels)); UnsetRead(&saved); } @@ -115,7 +115,7 @@ __applegl_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum t SetRead(&saved); - __ogl_framework_api->CopyPixels(x, y, width, height, type); + CALL_CopyPixels(__ogl_framework_api, (x, y, width, height, type)); UnsetRead(&saved); } diff --git a/src/glx/apple/apple_xgl_api_stereo.c b/src/glx/apple/apple_xgl_api_stereo.c index 11a17a86ad8..280f92620d7 100644 --- a/src/glx/apple/apple_xgl_api_stereo.c +++ b/src/glx/apple/apple_xgl_api_stereo.c @@ -40,7 +40,8 @@ #include "glxclient.h" #include "apple_glx_context.h" #include "apple_xgl_api.h" -#include "glapitable.h" +#include "glapi.h" +#include "dispatch.h" extern struct _glapi_table * __ogl_framework_api; @@ -75,10 +76,10 @@ __applegl_glDrawBuffer(GLenum mode) break; } - __ogl_framework_api->DrawBuffers(n, buf); + CALL_DrawBuffers(__ogl_framework_api, (n, buf)); } else { - __ogl_framework_api->DrawBuffer(mode); + CALL_DrawBuffer(__ogl_framework_api, (mode)); } } @@ -116,9 +117,9 @@ __applegl_glDrawBuffers(GLsizei n, const GLenum * bufs) newbuf[outi++] = GL_FRONT_RIGHT; } - __ogl_framework_api->DrawBuffers(outi, newbuf); + CALL_DrawBuffers(__ogl_framework_api, (outi, newbuf)); } else { - __ogl_framework_api->DrawBuffers(n, bufs); + CALL_DrawBuffers(__ogl_framework_api, (n, bufs)); } } diff --git a/src/glx/apple/apple_xgl_api_viewport.c b/src/glx/apple/apple_xgl_api_viewport.c index ccc896ef129..d506e03ceca 100644 --- a/src/glx/apple/apple_xgl_api_viewport.c +++ b/src/glx/apple/apple_xgl_api_viewport.c @@ -30,7 +30,8 @@ #include "glxclient.h" #include "apple_glx_context.h" #include "apple_xgl_api.h" -#include "glapitable.h" +#include "glapi.h" +#include "dispatch.h" extern struct _glapi_table * __ogl_framework_api; @@ -43,5 +44,5 @@ __applegl_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) if (gc != &dummyContext && gc->driContext) apple_glx_context_update(dpy, gc->driContext); - __ogl_framework_api->Viewport(x, y, width, height); + CALL_Viewport(__ogl_framework_api, (x, y, width, height)); } diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py index aa59d652015..2780c83046b 100644 --- a/src/mapi/glapi/gen/gl_gentable.py +++ b/src/mapi/glapi/gen/gl_gentable.py @@ -50,7 +50,7 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i #include #include "glapi.h" -#include "glapitable.h" +#include "dispatch.h" #ifdef GLXEXT #include "os.h"