diff options
-rw-r--r-- | src/glx/dri2_glx.c | 12 | ||||
-rw-r--r-- | src/glx/dri_glx.c | 16 | ||||
-rw-r--r-- | src/glx/drisw_glx.c | 10 | ||||
-rw-r--r-- | src/glx/glx_pbuffer.c | 4 | ||||
-rw-r--r-- | src/glx/glxclient.h | 31 | ||||
-rw-r--r-- | src/glx/glxcmds.c | 82 | ||||
-rw-r--r-- | src/glx/glxcurrent.c | 4 | ||||
-rw-r--r-- | src/glx/glxext.c | 22 | ||||
-rw-r--r-- | src/glx/glxextensions.c | 10 | ||||
-rw-r--r-- | src/glx/glxextensions.h | 9 |
10 files changed, 99 insertions, 101 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 2429e0df030..6bd5d3646a5 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -76,7 +76,7 @@ struct dri2_display }; struct dri2_screen { - __GLXscreenConfigs base; + struct glx_screen base; __DRIscreen *driScreen; __GLXDRIscreen vtable; @@ -155,7 +155,7 @@ dri2UnbindContext(__GLXcontext *context) } static __GLXcontext * -dri2_create_context(__GLXscreenConfigs *base, +dri2_create_context(struct glx_screen *base, struct glx_config *config_base, GLXContext shareList, int renderType) { @@ -211,7 +211,7 @@ dri2DestroyDrawable(__GLXDRIdrawable *base) } static __GLXDRIdrawable * -dri2CreateDrawable(__GLXscreenConfigs *base, XID xDrawable, +dri2CreateDrawable(struct glx_screen *base, XID xDrawable, GLXDrawable drawable, struct glx_config *config_base) { struct dri2_drawable *pdraw; @@ -288,7 +288,7 @@ dri2CreateDrawable(__GLXscreenConfigs *base, XID xDrawable, #ifdef X_DRI2GetMSC static int -dri2DrawableGetMSC(__GLXscreenConfigs *psc, __GLXDRIdrawable *pdraw, +dri2DrawableGetMSC(struct glx_screen *psc, __GLXDRIdrawable *pdraw, int64_t *ust, int64_t *msc, int64_t *sbc) { CARD64 dri2_ust, dri2_msc, dri2_sbc; @@ -442,7 +442,7 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate) static void -dri2DestroyScreen(__GLXscreenConfigs *base) +dri2DestroyScreen(struct glx_screen *base) { struct dri2_screen *psc = (struct dri2_screen *) base; @@ -724,7 +724,7 @@ static const struct glx_screen_vtable dri2_screen_vtable = { dri2_create_context }; -static __GLXscreenConfigs * +static struct glx_screen * dri2CreateScreen(int screen, __GLXdisplayPrivate * priv) { const __DRIconfig **driver_configs; diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index 7afdc86682d..b487f414dcc 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -61,7 +61,7 @@ struct dri_display struct dri_screen { - __GLXscreenConfigs base; + struct glx_screen base; __DRIscreen *driScreen; __GLXDRIscreen vtable; @@ -226,7 +226,7 @@ __glXReportDamage(__DRIdrawable * driDraw, int i; int x_off, y_off; __GLXDRIdrawable *glxDraw = loaderPrivate; - __GLXscreenConfigs *psc = glxDraw->psc; + struct glx_screen *psc = glxDraw->psc; Display *dpy = psc->dpy; Drawable drawable; @@ -278,7 +278,7 @@ __glXDRIGetDrawableInfo(__DRIdrawable * drawable, void *loaderPrivate) { __GLXDRIdrawable *glxDraw = loaderPrivate; - __GLXscreenConfigs *psc = glxDraw->psc; + struct glx_screen *psc = glxDraw->psc; Display *dpy = psc->dpy; return XF86DRIGetDrawableInfo(dpy, psc->scr, glxDraw->drawable, @@ -550,7 +550,7 @@ static const struct glx_context_vtable dri_context_vtable = { }; static __GLXcontext * -dri_create_context(__GLXscreenConfigs *base, +dri_create_context(struct glx_screen *base, struct glx_config *config_base, GLXContext shareList, int renderType) { @@ -615,7 +615,7 @@ driDestroyDrawable(__GLXDRIdrawable * pdraw) } static __GLXDRIdrawable * -driCreateDrawable(__GLXscreenConfigs *base, +driCreateDrawable(struct glx_screen *base, XID xDrawable, GLXDrawable drawable, struct glx_config *config_base) { @@ -685,7 +685,7 @@ driCopySubBuffer(__GLXDRIdrawable * pdraw, } static void -driDestroyScreen(__GLXscreenConfigs *base) +driDestroyScreen(struct glx_screen *base) { struct dri_screen *psc = (struct dri_screen *) base; @@ -701,7 +701,7 @@ driDestroyScreen(__GLXscreenConfigs *base) #ifdef __DRI_SWAP_BUFFER_COUNTER static int -driDrawableGetMSC(__GLXscreenConfigs *base, __GLXDRIdrawable *pdraw, +driDrawableGetMSC(struct glx_screen *base, __GLXDRIdrawable *pdraw, int64_t *ust, int64_t *msc, int64_t *sbc) { struct dri_screen *psc = (struct dri_screen *) base; @@ -826,7 +826,7 @@ static const struct glx_screen_vtable dri_screen_vtable = { dri_create_context }; -static __GLXscreenConfigs * +static struct glx_screen * driCreateScreen(int screen, __GLXdisplayPrivate *priv) { struct dri_display *pdp; diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 39d71513a86..9d4bee91ab0 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -43,7 +43,7 @@ struct drisw_context struct drisw_screen { - __GLXscreenConfigs base; + struct glx_screen base; __DRIscreen *driScreen; __GLXDRIscreen vtable; @@ -290,7 +290,7 @@ static const struct glx_context_vtable drisw_context_vtable = { }; static __GLXcontext * -drisw_create_context(__GLXscreenConfigs *base, +drisw_create_context(struct glx_screen *base, struct glx_config *config_base, GLXContext shareList, int renderType) { @@ -346,7 +346,7 @@ driDestroyDrawable(__GLXDRIdrawable * pdraw) } static __GLXDRIdrawable * -driCreateDrawable(__GLXscreenConfigs *base, XID xDrawable, +driCreateDrawable(struct glx_screen *base, XID xDrawable, GLXDrawable drawable, struct glx_config *modes) { struct drisw_drawable *pdp; @@ -402,7 +402,7 @@ driSwapBuffers(__GLXDRIdrawable * pdraw, } static void -driDestroyScreen(__GLXscreenConfigs *base) +driDestroyScreen(struct glx_screen *base) { struct drisw_screen *psc = (struct drisw_screen *) base; @@ -432,7 +432,7 @@ static const struct glx_screen_vtable drisw_screen_vtable = { drisw_create_context }; -static __GLXscreenConfigs * +static struct glx_screen * driCreateScreen(int screen, __GLXdisplayPrivate *priv) { __GLXDRIscreen *psp; diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index b56dce3ef75..bc2f1cc6c7d 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -189,9 +189,9 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config, { __GLXdisplayPrivate *const priv = __glXInitialize(dpy); __GLXDRIdrawable *pdraw; - __GLXscreenConfigs *psc; + struct glx_screen *psc; - psc = priv->screenConfigs[config->screen]; + psc = priv->screens[config->screen]; if (psc->driScreen == NULL) return; diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index d6c9afc81b5..bde454b3e16 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -67,7 +67,6 @@ #define __GLX_MAX_TEXTURE_UNITS 32 -typedef struct __GLXscreenConfigsRec __GLXscreenConfigs; typedef struct __GLXcontextRec __GLXcontext; typedef struct __GLXdrawableRec __GLXdrawable; typedef struct __GLXdisplayPrivateRec __GLXdisplayPrivate; @@ -102,18 +101,18 @@ struct __GLXDRIdisplayRec */ void (*destroyDisplay) (__GLXDRIdisplay * display); - __GLXscreenConfigs *(*createScreen)(int screen, __GLXdisplayPrivate * priv); + struct glx_screen *(*createScreen)(int screen, __GLXdisplayPrivate * priv); }; struct __GLXDRIscreenRec { - void (*destroyScreen)(__GLXscreenConfigs *psc); + void (*destroyScreen)(struct glx_screen *psc); - __GLXcontext *(*createContext)(__GLXscreenConfigs *psc, + __GLXcontext *(*createContext)(struct glx_screen *psc, struct glx_config *config, GLXContext shareList, int renderType); - __GLXDRIdrawable *(*createDrawable)(__GLXscreenConfigs *psc, + __GLXDRIdrawable *(*createDrawable)(struct glx_screen *psc, XID drawable, GLXDrawable glxDrawable, struct glx_config *config); @@ -122,7 +121,7 @@ struct __GLXDRIscreenRec { int64_t divisor, int64_t remainder); void (*copySubBuffer)(__GLXDRIdrawable *pdraw, int x, int y, int width, int height); - int (*getDrawableMSC)(__GLXscreenConfigs *psc, __GLXDRIdrawable *pdraw, + int (*getDrawableMSC)(struct glx_screen *psc, __GLXDRIdrawable *pdraw, int64_t *ust, int64_t *msc, int64_t *sbc); int (*waitForMSC)(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, @@ -146,7 +145,7 @@ struct __GLXDRIdrawableRec XID xDrawable; XID drawable; - __GLXscreenConfigs *psc; + struct glx_screen *psc; GLenum textureTarget; GLenum textureFormat; /* EXT_texture_from_pixmap support */ unsigned long eventMask; @@ -284,7 +283,7 @@ struct __GLXcontextRec * Screen number. */ GLint screen; - __GLXscreenConfigs *psc; + struct glx_screen *psc; /** * \c GL_TRUE if the context was created with ImportContext, which @@ -445,7 +444,7 @@ struct __GLXcontextRec extern Bool glx_context_init(__GLXcontext *gc, - __GLXscreenConfigs *psc, struct glx_config *fbconfig); + struct glx_screen *psc, struct glx_config *fbconfig); #define __glXSetError(gc,code) \ if (!(gc)->error) { \ @@ -487,12 +486,12 @@ extern void __glFreeAttributeState(__GLXcontext *); * a pointer to the config data for that screen (if the screen supports GL). */ struct glx_screen_vtable { - __GLXcontext *(*create_context)(__GLXscreenConfigs *psc, + __GLXcontext *(*create_context)(struct glx_screen *psc, struct glx_config *config, GLXContext shareList, int renderType); }; -struct __GLXscreenConfigsRec +struct glx_screen { const struct glx_screen_vtable *vtable; @@ -528,7 +527,7 @@ struct __GLXscreenConfigsRec * Per-screen dynamic GLX extension tracking. The \c direct_support * field only contains enough bits for 64 extensions. Should libGL * ever need to track more than 64 GLX extensions, we can safely grow - * this field. The \c __GLXscreenConfigs structure is not used outside + * this field. The \c struct glx_screen structure is not used outside * libGL. */ /*@{ */ @@ -584,7 +583,7 @@ struct __GLXdisplayPrivateRec * Also, per screen data which now includes the server \c GLX_EXTENSION * string. */ - __GLXscreenConfigs **screenConfigs; + struct glx_screen **screens; #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) __glxHashTable *drawHash; @@ -599,7 +598,7 @@ struct __GLXdisplayPrivateRec }; extern int -glx_screen_init(__GLXscreenConfigs *psc, +glx_screen_init(struct glx_screen *psc, int screen, __GLXdisplayPrivate * priv); #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) @@ -782,14 +781,14 @@ __glxGetMscRate(__GLXDRIdrawable *glxDraw, XExtDisplayInfo *__glXFindDisplay (Display *dpy); extern void -GarbageCollectDRIDrawables(__GLXscreenConfigs *psc); +GarbageCollectDRIDrawables(struct glx_screen *psc); extern __GLXDRIdrawable * GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable); #endif -extern __GLXscreenConfigs * +extern struct glx_screen * indirect_create_screen(int screen, __GLXdisplayPrivate * priv); #endif /* !__GLX_client_h__ */ diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 5de39f6a8d2..f418ef4a04c 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -85,7 +85,7 @@ windowExistsErrorHandler(Display * dpy, XErrorEvent * xerr) * \param screen Screen number to destroy drawables for */ _X_HIDDEN void -GarbageCollectDRIDrawables(__GLXscreenConfigs * sc) +GarbageCollectDRIDrawables(struct glx_screen * sc) { XID draw; __GLXDRIdrawable *pdraw; @@ -156,20 +156,20 @@ GetGLXDRIDrawable(Display * dpy, GLXDrawable drawable) * number range for \c dpy? */ -static __GLXscreenConfigs * +static struct glx_screen * GetGLXScreenConfigs(Display * dpy, int scrn) { __GLXdisplayPrivate *const priv = __glXInitialize(dpy); return (priv - && priv->screenConfigs != - NULL) ? priv->screenConfigs[scrn] : NULL; + && priv->screens != + NULL) ? priv->screens[scrn] : NULL; } static int GetGLXPrivScreenConfig(Display * dpy, int scrn, __GLXdisplayPrivate ** ppriv, - __GLXscreenConfigs ** ppsc) + struct glx_screen ** ppsc) { /* Initialize the extension, if needed . This has the added value * of initializing/allocating the display private @@ -190,7 +190,7 @@ GetGLXPrivScreenConfig(Display * dpy, int scrn, __GLXdisplayPrivate ** ppriv, } /* Check to see if the GL is supported on this screen */ - *ppsc = (*ppriv)->screenConfigs[scrn]; + *ppsc = (*ppriv)->screens[scrn]; if ((*ppsc)->configs == NULL) { /* No support for GL on this screen regardless of visual */ return GLX_BAD_VISUAL; @@ -220,7 +220,7 @@ ValidateGLXFBConfig(Display * dpy, GLXFBConfig fbconfig) if (priv != NULL) { for (i = 0; i < num_screens; i++) { - for (config = priv->screenConfigs[i]->configs; config != NULL; + for (config = priv->screens[i]->configs; config != NULL; config = config->next) { if (config == (struct glx_config *) fbconfig) { return config; @@ -237,7 +237,7 @@ ValidateGLXFBConfig(Display * dpy, GLXFBConfig fbconfig) static const struct glx_context_vtable applegl_context_vtable; static __GLcontext * -applegl_create_context(__GLXscreenConfigs *psc, +applegl_create_context(struct glx_screen *psc, struct glx_config *mode, GLXContext shareList, int renderType) { @@ -293,7 +293,7 @@ applegl_create_context(__GLXscreenConfigs *psc, * does all the initialization (including the pixel pack / unpack). */ static GLXContext -indirect_create_context(__GLXscreenConfigs *psc, +indirect_create_context(struct glx_screen *psc, struct glx_config *mode, GLXContext shareList, int renderType) { @@ -395,10 +395,10 @@ struct glx_screen_vtable indirect_screen_vtable = { indirect_create_context }; -_X_HIDDEN __GLXscreenConfigs * +_X_HIDDEN struct glx_screen * indirect_create_screen(int screen, __GLXdisplayPrivate * priv) { - __GLXscreenConfigs *psc; + struct glx_screen *psc; psc = Xmalloc(sizeof *psc); if (psc == NULL) @@ -414,7 +414,7 @@ indirect_create_screen(int screen, __GLXdisplayPrivate * priv) _X_HIDDEN Bool glx_context_init(__GLXcontext *gc, - __GLXscreenConfigs *psc, struct glx_config *config) + struct glx_screen *psc, struct glx_config *config) { gc->majorOpcode = __glXSetupForCommand(psc->display->dpy); if (!gc->majorOpcode) @@ -446,7 +446,7 @@ CreateContext(Display * dpy, int generic_id, unsigned code, int renderType, int screen) { GLXContext gc = NULL; - __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen); + struct glx_screen *const psc = GetGLXScreenConfigs(dpy, screen); if (dpy == NULL) return NULL; @@ -540,7 +540,7 @@ glXCreateContext(Display * dpy, XVisualInfo * vis, int renderType = 0; #if defined(GLX_DIRECT_RENDERING) || defined(GLX_USE_APPLEGL) - __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, vis->screen); + struct glx_screen *const psc = GetGLXScreenConfigs(dpy, vis->screen); config = glx_config_find_visual(psc->visuals, vis->visualid); if (config == NULL) { @@ -938,7 +938,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) { #ifdef GLX_USE_APPLEGL int screen = vis->screen; - __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen); + struct glx_screen *const psc = GetGLXScreenConfigs(dpy, screen); const struct glx_config *config; config = _gl_context_modes_find_visual(psc->visuals, vis->visualid); @@ -976,10 +976,10 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) __GLXdisplayPrivate *const priv = __glXInitialize(dpy); __GLXDRIdrawable *pdraw; - __GLXscreenConfigs *psc; + struct glx_screen *psc; struct glx_config *config; - psc = priv->screenConfigs[vis->screen]; + psc = priv->screens[vis->screen]; if (psc->driScreen == NULL) break; config = glx_config_find_visual(psc->visuals, vis->visualid); @@ -1119,7 +1119,7 @@ glXGetConfig(Display * dpy, XVisualInfo * vis, int attribute, int *value_return) { __GLXdisplayPrivate *priv; - __GLXscreenConfigs *psc; + struct glx_screen *psc; struct glx_config *config; int status; @@ -1480,7 +1480,7 @@ glXChooseVisual(Display * dpy, int screen, int *attribList) { XVisualInfo *visualList = NULL; __GLXdisplayPrivate *priv; - __GLXscreenConfigs *psc; + struct glx_screen *psc; struct glx_config test_config; struct glx_config *config; struct glx_config *best_config = NULL; @@ -1544,7 +1544,7 @@ glXChooseVisual(Display * dpy, int screen, int *attribList) _X_EXPORT const char * glXQueryExtensionsString(Display * dpy, int screen) { - __GLXscreenConfigs *psc; + struct glx_screen *psc; __GLXdisplayPrivate *priv; if (GetGLXPrivScreenConfig(dpy, screen, &priv, &psc) != Success) { @@ -1590,7 +1590,7 @@ glXGetClientString(Display * dpy, int name) _X_EXPORT const char * glXQueryServerString(Display * dpy, int screen, int name) { - __GLXscreenConfigs *psc; + struct glx_screen *psc; __GLXdisplayPrivate *priv; const char **str; @@ -1675,7 +1675,7 @@ _X_EXPORT GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID) { __GLXdisplayPrivate *priv = __glXInitialize(dpy); - __GLXscreenConfigs *psc; + struct glx_screen *psc; xGLXQueryContextReply reply; CARD8 opcode; GLXContext ctx; @@ -1868,13 +1868,13 @@ glXGetFBConfigs(Display * dpy, int screen, int *nelements) int i; *nelements = 0; - if (priv && (priv->screenConfigs != NULL) + if (priv && (priv->screens != NULL) && (screen >= 0) && (screen <= ScreenCount(dpy)) - && (priv->screenConfigs[screen]->configs != NULL) - && (priv->screenConfigs[screen]->configs->fbconfigID + && (priv->screens[screen]->configs != NULL) + && (priv->screens[screen]->configs->fbconfigID != (int) GLX_DONT_CARE)) { - for (config = priv->screenConfigs[screen]->configs; config != NULL; + for (config = priv->screens[screen]->configs; config != NULL; config = config->next) { if (config->fbconfigID != (int) GLX_DONT_CARE) { num_configs++; @@ -1885,7 +1885,7 @@ glXGetFBConfigs(Display * dpy, int screen, int *nelements) if (config_list != NULL) { *nelements = num_configs; i = 0; - for (config = priv->screenConfigs[screen]->configs; config != NULL; + for (config = priv->screens[screen]->configs; config != NULL; config = config->next) { if (config->fbconfigID != (int) GLX_DONT_CARE) { config_list[i] = config; @@ -1935,7 +1935,7 @@ __glXSwapIntervalSGI(int interval) { xGLXVendorPrivateReq *req; GLXContext gc = __glXGetCurrentContext(); - __GLXscreenConfigs *psc; + struct glx_screen *psc; Display *dpy; CARD32 *interval_ptr; CARD8 opcode; @@ -1994,7 +1994,7 @@ __glXSwapIntervalMESA(unsigned int interval) GLXContext gc = __glXGetCurrentContext(); if (gc != NULL && gc->driContext) { - __GLXscreenConfigs *psc; + struct glx_screen *psc; psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen); if (psc->driScreen && psc->driScreen->setSwapInterval) { @@ -2016,7 +2016,7 @@ __glXGetSwapIntervalMESA(void) GLXContext gc = __glXGetCurrentContext(); if (gc != NULL && gc->driContext) { - __GLXscreenConfigs *psc; + struct glx_screen *psc; psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen); if (psc->driScreen && psc->driScreen->getSwapInterval) { @@ -2040,7 +2040,7 @@ __glXGetVideoSyncSGI(unsigned int *count) int64_t ust, msc, sbc; int ret; GLXContext gc = __glXGetCurrentContext(); - __GLXscreenConfigs *psc; + struct glx_screen *psc; #ifdef GLX_DIRECT_RENDERING __GLXDRIdrawable *pdraw; #endif @@ -2077,7 +2077,7 @@ static int __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count) { GLXContext gc = __glXGetCurrentContext(); - __GLXscreenConfigs *psc; + struct glx_screen *psc; #ifdef GLX_DIRECT_RENDERING __GLXDRIdrawable *pdraw; #endif @@ -2144,7 +2144,7 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy, xGLXCreateGLXPixmapWithConfigSGIXReq *req; GLXPixmap xid = None; CARD8 opcode; - __GLXscreenConfigs *psc; + struct glx_screen *psc; #endif struct glx_config *config = (struct glx_config *) fbconfig; @@ -2194,7 +2194,7 @@ glXCreateContextWithConfigSGIX(Display * dpy, { GLXContext gc = NULL; struct glx_config *config = (struct glx_config *) fbconfig; - __GLXscreenConfigs *psc; + struct glx_screen *psc; if ((dpy == NULL) || (config == NULL)) { @@ -2218,7 +2218,7 @@ _X_EXPORT GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis) { __GLXdisplayPrivate *priv; - __GLXscreenConfigs *psc = NULL; + struct glx_screen *psc = NULL; if ((GetGLXPrivScreenConfig(dpy, vis->screen, &priv, &psc) != Success) && __glXExtensionBitIsEnabled(psc, SGIX_fbconfig_bit) @@ -2277,7 +2277,7 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable, #ifdef GLX_DIRECT_RENDERING __GLXDRIdrawable *pdraw; #endif - __GLXscreenConfigs *psc; + struct glx_screen *psc; if (!priv) return False; @@ -2300,7 +2300,7 @@ __glxGetMscRate(__GLXDRIdrawable *glxDraw, int32_t * numerator, int32_t * denominator) { #ifdef XF86VIDMODE - __GLXscreenConfigs *psc; + struct glx_screen *psc; XF86VidModeModeLine mode_line; int dot_clock; int i; @@ -2405,7 +2405,7 @@ __glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable, GLXContext gc = __glXGetCurrentContext(); #ifdef GLX_DIRECT_RENDERING __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); - __GLXscreenConfigs *psc = pdraw ? pdraw->psc : NULL; + struct glx_screen *psc = pdraw ? pdraw->psc : NULL; #endif if (!gc) /* no GLX for this */ @@ -2448,7 +2448,7 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable, #ifdef GLX_DIRECT_RENDERING __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); #endif - __GLXscreenConfigs *psc = pdraw ? pdraw->psc : NULL; + struct glx_screen *psc = pdraw ? pdraw->psc : NULL; int ret; @@ -2480,7 +2480,7 @@ __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable, #ifdef GLX_DIRECT_RENDERING __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); #endif - __GLXscreenConfigs *psc = pdraw ? pdraw->psc : NULL; + struct glx_screen *psc = pdraw ? pdraw->psc : NULL; int ret; /* The OML_sync_control spec says this should "generate a GLX_BAD_VALUE @@ -2570,7 +2570,7 @@ __glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable, #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); if (pdraw != NULL) { - __GLXscreenConfigs *psc = pdraw->psc; + struct glx_screen *psc = pdraw->psc; if (psc->driScreen->copySubBuffer != NULL) { glFlush(); (*psc->driScreen->copySubBuffer) (pdraw, x, y, width, height); diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c index 99930f691cd..f4d4f2ea297 100644 --- a/src/glx/glxcurrent.c +++ b/src/glx/glxcurrent.c @@ -290,12 +290,12 @@ FetchDRIDrawable(Display * dpy, GLXDrawable glxDrawable, GLXContext gc) { __GLXdisplayPrivate *const priv = __glXInitialize(dpy); __GLXDRIdrawable *pdraw; - __GLXscreenConfigs *psc; + struct glx_screen *psc; if (priv == NULL) return NULL; - psc = priv->screenConfigs[gc->screen]; + psc = priv->screens[gc->screen]; if (priv->drawHash == NULL) return NULL; diff --git a/src/glx/glxext.c b/src/glx/glxext.c index b02755a6c2c..930709bd202 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -199,13 +199,13 @@ __glXEventToWire(Display *dpy, XEvent *event, xEvent *wire) static void FreeScreenConfigs(__GLXdisplayPrivate * priv) { - __GLXscreenConfigs *psc; + struct glx_screen *psc; GLint i, screens; /* Free screen configuration information */ screens = ScreenCount(priv->dpy); for (i = 0; i < screens; i++) { - psc = priv->screenConfigs[i]; + psc = priv->screens[i]; if (psc->configs) { glx_config_destroy_list(psc->configs); if (psc->effectiveGLXexts) @@ -228,8 +228,8 @@ FreeScreenConfigs(__GLXdisplayPrivate * priv) Xfree(psc); #endif } - XFree((char *) priv->screenConfigs); - priv->screenConfigs = NULL; + XFree((char *) priv->screens); + priv->screens = NULL; } /* @@ -646,7 +646,7 @@ createConfigsFromProperties(Display * dpy, int nvisuals, int nprops, } static GLboolean -getVisualConfigs(__GLXscreenConfigs *psc, +getVisualConfigs(struct glx_screen *psc, __GLXdisplayPrivate *priv, int screen) { xGLXGetVisualConfigsReq *req; @@ -675,7 +675,7 @@ getVisualConfigs(__GLXscreenConfigs *psc, } static GLboolean -getFBConfigs(__GLXscreenConfigs *psc, __GLXdisplayPrivate *priv, int screen) +getFBConfigs(struct glx_screen *psc, __GLXdisplayPrivate *priv, int screen) { xGLXGetFBConfigsReq *fb_req; xGLXGetFBConfigsSGIXReq *sgi_req; @@ -722,7 +722,7 @@ getFBConfigs(__GLXscreenConfigs *psc, __GLXdisplayPrivate *priv, int screen) } _X_HIDDEN Bool -glx_screen_init(__GLXscreenConfigs *psc, +glx_screen_init(struct glx_screen *psc, int screen, __GLXdisplayPrivate * priv) { /* Initialize per screen dynamic client GLX extensions */ @@ -744,15 +744,15 @@ glx_screen_init(__GLXscreenConfigs *psc, static Bool AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv) { - __GLXscreenConfigs *psc; + struct glx_screen *psc; GLint i, screens; /* ** First allocate memory for the array of per screen configs. */ screens = ScreenCount(dpy); - priv->screenConfigs = Xmalloc(screens * sizeof *priv->screenConfigs); - if (!priv->screenConfigs) + priv->screens = Xmalloc(screens * sizeof *priv->screens); + if (!priv->screens) return GL_FALSE; priv->serverGLXversion = @@ -774,7 +774,7 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv) #endif if (psc == NULL) psc = indirect_create_screen(i, priv); - priv->screenConfigs[i] = psc; + priv->screens[i] = psc; } SyncHandle(); return GL_TRUE; diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c index 4eb6a5536ab..c5ca77374fb 100644 --- a/src/glx/glxextensions.c +++ b/src/glx/glxextensions.c @@ -312,7 +312,7 @@ static const unsigned gl_minor = 4; static const char *__glXGLXClientExtensions = NULL; static void __glXExtensionsCtr(void); -static void __glXExtensionsCtrScreen(__GLXscreenConfigs * psc); +static void __glXExtensionsCtrScreen(struct glx_screen * psc); static void __glXProcessServerString(const struct extension_info *ext, const char *server_string, unsigned char *server_support); @@ -396,7 +396,7 @@ __glXProcessServerString(const struct extension_info *ext, } void -__glXEnableDirectExtension(__GLXscreenConfigs * psc, const char *name) +__glXEnableDirectExtension(struct glx_screen * psc, const char *name) { __glXExtensionsCtr(); __glXExtensionsCtrScreen(psc); @@ -474,7 +474,7 @@ __glXExtensionsCtr(void) */ static void -__glXExtensionsCtrScreen(__GLXscreenConfigs * psc) +__glXExtensionsCtrScreen(struct glx_screen * psc) { if (psc->ext_list_first_time) { psc->ext_list_first_time = GL_FALSE; @@ -494,7 +494,7 @@ __glXExtensionsCtrScreen(__GLXscreenConfigs * psc) * \c NULL, then \c GL_FALSE is returned. */ GLboolean -__glXExtensionBitIsEnabled(__GLXscreenConfigs * psc, unsigned bit) +__glXExtensionBitIsEnabled(struct glx_screen * psc, unsigned bit) { GLboolean enabled = GL_FALSE; @@ -594,7 +594,7 @@ __glXGetClientExtensions(void) */ void -__glXCalculateUsableExtensions(__GLXscreenConfigs * psc, +__glXCalculateUsableExtensions(struct glx_screen * psc, GLboolean display_is_direct_capable, int minor_version) { diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h index 4f1b6619d65..e5f0b448efb 100644 --- a/src/glx/glxextensions.h +++ b/src/glx/glxextensions.h @@ -234,13 +234,13 @@ enum #define __GL_EXT_BYTES ((__NUM_GL_EXTS + 7) / 8) -struct __GLXscreenConfigsRec; +struct glx_screen; struct __GLXcontextRec; -extern GLboolean __glXExtensionBitIsEnabled(struct __GLXscreenConfigsRec *psc, +extern GLboolean __glXExtensionBitIsEnabled(struct glx_screen *psc, unsigned bit); extern const char *__glXGetClientExtensions(void); -extern void __glXCalculateUsableExtensions(struct __GLXscreenConfigsRec *psc, +extern void __glXCalculateUsableExtensions(struct glx_screen *psc, GLboolean display_is_direct_capable, int server_minor_version); @@ -256,8 +256,7 @@ extern GLboolean __glExtensionBitIsEnabled(const struct __GLXcontextRec *gc, unsigned bit); extern void -__glXEnableDirectExtension(struct __GLXscreenConfigsRec *psc, - const char *name); +__glXEnableDirectExtension(struct glx_screen *psc, const char *name); /* Source-level backwards compatibility with old drivers. They won't * find the respective functions, though. |