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