From a2cf3609094be42c9a576aebe147df2c5ecfb3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 20 Sep 2007 23:21:32 +0100 Subject: [PATCH] Mimic the changes of the glx server interfaces in the wrapper functions so that we can get the benefit of compiler type checking. --- hw/xgl/glxext/xglglxext.c | 8 +++++--- hw/xgl/xglglx.c | 18 +++++++++--------- hw/xgl/xglglx.h | 3 ++- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/hw/xgl/glxext/xglglxext.c b/hw/xgl/glxext/xglglxext.c index a613454a7..f96c069e3 100644 --- a/hw/xgl/glxext/xglglxext.c +++ b/hw/xgl/glxext/xglglxext.c @@ -52,6 +52,8 @@ #define XGL_TEXTURE_RECTANGLE_BIT (1 << 3) #define XGL_TEXTURE_CUBE_MAP_BIT (1 << 4) +extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); + extern __GLXprovider *__xglMesaProvider; typedef struct _xglGLScreen { @@ -5548,7 +5550,7 @@ xglCreateDrawable (__GLXscreen *screen, memset (pBufferPriv, 0, sizeof (xglGLBufferRec)); - if (!GlxDrawableInit (&pBufferPriv->base, screen, pDrawable, drawId, modes)) + if (!__glXDrawableInit (&pBufferPriv->base, screen, pDrawable, drawId, modes)) { xfree (pBufferPriv); return NULL; @@ -5844,7 +5846,7 @@ xglLoseCurrent (__GLXcontext *context) xglGLContextPtr pContext = (xglGLContextPtr) context; __GLXcontext *mesaContext = pContext->mesaContext; - GlxFlushContextCache (); + __glXFlushContextCache (); GlxSetRenderTables (0); if (!mesaContext) @@ -6133,7 +6135,7 @@ xglLoseCurrentContext (void *closure) before switching context */ glFinish (); - GlxFlushContextCache (); + __glXFlushContextCache (); GlxSetRenderTables (0); } } diff --git a/hw/xgl/xglglx.c b/hw/xgl/xglglx.c index b8e214d6d..21f48d141 100644 --- a/hw/xgl/xglglx.c +++ b/hw/xgl/xglglx.c @@ -88,7 +88,7 @@ GlxInitVisuals (VisualPtr *visualp, } void -GlxFlushContextCache (void) +__glXFlushContextCache (void) { if (glXHandle) (*__xglGLXFunc.flushContextCache) (); @@ -109,7 +109,7 @@ GlxPushProvider (__GLXprovider *provider) } void -GlxScreenInit (__GLXscreen *screen, +__glXScreenInit (__GLXscreen *screen, ScreenPtr pScreen) { if (glXHandle) @@ -117,21 +117,21 @@ GlxScreenInit (__GLXscreen *screen, } void -GlxScreenDestroy (__GLXscreen *screen) +__glXScreenDestroy (__GLXscreen *screen) { if (glXHandle) (*__xglGLXFunc.screenDestroy) (screen); } GLboolean -GlxDrawableInit (__GLXdrawable *drawable, - __GLXcontext *ctx, - DrawablePtr pDrawable, - XID drawId, - __GLcontextModes *modes) +__glXDrawableInit (__GLXdrawable *drawable, + __GLXscreen *screen, + DrawablePtr pDrawable, + XID drawId, + __GLcontextModes *modes) { if (glXHandle) - return (*__xglGLXFunc.drawableInit) (drawable, ctx, pDrawable, drawId, modes); + return (*__xglGLXFunc.drawableInit) (drawable, screen, pDrawable, drawId, modes); return GL_FALSE; } diff --git a/hw/xgl/xglglx.h b/hw/xgl/xglglx.h index e9cd0cbee..531b66e47 100644 --- a/hw/xgl/xglglx.h +++ b/hw/xgl/xglglx.h @@ -29,6 +29,7 @@ #include "glxserver.h" #include "glxscreens.h" +#include "glxutil.h" #include "glxext.h" #include "glapitable.h" @@ -53,7 +54,7 @@ typedef struct _xglGLXFunc { void (*screenInit) (__GLXscreen *screen, ScreenPtr pScreen); void (*screenDestroy) (__GLXscreen *screen); GLboolean (*drawableInit) (__GLXdrawable *drawable, - __GLXcontext *ctx, + __GLXscreen *screen, DrawablePtr pDrawable, XID drawId, __GLcontextModes *modes);