glx: Rename __GLXcontext and __GLXdisplayPrivate to struct types.
This commit is contained in:
@@ -55,7 +55,7 @@ __glXReadReply(Display * dpy, size_t size, void *dest,
|
||||
}
|
||||
|
||||
void
|
||||
__glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
|
||||
__glXReadPixelReply(Display * dpy, struct glx_context * gc, unsigned max_dim,
|
||||
GLint width, GLint height, GLint depth, GLenum format,
|
||||
GLenum type, void *dest, GLboolean dimensions_in_reply)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ __glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
|
||||
|
||||
#if 0
|
||||
GLubyte *
|
||||
__glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
|
||||
__glXSetupSingleRequest(struct glx_context * gc, GLint sop, GLint cmdlen)
|
||||
{
|
||||
xGLXSingleReq *req;
|
||||
Display *const dpy = gc->currentDpy;
|
||||
@@ -117,7 +117,7 @@ __glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
|
||||
#endif
|
||||
|
||||
GLubyte *
|
||||
__glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop,
|
||||
__glXSetupVendorRequest(struct glx_context * gc, GLint code, GLint vop,
|
||||
GLint cmdlen)
|
||||
{
|
||||
xGLXVendorPrivateReq *req;
|
||||
|
@@ -39,7 +39,7 @@
|
||||
static void
|
||||
do_enable_disable(GLenum array, GLboolean val)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
unsigned index = 0;
|
||||
|
||||
@@ -69,7 +69,7 @@ __indirect_glDisableClientState(GLenum array)
|
||||
void
|
||||
__indirect_glPushClientAttrib(GLuint mask)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
__GLXattribute **spp = gc->attributes.stackPointer, *sp;
|
||||
|
||||
@@ -97,7 +97,7 @@ __indirect_glPushClientAttrib(GLuint mask)
|
||||
void
|
||||
__indirect_glPopClientAttrib(void)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
__GLXattribute **spp = gc->attributes.stackPointer, *sp;
|
||||
GLuint mask;
|
||||
@@ -127,7 +127,7 @@ __indirect_glPopClientAttrib(void)
|
||||
#endif
|
||||
|
||||
void
|
||||
__glFreeAttributeState(__GLXcontext * gc)
|
||||
__glFreeAttributeState(struct glx_context * gc)
|
||||
{
|
||||
__GLXattribute *sp, **spp;
|
||||
|
||||
|
@@ -99,7 +99,7 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
|
||||
GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event;
|
||||
xDRI2BufferSwapComplete *awire = (xDRI2BufferSwapComplete *)wire;
|
||||
__GLXDRIdrawable *pdraw;
|
||||
__GLXdisplayPrivate *glx_dpy = __glXInitialize(dpy);
|
||||
struct glx_display *glx_dpy = __glXInitialize(dpy);
|
||||
|
||||
/* Ignore swap events if we're not looking for them */
|
||||
pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable);
|
||||
|
@@ -94,7 +94,7 @@ struct dri2_screen {
|
||||
|
||||
struct dri2_context
|
||||
{
|
||||
__GLXcontext base;
|
||||
struct glx_context base;
|
||||
__GLXDRIcontext dri_vtable;
|
||||
__DRIcontext *driContext;
|
||||
};
|
||||
@@ -114,7 +114,7 @@ struct dri2_drawable
|
||||
static const struct glx_context_vtable dri2_context_vtable;
|
||||
|
||||
static void
|
||||
dri2_destroy_context(__GLXcontext *context)
|
||||
dri2_destroy_context(struct glx_context *context)
|
||||
{
|
||||
struct dri2_context *pcp = (struct dri2_context *) context;
|
||||
struct dri2_screen *psc = (struct dri2_screen *) context->psc;
|
||||
@@ -133,7 +133,7 @@ dri2_destroy_context(__GLXcontext *context)
|
||||
}
|
||||
|
||||
static Bool
|
||||
dri2BindContext(__GLXcontext *context,
|
||||
dri2BindContext(struct glx_context *context,
|
||||
__GLXDRIdrawable *draw, __GLXDRIdrawable *read)
|
||||
{
|
||||
struct dri2_context *pcp = (struct dri2_context *) context;
|
||||
@@ -146,7 +146,7 @@ dri2BindContext(__GLXcontext *context,
|
||||
}
|
||||
|
||||
static void
|
||||
dri2UnbindContext(__GLXcontext *context)
|
||||
dri2UnbindContext(struct glx_context *context)
|
||||
{
|
||||
struct dri2_context *pcp = (struct dri2_context *) context;
|
||||
struct dri2_screen *psc = (struct dri2_screen *) pcp->base.psc;
|
||||
@@ -154,10 +154,10 @@ dri2UnbindContext(__GLXcontext *context)
|
||||
(*psc->core->unbindContext) (pcp->driContext);
|
||||
}
|
||||
|
||||
static __GLXcontext *
|
||||
static struct glx_context *
|
||||
dri2_create_context(struct glx_screen *base,
|
||||
struct glx_config *config_base,
|
||||
GLXContext shareList, int renderType)
|
||||
struct glx_context *shareList, int renderType)
|
||||
{
|
||||
struct dri2_context *pcp, *pcp_shared;
|
||||
struct dri2_screen *psc = (struct dri2_screen *) base;
|
||||
@@ -201,7 +201,7 @@ dri2DestroyDrawable(__GLXDRIdrawable *base)
|
||||
{
|
||||
struct dri2_screen *psc = (struct dri2_screen *) base->psc;
|
||||
struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
|
||||
__GLXdisplayPrivate *dpyPriv = psc->base.display;
|
||||
struct glx_display *dpyPriv = psc->base.display;
|
||||
struct dri2_display *pdp = (struct dri2_display *)dpyPriv->dri2Display;
|
||||
|
||||
__glxHashDelete(pdp->dri2Hash, pdraw->base.xDrawable);
|
||||
@@ -217,7 +217,7 @@ dri2CreateDrawable(struct glx_screen *base, XID xDrawable,
|
||||
struct dri2_drawable *pdraw;
|
||||
struct dri2_screen *psc = (struct dri2_screen *) base;
|
||||
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) config_base;
|
||||
__GLXdisplayPrivate *dpyPriv;
|
||||
struct glx_display *dpyPriv;
|
||||
struct dri2_display *pdp;
|
||||
GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1;
|
||||
|
||||
@@ -402,7 +402,7 @@ dri2_copy_drawable(struct dri2_drawable *priv, int dest, int src)
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_wait_x(__GLXcontext *gc)
|
||||
dri2_wait_x(struct glx_context *gc)
|
||||
{
|
||||
struct dri2_drawable *priv = (struct dri2_drawable *)
|
||||
GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
|
||||
@@ -414,7 +414,7 @@ dri2_wait_x(__GLXcontext *gc)
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_wait_gl(__GLXcontext *gc)
|
||||
dri2_wait_gl(struct glx_context *gc)
|
||||
{
|
||||
struct dri2_drawable *priv = (struct dri2_drawable *)
|
||||
GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
|
||||
@@ -429,9 +429,9 @@ static void
|
||||
dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
|
||||
{
|
||||
struct dri2_drawable *pdraw = loaderPrivate;
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(pdraw->base.psc->dpy);
|
||||
struct glx_display *priv = __glXInitialize(pdraw->base.psc->dpy);
|
||||
struct dri2_display *pdp = (struct dri2_display *)priv->dri2Display;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
/* Old servers don't send invalidate events */
|
||||
if (!pdp->invalidateAvailable)
|
||||
@@ -490,7 +490,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
|
||||
int64_t remainder)
|
||||
{
|
||||
struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
|
||||
__GLXdisplayPrivate *dpyPriv = __glXInitialize(priv->base.psc->dpy);
|
||||
struct glx_display *dpyPriv = __glXInitialize(priv->base.psc->dpy);
|
||||
struct dri2_screen *psc = (struct dri2_screen *) priv->base.psc;
|
||||
struct dri2_display *pdp =
|
||||
(struct dri2_display *)dpyPriv->dri2Display;
|
||||
@@ -646,10 +646,10 @@ dri2_bind_tex_image(Display * dpy,
|
||||
GLXDrawable drawable,
|
||||
int buffer, const int *attrib_list)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct dri2_context *pcp = (struct dri2_context *) gc;
|
||||
__GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable);
|
||||
__GLXdisplayPrivate *dpyPriv = __glXInitialize(dpy);
|
||||
struct glx_display *dpyPriv = __glXInitialize(dpy);
|
||||
struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
|
||||
struct dri2_display *pdp =
|
||||
(struct dri2_display *) dpyPriv->dri2Display;
|
||||
@@ -725,7 +725,7 @@ static const struct glx_screen_vtable dri2_screen_vtable = {
|
||||
};
|
||||
|
||||
static struct glx_screen *
|
||||
dri2CreateScreen(int screen, __GLXdisplayPrivate * priv)
|
||||
dri2CreateScreen(int screen, struct glx_display * priv)
|
||||
{
|
||||
const __DRIconfig **driver_configs;
|
||||
const __DRIextension **extensions;
|
||||
@@ -876,7 +876,7 @@ dri2DestroyDisplay(__GLXDRIdisplay * dpy)
|
||||
_X_HIDDEN __GLXDRIdrawable *
|
||||
dri2GetGlxDrawableFromXDrawableId(Display *dpy, XID id)
|
||||
{
|
||||
__GLXdisplayPrivate *d = __glXInitialize(dpy);
|
||||
struct glx_display *d = __glXInitialize(dpy);
|
||||
struct dri2_display *pdp = (struct dri2_display *) d->dri2Display;
|
||||
__GLXDRIdrawable *pdraw;
|
||||
|
||||
|
@@ -78,7 +78,7 @@ struct dri_screen
|
||||
|
||||
struct dri_context
|
||||
{
|
||||
__GLXcontext base;
|
||||
struct glx_context base;
|
||||
__GLXDRIcontext dri_vtable;
|
||||
__DRIcontext *driContext;
|
||||
XID hwContextID;
|
||||
@@ -499,7 +499,7 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
|
||||
}
|
||||
|
||||
static void
|
||||
dri_destroy_context(__GLXcontext * context)
|
||||
dri_destroy_context(struct glx_context * context)
|
||||
{
|
||||
struct dri_context *pcp = (struct dri_context *) context;
|
||||
struct dri_screen *psc = (struct dri_screen *) context->psc;
|
||||
@@ -519,7 +519,7 @@ dri_destroy_context(__GLXcontext * context)
|
||||
}
|
||||
|
||||
static Bool
|
||||
driBindContext(__GLXcontext *context,
|
||||
driBindContext(struct glx_context *context,
|
||||
__GLXDRIdrawable *draw, __GLXDRIdrawable *read)
|
||||
{
|
||||
struct dri_context *pcp = (struct dri_context *) context;
|
||||
@@ -532,7 +532,7 @@ driBindContext(__GLXcontext *context,
|
||||
}
|
||||
|
||||
static void
|
||||
driUnbindContext(__GLXcontext * context)
|
||||
driUnbindContext(struct glx_context * context)
|
||||
{
|
||||
struct dri_context *pcp = (struct dri_context *) context;
|
||||
struct dri_screen *psc = (struct dri_screen *) pcp->base.psc;
|
||||
@@ -549,10 +549,10 @@ static const struct glx_context_vtable dri_context_vtable = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static __GLXcontext *
|
||||
static struct glx_context *
|
||||
dri_create_context(struct glx_screen *base,
|
||||
struct glx_config *config_base,
|
||||
GLXContext shareList, int renderType)
|
||||
struct glx_context *shareList, int renderType)
|
||||
{
|
||||
struct dri_context *pcp, *pcp_shared;
|
||||
struct dri_screen *psc = (struct dri_screen *) base;
|
||||
@@ -756,7 +756,7 @@ driWaitForSBC(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
|
||||
static int
|
||||
driSetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
|
||||
struct dri_screen *psc;
|
||||
|
||||
@@ -775,7 +775,7 @@ driSetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
|
||||
static int
|
||||
driGetSwapInterval(__GLXDRIdrawable *pdraw)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
|
||||
struct dri_screen *psc;
|
||||
|
||||
@@ -827,7 +827,7 @@ static const struct glx_screen_vtable dri_screen_vtable = {
|
||||
};
|
||||
|
||||
static struct glx_screen *
|
||||
driCreateScreen(int screen, __GLXdisplayPrivate *priv)
|
||||
driCreateScreen(int screen, struct glx_display *priv)
|
||||
{
|
||||
struct dri_display *pdp;
|
||||
__GLXDRIscreen *psp;
|
||||
|
@@ -35,7 +35,7 @@ struct drisw_display
|
||||
|
||||
struct drisw_context
|
||||
{
|
||||
__GLXcontext base;
|
||||
struct glx_context base;
|
||||
__GLXDRIcontext dri_vtable;
|
||||
__DRIcontext *driContext;
|
||||
|
||||
@@ -240,7 +240,7 @@ static const __DRIextension *loader_extensions[] = {
|
||||
*/
|
||||
|
||||
static void
|
||||
drisw_destroy_context(__GLXcontext *context)
|
||||
drisw_destroy_context(struct glx_context *context)
|
||||
{
|
||||
struct drisw_context *pcp = (struct drisw_context *) context;
|
||||
struct drisw_screen *psc = (struct drisw_screen *) context->psc;
|
||||
@@ -259,7 +259,7 @@ drisw_destroy_context(__GLXcontext *context)
|
||||
}
|
||||
|
||||
static Bool
|
||||
driBindContext(__GLXcontext * context,
|
||||
driBindContext(struct glx_context * context,
|
||||
__GLXDRIdrawable * draw, __GLXDRIdrawable * read)
|
||||
{
|
||||
struct drisw_context *pcp = (struct drisw_context *) context;
|
||||
@@ -272,7 +272,7 @@ driBindContext(__GLXcontext * context,
|
||||
}
|
||||
|
||||
static void
|
||||
driUnbindContext(__GLXcontext * context)
|
||||
driUnbindContext(struct glx_context * context)
|
||||
{
|
||||
struct drisw_context *pcp = (struct drisw_context *) context;
|
||||
struct drisw_screen *psc = (struct drisw_screen *) pcp->base.psc;
|
||||
@@ -289,10 +289,10 @@ static const struct glx_context_vtable drisw_context_vtable = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static __GLXcontext *
|
||||
static struct glx_context *
|
||||
drisw_create_context(struct glx_screen *base,
|
||||
struct glx_config *config_base,
|
||||
GLXContext shareList, int renderType)
|
||||
struct glx_context *shareList, int renderType)
|
||||
{
|
||||
struct drisw_context *pcp, *pcp_shared;
|
||||
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) config_base;
|
||||
@@ -433,7 +433,7 @@ static const struct glx_screen_vtable drisw_screen_vtable = {
|
||||
};
|
||||
|
||||
static struct glx_screen *
|
||||
driCreateScreen(int screen, __GLXdisplayPrivate *priv)
|
||||
driCreateScreen(int screen, struct glx_display *priv)
|
||||
{
|
||||
__GLXDRIscreen *psp;
|
||||
const __DRIconfig **driver_configs;
|
||||
|
@@ -57,7 +57,7 @@
|
||||
static void
|
||||
warn_GLX_1_3(Display * dpy, const char *function_name)
|
||||
{
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
struct glx_display *priv = __glXInitialize(dpy);
|
||||
|
||||
if (priv->minorVersion < 3) {
|
||||
fprintf(stderr,
|
||||
@@ -85,7 +85,7 @@ static void
|
||||
ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
|
||||
const CARD32 * attribs, size_t num_attribs)
|
||||
{
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
struct glx_display *priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw;
|
||||
CARD32 *output;
|
||||
CARD8 opcode;
|
||||
@@ -187,7 +187,7 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config,
|
||||
XID drawable, XID glxdrawable,
|
||||
const int *attrib_list, size_t num_attribs)
|
||||
{
|
||||
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
|
||||
struct glx_display *const priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw;
|
||||
struct glx_screen *psc;
|
||||
|
||||
@@ -214,7 +214,7 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config,
|
||||
static void
|
||||
DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable)
|
||||
{
|
||||
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
|
||||
struct glx_display *const priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
|
||||
|
||||
if (pdraw != NULL) {
|
||||
@@ -263,7 +263,7 @@ static int
|
||||
GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
|
||||
int attribute, unsigned int *value)
|
||||
{
|
||||
__GLXdisplayPrivate *priv;
|
||||
struct glx_display *priv;
|
||||
xGLXGetDrawableAttributesReply reply;
|
||||
CARD32 *data;
|
||||
CARD8 opcode;
|
||||
@@ -461,7 +461,7 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
|
||||
unsigned int width, unsigned int height,
|
||||
const int *attrib_list, GLboolean size_in_attribs)
|
||||
{
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
struct glx_display *priv = __glXInitialize(dpy);
|
||||
GLXDrawable id = 0;
|
||||
CARD32 *data;
|
||||
CARD8 opcode;
|
||||
@@ -547,7 +547,7 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
|
||||
static void
|
||||
DestroyPbuffer(Display * dpy, GLXDrawable drawable)
|
||||
{
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
struct glx_display *priv = __glXInitialize(dpy);
|
||||
CARD8 opcode;
|
||||
|
||||
if ((dpy == NULL) || (drawable == 0)) {
|
||||
|
@@ -67,16 +67,14 @@
|
||||
|
||||
#define __GLX_MAX_TEXTURE_UNITS 32
|
||||
|
||||
typedef struct __GLXcontextRec __GLXcontext;
|
||||
typedef struct __GLXdrawableRec __GLXdrawable;
|
||||
typedef struct __GLXdisplayPrivateRec __GLXdisplayPrivate;
|
||||
typedef struct _glapi_table __GLapi;
|
||||
struct glx_display;
|
||||
struct glx_context;
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
extern void DRI_glXUseXFont(GLXContext CC,
|
||||
extern void DRI_glXUseXFont(struct glx_context *ctx,
|
||||
Font font, int first, int count, int listbase);
|
||||
|
||||
#endif
|
||||
@@ -101,16 +99,17 @@ struct __GLXDRIdisplayRec
|
||||
*/
|
||||
void (*destroyDisplay) (__GLXDRIdisplay * display);
|
||||
|
||||
struct glx_screen *(*createScreen)(int screen, __GLXdisplayPrivate * priv);
|
||||
struct glx_screen *(*createScreen)(int screen, struct glx_display * priv);
|
||||
};
|
||||
|
||||
struct __GLXDRIscreenRec {
|
||||
|
||||
void (*destroyScreen)(struct glx_screen *psc);
|
||||
|
||||
__GLXcontext *(*createContext)(struct glx_screen *psc,
|
||||
struct glx_config *config,
|
||||
GLXContext shareList, int renderType);
|
||||
struct glx_context *(*createContext)(struct glx_screen *psc,
|
||||
struct glx_config *config,
|
||||
struct glx_context *shareList,
|
||||
int renderType);
|
||||
|
||||
__GLXDRIdrawable *(*createDrawable)(struct glx_screen *psc,
|
||||
XID drawable,
|
||||
@@ -134,9 +133,9 @@ struct __GLXDRIscreenRec {
|
||||
|
||||
struct __GLXDRIcontextRec
|
||||
{
|
||||
Bool(*bindContext) (__GLXcontext *context, __GLXDRIdrawable *pdraw,
|
||||
Bool(*bindContext) (struct glx_context *context, __GLXDRIdrawable *pdraw,
|
||||
__GLXDRIdrawable *pread);
|
||||
void (*unbindContext) (__GLXcontext *context);
|
||||
void (*unbindContext) (struct glx_context *context);
|
||||
};
|
||||
|
||||
struct __GLXDRIdrawableRec
|
||||
@@ -221,10 +220,10 @@ typedef struct __GLXattributeMachineRec
|
||||
} __GLXattributeMachine;
|
||||
|
||||
struct glx_context_vtable {
|
||||
void (*destroy)(__GLXcontext *ctx);
|
||||
void (*wait_gl)(__GLXcontext *ctx);
|
||||
void (*wait_x)(__GLXcontext *ctx);
|
||||
void (*use_x_font)(__GLXcontext *ctx,
|
||||
void (*destroy)(struct glx_context *ctx);
|
||||
void (*wait_gl)(struct glx_context *ctx);
|
||||
void (*wait_x)(struct glx_context *ctx);
|
||||
void (*use_x_font)(struct glx_context *ctx,
|
||||
Font font, int first, int count, int listBase);
|
||||
void (*bind_tex_image)(Display * dpy,
|
||||
GLXDrawable drawable,
|
||||
@@ -240,7 +239,7 @@ glx_send_destroy_context(Display *dpy, XID xid);
|
||||
* GLX state that needs to be kept on the client. One of these records
|
||||
* exist for each context that has been made current by this client.
|
||||
*/
|
||||
struct __GLXcontextRec
|
||||
struct glx_context
|
||||
{
|
||||
/**
|
||||
* \name Drawing command buffer.
|
||||
@@ -326,7 +325,7 @@ struct __GLXcontextRec
|
||||
* Fill newImage with the unpacked form of \c oldImage getting it
|
||||
* ready for transport to the server.
|
||||
*/
|
||||
void (*fillImage) (__GLXcontext *, GLint, GLint, GLint, GLint, GLenum,
|
||||
void (*fillImage) (struct glx_context *, GLint, GLint, GLint, GLint, GLenum,
|
||||
GLenum, const GLvoid *, GLubyte *, GLubyte *);
|
||||
|
||||
/**
|
||||
@@ -443,7 +442,7 @@ struct __GLXcontextRec
|
||||
};
|
||||
|
||||
extern Bool
|
||||
glx_context_init(__GLXcontext *gc,
|
||||
glx_context_init(struct glx_context *gc,
|
||||
struct glx_screen *psc, struct glx_config *fbconfig);
|
||||
|
||||
#define __glXSetError(gc,code) \
|
||||
@@ -451,7 +450,7 @@ glx_context_init(__GLXcontext *gc,
|
||||
(gc)->error = code; \
|
||||
}
|
||||
|
||||
extern void __glFreeAttributeState(__GLXcontext *);
|
||||
extern void __glFreeAttributeState(struct glx_context *);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
@@ -486,9 +485,10 @@ 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)(struct glx_screen *psc,
|
||||
struct glx_config *config,
|
||||
GLXContext shareList, int renderType);
|
||||
struct glx_context *(*create_context)(struct glx_screen *psc,
|
||||
struct glx_config *config,
|
||||
struct glx_context *shareList,
|
||||
int renderType);
|
||||
};
|
||||
|
||||
struct glx_screen
|
||||
@@ -506,7 +506,7 @@ struct glx_screen
|
||||
*/
|
||||
char *effectiveGLXexts;
|
||||
|
||||
__GLXdisplayPrivate *display;
|
||||
struct glx_display *display;
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
/**
|
||||
@@ -541,11 +541,11 @@ struct glx_screen
|
||||
* Per display private data. One of these records exists for each display
|
||||
* that is using the OpenGL (GLX) extension.
|
||||
*/
|
||||
struct __GLXdisplayPrivateRec
|
||||
struct glx_display
|
||||
{
|
||||
/* The extension protocol codes */
|
||||
XExtCodes *codes;
|
||||
struct __GLXdisplayPrivateRec *next;
|
||||
struct glx_display *next;
|
||||
|
||||
/**
|
||||
* Back pointer to the display
|
||||
@@ -599,24 +599,24 @@ struct __GLXdisplayPrivateRec
|
||||
|
||||
extern int
|
||||
glx_screen_init(struct glx_screen *psc,
|
||||
int screen, __GLXdisplayPrivate * priv);
|
||||
int screen, struct glx_display * priv);
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
extern __GLXDRIdrawable *
|
||||
dri2GetGlxDrawableFromXDrawableId(Display *dpy, XID id);
|
||||
#endif
|
||||
|
||||
extern GLubyte *__glXFlushRenderBuffer(__GLXcontext *, GLubyte *);
|
||||
extern GLubyte *__glXFlushRenderBuffer(struct glx_context *, GLubyte *);
|
||||
|
||||
extern void __glXSendLargeChunk(__GLXcontext * gc, GLint requestNumber,
|
||||
extern void __glXSendLargeChunk(struct glx_context * gc, GLint requestNumber,
|
||||
GLint totalRequests,
|
||||
const GLvoid * data, GLint dataLen);
|
||||
|
||||
extern void __glXSendLargeCommand(__GLXcontext *, const GLvoid *, GLint,
|
||||
extern void __glXSendLargeCommand(struct glx_context *, const GLvoid *, GLint,
|
||||
const GLvoid *, GLint);
|
||||
|
||||
/* Initialize the GLX extension for dpy */
|
||||
extern __GLXdisplayPrivate *__glXInitialize(Display *);
|
||||
extern struct glx_display *__glXInitialize(Display *);
|
||||
|
||||
extern void __glXPreferEGL(int state);
|
||||
|
||||
@@ -627,7 +627,7 @@ extern int __glXDebug;
|
||||
/* This is per-thread storage in an MT environment */
|
||||
#if defined( PTHREADS )
|
||||
|
||||
extern void __glXSetCurrentContext(__GLXcontext * c);
|
||||
extern void __glXSetCurrentContext(struct glx_context * c);
|
||||
|
||||
# if defined( GLX_USE_TLS )
|
||||
|
||||
@@ -638,13 +638,13 @@ extern __thread void *__glX_tls_Context
|
||||
|
||||
# else
|
||||
|
||||
extern __GLXcontext *__glXGetCurrentContext(void);
|
||||
extern struct glx_context *__glXGetCurrentContext(void);
|
||||
|
||||
# endif /* defined( GLX_USE_TLS ) */
|
||||
|
||||
#else
|
||||
|
||||
extern __GLXcontext *__glXcurrentContext;
|
||||
extern struct glx_context *__glXcurrentContext;
|
||||
#define __glXGetCurrentContext() __glXcurrentContext
|
||||
#define __glXSetCurrentContext(gc) __glXcurrentContext = gc
|
||||
|
||||
@@ -680,7 +680,7 @@ extern CARD8 __glXSetupForCommand(Display * dpy);
|
||||
extern const GLuint __glXDefaultPixelStore[9];
|
||||
|
||||
/* Send an image to the server using RenderLarge. */
|
||||
extern void __glXSendLargeImage(__GLXcontext * gc, GLint compsize, GLint dim,
|
||||
extern void __glXSendLargeImage(struct glx_context * gc, GLint compsize, GLint dim,
|
||||
GLint width, GLint height, GLint depth,
|
||||
GLenum format, GLenum type,
|
||||
const GLvoid * src, GLubyte * pc,
|
||||
@@ -704,7 +704,7 @@ extern GLint __glBytesPerElement(GLenum type);
|
||||
** updated to contain the modes needed by the server to decode the
|
||||
** sent data.
|
||||
*/
|
||||
extern void __glFillImage(__GLXcontext *, GLint, GLint, GLint, GLint, GLenum,
|
||||
extern void __glFillImage(struct glx_context *, GLint, GLint, GLint, GLint, GLenum,
|
||||
GLenum, const GLvoid *, GLubyte *, GLubyte *);
|
||||
|
||||
/* Copy map data with a stride into a packed buffer */
|
||||
@@ -719,15 +719,15 @@ extern void __glFillMap2d(GLint, GLint, GLint, GLint, GLint,
|
||||
** Empty an image out of the reply buffer into the clients memory applying
|
||||
** the pack modes to pack back into the clients requested format.
|
||||
*/
|
||||
extern void __glEmptyImage(__GLXcontext *, GLint, GLint, GLint, GLint, GLenum,
|
||||
extern void __glEmptyImage(struct glx_context *, GLint, GLint, GLint, GLint, GLenum,
|
||||
GLenum, const GLubyte *, GLvoid *);
|
||||
|
||||
|
||||
/*
|
||||
** Allocate and Initialize Vertex Array client state, and free.
|
||||
*/
|
||||
extern void __glXInitVertexArrayState(__GLXcontext *);
|
||||
extern void __glXFreeVertexArrayState(__GLXcontext *);
|
||||
extern void __glXInitVertexArrayState(struct glx_context *);
|
||||
extern void __glXFreeVertexArrayState(struct glx_context *);
|
||||
|
||||
/*
|
||||
** Inform the Server of the major and minor numbers and of the client
|
||||
@@ -789,6 +789,6 @@ GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable);
|
||||
#endif
|
||||
|
||||
extern struct glx_screen *
|
||||
indirect_create_screen(int screen, __GLXdisplayPrivate * priv);
|
||||
indirect_create_screen(int screen, struct glx_display * priv);
|
||||
|
||||
#endif /* !__GLX_client_h__ */
|
||||
|
@@ -89,7 +89,7 @@ GarbageCollectDRIDrawables(struct glx_screen * sc)
|
||||
{
|
||||
XID draw;
|
||||
__GLXDRIdrawable *pdraw;
|
||||
__GLXdisplayPrivate *priv = sc->display;
|
||||
struct glx_display *priv = sc->display;
|
||||
XWindowAttributes xwa;
|
||||
int (*oldXErrorHandler) (Display *, XErrorEvent *);
|
||||
|
||||
@@ -127,7 +127,7 @@ GarbageCollectDRIDrawables(struct glx_screen * sc)
|
||||
_X_HIDDEN __GLXDRIdrawable *
|
||||
GetGLXDRIDrawable(Display * dpy, GLXDrawable drawable)
|
||||
{
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
struct glx_display *priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw;
|
||||
|
||||
if (priv == NULL)
|
||||
@@ -159,7 +159,7 @@ GetGLXDRIDrawable(Display * dpy, GLXDrawable drawable)
|
||||
static struct glx_screen *
|
||||
GetGLXScreenConfigs(Display * dpy, int scrn)
|
||||
{
|
||||
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
|
||||
struct glx_display *const priv = __glXInitialize(dpy);
|
||||
|
||||
return (priv
|
||||
&& priv->screens !=
|
||||
@@ -168,7 +168,7 @@ GetGLXScreenConfigs(Display * dpy, int scrn)
|
||||
|
||||
|
||||
static int
|
||||
GetGLXPrivScreenConfig(Display * dpy, int scrn, __GLXdisplayPrivate ** ppriv,
|
||||
GetGLXPrivScreenConfig(Display * dpy, int scrn, struct glx_display ** ppriv,
|
||||
struct glx_screen ** ppsc)
|
||||
{
|
||||
/* Initialize the extension, if needed . This has the added value
|
||||
@@ -213,7 +213,7 @@ GetGLXPrivScreenConfig(Display * dpy, int scrn, __GLXdisplayPrivate ** ppriv,
|
||||
static struct glx_config *
|
||||
ValidateGLXFBConfig(Display * dpy, GLXFBConfig fbconfig)
|
||||
{
|
||||
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
|
||||
struct glx_display *const priv = __glXInitialize(dpy);
|
||||
int num_screens = ScreenCount(dpy);
|
||||
unsigned i;
|
||||
struct glx_config *config;
|
||||
@@ -236,17 +236,17 @@ ValidateGLXFBConfig(Display * dpy, GLXFBConfig fbconfig)
|
||||
|
||||
static const struct glx_context_vtable applegl_context_vtable;
|
||||
|
||||
static __GLcontext *
|
||||
static struct glx_context *
|
||||
applegl_create_context(struct glx_screen *psc,
|
||||
struct glx_config *mode,
|
||||
GLXContext shareList, int renderType)
|
||||
struct glx_context *shareList, int renderType)
|
||||
{
|
||||
__GLXcontext *gc;
|
||||
struct glx_context *gc;
|
||||
int errorcode;
|
||||
bool x11error;
|
||||
|
||||
/* TODO: Integrate this with apple_glx_create_context and make
|
||||
* struct apple_glx_context inherit from __GLXcontext. */
|
||||
* struct apple_glx_context inherit from struct glx_context. */
|
||||
|
||||
gc = Xmalloc(sizeof *gc);
|
||||
if (pcp == NULL)
|
||||
@@ -292,12 +292,12 @@ applegl_create_context(struct glx_screen *psc,
|
||||
* function called \c __glXAllocateClientState that allocates the memory and
|
||||
* does all the initialization (including the pixel pack / unpack).
|
||||
*/
|
||||
static GLXContext
|
||||
static struct glx_context *
|
||||
indirect_create_context(struct glx_screen *psc,
|
||||
struct glx_config *mode,
|
||||
GLXContext shareList, int renderType)
|
||||
struct glx_context *shareList, int renderType)
|
||||
{
|
||||
GLXContext gc;
|
||||
struct glx_context *gc;
|
||||
int bufSize;
|
||||
CARD8 opcode;
|
||||
__GLXattribute *state;
|
||||
@@ -308,12 +308,12 @@ indirect_create_context(struct glx_screen *psc,
|
||||
}
|
||||
|
||||
/* Allocate our context record */
|
||||
gc = (GLXContext) Xmalloc(sizeof(struct __GLXcontextRec));
|
||||
gc = Xmalloc(sizeof *gc);
|
||||
if (!gc) {
|
||||
/* Out of memory */
|
||||
return NULL;
|
||||
}
|
||||
memset(gc, 0, sizeof(struct __GLXcontextRec));
|
||||
memset(gc, 0, sizeof *gc);
|
||||
|
||||
glx_context_init(gc, psc, mode);
|
||||
gc->isDirect = GL_FALSE;
|
||||
@@ -396,7 +396,7 @@ struct glx_screen_vtable indirect_screen_vtable = {
|
||||
};
|
||||
|
||||
_X_HIDDEN struct glx_screen *
|
||||
indirect_create_screen(int screen, __GLXdisplayPrivate * priv)
|
||||
indirect_create_screen(int screen, struct glx_display * priv)
|
||||
{
|
||||
struct glx_screen *psc;
|
||||
|
||||
@@ -413,7 +413,7 @@ indirect_create_screen(int screen, __GLXdisplayPrivate * priv)
|
||||
|
||||
|
||||
_X_HIDDEN Bool
|
||||
glx_context_init(__GLXcontext *gc,
|
||||
glx_context_init(struct glx_context *gc,
|
||||
struct glx_screen *psc, struct glx_config *config)
|
||||
{
|
||||
gc->majorOpcode = __glXSetupForCommand(psc->display->dpy);
|
||||
@@ -441,13 +441,13 @@ glx_context_init(__GLXcontext *gc,
|
||||
static GLXContext
|
||||
CreateContext(Display * dpy, int generic_id,
|
||||
struct glx_config *config,
|
||||
GLXContext shareList,
|
||||
GLXContext shareList_user,
|
||||
Bool allowDirect,
|
||||
unsigned code, int renderType, int screen)
|
||||
{
|
||||
GLXContext gc = NULL;
|
||||
struct glx_context *gc = NULL;
|
||||
struct glx_screen *const psc = GetGLXScreenConfigs(dpy, screen);
|
||||
|
||||
struct glx_context *shareList = (struct glx_context *) shareList_user;
|
||||
if (dpy == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -529,7 +529,7 @@ CreateContext(Display * dpy, int generic_id,
|
||||
gc->imported = GL_FALSE;
|
||||
gc->renderType = renderType;
|
||||
|
||||
return gc;
|
||||
return (GLXContext) gc;
|
||||
}
|
||||
|
||||
_X_EXPORT GLXContext
|
||||
@@ -579,7 +579,7 @@ glx_send_destroy_context(Display *dpy, XID xid)
|
||||
}
|
||||
|
||||
static void
|
||||
indirect_destroy_context(__GLXcontext *gc)
|
||||
indirect_destroy_context(struct glx_context *gc)
|
||||
{
|
||||
if (!gc->imported && gc->xid)
|
||||
glx_send_destroy_context(gc->psc->dpy, gc->xid);
|
||||
@@ -604,8 +604,10 @@ indirect_destroy_context(__GLXcontext *gc)
|
||||
** Destroy the named context
|
||||
*/
|
||||
static void
|
||||
DestroyContext(Display * dpy, GLXContext gc)
|
||||
DestroyContext(Display * dpy, GLXContext ctx)
|
||||
{
|
||||
struct glx_context *gc = (struct glx_context *) ctx;
|
||||
|
||||
if (!gc)
|
||||
return;
|
||||
|
||||
@@ -640,7 +642,7 @@ glXDestroyContext(Display * dpy, GLXContext gc)
|
||||
_X_EXPORT Bool
|
||||
glXQueryVersion(Display * dpy, int *major, int *minor)
|
||||
{
|
||||
__GLXdisplayPrivate *priv;
|
||||
struct glx_display *priv;
|
||||
|
||||
/* Init the extension. This fetches the major and minor version. */
|
||||
priv = __glXInitialize(dpy);
|
||||
@@ -674,7 +676,7 @@ glXQueryExtension(Display * dpy, int *errorBase, int *eventBase)
|
||||
}
|
||||
|
||||
static void
|
||||
indirect_wait_gl(__GLXcontext *gc)
|
||||
indirect_wait_gl(struct glx_context *gc)
|
||||
{
|
||||
xGLXWaitGLReq *req;
|
||||
Display *dpy = gc->currentDpy;
|
||||
@@ -699,14 +701,14 @@ indirect_wait_gl(__GLXcontext *gc)
|
||||
_X_EXPORT void
|
||||
glXWaitGL(void)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
if (gc && gc->vtable->use_x_font)
|
||||
gc->vtable->wait_gl(gc);
|
||||
}
|
||||
|
||||
static void
|
||||
indirect_wait_x(__GLXcontext *gc)
|
||||
indirect_wait_x(struct glx_context *gc)
|
||||
{
|
||||
xGLXWaitXReq *req;
|
||||
Display *dpy = gc->currentDpy;
|
||||
@@ -730,14 +732,14 @@ indirect_wait_x(__GLXcontext *gc)
|
||||
_X_EXPORT void
|
||||
glXWaitX(void)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
if (gc && gc->vtable->use_x_font)
|
||||
gc->vtable->wait_x(gc);
|
||||
}
|
||||
|
||||
static void
|
||||
indirect_use_x_font(__GLXcontext *gc,
|
||||
indirect_use_x_font(struct glx_context *gc,
|
||||
Font font, int first, int count, int listBase)
|
||||
{
|
||||
xGLXUseXFontReq *req;
|
||||
@@ -763,19 +765,19 @@ indirect_use_x_font(__GLXcontext *gc,
|
||||
#ifdef GLX_USE_APPLEGL
|
||||
|
||||
static void
|
||||
applegl_destroy_context(__GLXcontext *gc)
|
||||
applegl_destroy_context(struct glx_context *gc)
|
||||
{
|
||||
apple_glx_destroy_context(&gc->driContext, gc->currentDpy);
|
||||
}
|
||||
|
||||
static void
|
||||
applegl_wait_gl(__GLXcontext *gc)
|
||||
applegl_wait_gl(struct glx_context *gc)
|
||||
{
|
||||
glFinish();
|
||||
}
|
||||
|
||||
static void
|
||||
applegl_wait_x(__GLXcontext *gc)
|
||||
applegl_wait_x(struct glx_context *gc)
|
||||
{
|
||||
apple_glx_waitx(gc->dpy, gc->driContext);
|
||||
}
|
||||
@@ -794,7 +796,7 @@ static const struct glx_context_vtable applegl_context_vtable = {
|
||||
_X_EXPORT void
|
||||
glXUseXFont(Font font, int first, int count, int listBase)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
if (gc && gc->vtable->use_x_font)
|
||||
gc->vtable->use_x_font(gc, font, first, count, listBase);
|
||||
@@ -807,11 +809,13 @@ glXUseXFont(Font font, int first, int count, int listBase)
|
||||
** attribute "mask".
|
||||
*/
|
||||
_X_EXPORT void
|
||||
glXCopyContext(Display * dpy, GLXContext source,
|
||||
GLXContext dest, unsigned long mask)
|
||||
glXCopyContext(Display * dpy, GLXContext source_user,
|
||||
GLXContext dest_user, unsigned long mask)
|
||||
{
|
||||
struct glx_context *source = (struct glx_context *) source_user;
|
||||
struct glx_context *dest = (struct glx_context *) dest_user;
|
||||
#ifdef GLX_USE_APPLEGL
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
int errorcode;
|
||||
bool x11error;
|
||||
|
||||
@@ -822,7 +826,7 @@ glXCopyContext(Display * dpy, GLXContext source,
|
||||
|
||||
#else
|
||||
xGLXCopyContextReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
GLXContextTag tag;
|
||||
CARD8 opcode;
|
||||
|
||||
@@ -918,8 +922,10 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
|
||||
* the GLX protocol here at all?
|
||||
*/
|
||||
_X_EXPORT Bool
|
||||
glXIsDirect(Display * dpy, GLXContext gc)
|
||||
glXIsDirect(Display * dpy, GLXContext gc_user)
|
||||
{
|
||||
struct glx_context *gc = (struct glx_context *) gc_user;
|
||||
|
||||
if (!gc) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
@@ -974,7 +980,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
|
||||
/* FIXME: Maybe delay __DRIdrawable creation until the drawable
|
||||
* is actually bound to a context... */
|
||||
|
||||
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
|
||||
struct glx_display *const priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw;
|
||||
struct glx_screen *psc;
|
||||
struct glx_config *config;
|
||||
@@ -1029,7 +1035,7 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
{
|
||||
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
|
||||
struct glx_display *const priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, glxpixmap);
|
||||
|
||||
if (pdraw != NULL) {
|
||||
@@ -1052,7 +1058,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
|
||||
__glXSendError(dpy, GLXBadCurrentWindow, 0, X_GLXSwapBuffers, false);
|
||||
}
|
||||
#else
|
||||
GLXContext gc;
|
||||
struct glx_context *gc;
|
||||
GLXContextTag tag;
|
||||
CARD8 opcode;
|
||||
#ifdef USE_XCB
|
||||
@@ -1118,7 +1124,7 @@ _X_EXPORT int
|
||||
glXGetConfig(Display * dpy, XVisualInfo * vis, int attribute,
|
||||
int *value_return)
|
||||
{
|
||||
__GLXdisplayPrivate *priv;
|
||||
struct glx_display *priv;
|
||||
struct glx_screen *psc;
|
||||
struct glx_config *config;
|
||||
int status;
|
||||
@@ -1479,7 +1485,7 @@ _X_EXPORT XVisualInfo *
|
||||
glXChooseVisual(Display * dpy, int screen, int *attribList)
|
||||
{
|
||||
XVisualInfo *visualList = NULL;
|
||||
__GLXdisplayPrivate *priv;
|
||||
struct glx_display *priv;
|
||||
struct glx_screen *psc;
|
||||
struct glx_config test_config;
|
||||
struct glx_config *config;
|
||||
@@ -1545,7 +1551,7 @@ _X_EXPORT const char *
|
||||
glXQueryExtensionsString(Display * dpy, int screen)
|
||||
{
|
||||
struct glx_screen *psc;
|
||||
__GLXdisplayPrivate *priv;
|
||||
struct glx_display *priv;
|
||||
|
||||
if (GetGLXPrivScreenConfig(dpy, screen, &priv, &psc) != Success) {
|
||||
return NULL;
|
||||
@@ -1591,7 +1597,7 @@ _X_EXPORT const char *
|
||||
glXQueryServerString(Display * dpy, int screen, int name)
|
||||
{
|
||||
struct glx_screen *psc;
|
||||
__GLXdisplayPrivate *priv;
|
||||
struct glx_display *priv;
|
||||
const char **str;
|
||||
|
||||
|
||||
@@ -1660,7 +1666,7 @@ __glXClientInfo(Display * dpy, int opcode)
|
||||
_X_EXPORT Display *
|
||||
glXGetCurrentDisplay(void)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
if (NULL == gc)
|
||||
return NULL;
|
||||
return gc->currentDpy;
|
||||
@@ -1674,11 +1680,11 @@ GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (),
|
||||
_X_EXPORT GLXContext
|
||||
glXImportContextEXT(Display *dpy, GLXContextID contextID)
|
||||
{
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
struct glx_display *priv = __glXInitialize(dpy);
|
||||
struct glx_screen *psc;
|
||||
xGLXQueryContextReply reply;
|
||||
CARD8 opcode;
|
||||
GLXContext ctx;
|
||||
struct glx_context *ctx;
|
||||
int propList[__GLX_MAX_CONTEXT_PROPS * 2], *pProp, nPropListBytes;
|
||||
int i, renderType;
|
||||
XID share;
|
||||
@@ -1767,14 +1773,16 @@ glXImportContextEXT(Display *dpy, GLXContextID contextID)
|
||||
ctx->imported = GL_TRUE;
|
||||
ctx->share_xid = share;
|
||||
|
||||
return ctx;
|
||||
return (GLXContext) ctx;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
_X_EXPORT int
|
||||
glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
|
||||
glXQueryContext(Display * dpy, GLXContext ctx_user, int attribute, int *value)
|
||||
{
|
||||
struct glx_context *ctx = (struct glx_context *) ctx_user;
|
||||
|
||||
switch (attribute) {
|
||||
case GLX_SHARE_CONTEXT_EXT:
|
||||
*value = ctx->share_xid;
|
||||
@@ -1802,8 +1810,10 @@ GLX_ALIAS(int, glXQueryContextInfoEXT,
|
||||
(Display * dpy, GLXContext ctx, int attribute, int *value),
|
||||
(dpy, ctx, attribute, value), glXQueryContext)
|
||||
|
||||
_X_EXPORT GLXContextID glXGetContextIDEXT(const GLXContext ctx)
|
||||
_X_EXPORT GLXContextID glXGetContextIDEXT(const GLXContext ctx_user)
|
||||
{
|
||||
struct glx_context *ctx = (struct glx_context *) ctx_user;
|
||||
|
||||
return ctx->xid;
|
||||
}
|
||||
|
||||
@@ -1853,7 +1863,8 @@ glXCreateNewContext(Display * dpy, GLXFBConfig fbconfig,
|
||||
_X_EXPORT GLXDrawable
|
||||
glXGetCurrentReadDrawable(void)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
return gc->currentReadable;
|
||||
}
|
||||
|
||||
@@ -1861,7 +1872,7 @@ glXGetCurrentReadDrawable(void)
|
||||
_X_EXPORT GLXFBConfig *
|
||||
glXGetFBConfigs(Display * dpy, int screen, int *nelements)
|
||||
{
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
struct glx_display *priv = __glXInitialize(dpy);
|
||||
struct glx_config **config_list = NULL;
|
||||
struct glx_config *config;
|
||||
unsigned num_configs = 0;
|
||||
@@ -1934,7 +1945,7 @@ static int
|
||||
__glXSwapIntervalSGI(int interval)
|
||||
{
|
||||
xGLXVendorPrivateReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct glx_screen *psc;
|
||||
Display *dpy;
|
||||
CARD32 *interval_ptr;
|
||||
@@ -1991,7 +2002,7 @@ static int
|
||||
__glXSwapIntervalMESA(unsigned int interval)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
if (gc != NULL && gc->driContext) {
|
||||
struct glx_screen *psc;
|
||||
@@ -2013,7 +2024,7 @@ static int
|
||||
__glXGetSwapIntervalMESA(void)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
if (gc != NULL && gc->driContext) {
|
||||
struct glx_screen *psc;
|
||||
@@ -2039,7 +2050,7 @@ __glXGetVideoSyncSGI(unsigned int *count)
|
||||
{
|
||||
int64_t ust, msc, sbc;
|
||||
int ret;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct glx_screen *psc;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXDRIdrawable *pdraw;
|
||||
@@ -2076,7 +2087,7 @@ __glXGetVideoSyncSGI(unsigned int *count)
|
||||
static int
|
||||
__glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct glx_screen *psc;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXDRIdrawable *pdraw;
|
||||
@@ -2217,7 +2228,7 @@ glXCreateContextWithConfigSGIX(Display * dpy,
|
||||
_X_EXPORT GLXFBConfigSGIX
|
||||
glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis)
|
||||
{
|
||||
__GLXdisplayPrivate *priv;
|
||||
struct glx_display *priv;
|
||||
struct glx_screen *psc = NULL;
|
||||
|
||||
if ((GetGLXPrivScreenConfig(dpy, vis->screen, &priv, &psc) != Success)
|
||||
@@ -2272,7 +2283,7 @@ static Bool
|
||||
__glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
|
||||
int64_t * ust, int64_t * msc, int64_t * sbc)
|
||||
{
|
||||
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
|
||||
struct glx_display * const priv = __glXInitialize(dpy);
|
||||
int ret;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXDRIdrawable *pdraw;
|
||||
@@ -2402,7 +2413,7 @@ static int64_t
|
||||
__glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable,
|
||||
int64_t target_msc, int64_t divisor, int64_t remainder)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
|
||||
struct glx_screen *psc = pdraw ? pdraw->psc : NULL;
|
||||
@@ -2561,7 +2572,7 @@ __glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
xGLXVendorPrivateReq *req;
|
||||
GLXContext gc;
|
||||
struct glx_context *gc;
|
||||
GLXContextTag tag;
|
||||
CARD32 *drawable_ptr;
|
||||
INT32 *x_ptr, *y_ptr, *w_ptr, *h_ptr;
|
||||
@@ -2631,7 +2642,7 @@ indirect_bind_tex_image(Display * dpy,
|
||||
int buffer, const int *attrib_list)
|
||||
{
|
||||
xGLXVendorPrivateReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
CARD32 *drawable_ptr;
|
||||
INT32 *buffer_ptr;
|
||||
CARD32 *num_attrib_ptr;
|
||||
@@ -2682,7 +2693,7 @@ static void
|
||||
indirect_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer)
|
||||
{
|
||||
xGLXVendorPrivateReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
CARD32 *drawable_ptr;
|
||||
INT32 *buffer_ptr;
|
||||
CARD8 opcode;
|
||||
@@ -2722,7 +2733,7 @@ static void
|
||||
__glXBindTexImageEXT(Display * dpy,
|
||||
GLXDrawable drawable, int buffer, const int *attrib_list)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
if (gc == NULL || gc->vtable->bind_tex_image == NULL)
|
||||
return;
|
||||
@@ -2733,7 +2744,7 @@ __glXBindTexImageEXT(Display * dpy,
|
||||
static void
|
||||
__glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
|
||||
if (gc == NULL || gc->vtable->release_tex_image == NULL)
|
||||
return;
|
||||
|
@@ -61,7 +61,7 @@ static GLubyte dummyBuffer[__GLX_BUFFER_LIMIT_SIZE];
|
||||
** gl and glx entry points are designed to operate as nop's when using
|
||||
** the dummy context structure.
|
||||
*/
|
||||
static __GLXcontext dummyContext = {
|
||||
static struct glx_context dummyContext = {
|
||||
&dummyBuffer[0],
|
||||
&dummyBuffer[0],
|
||||
&dummyBuffer[0],
|
||||
@@ -74,7 +74,7 @@ static __GLXcontext dummyContext = {
|
||||
/*
|
||||
** All indirect rendering contexts will share the same indirect dispatch table.
|
||||
*/
|
||||
static __GLapi *IndirectAPI = NULL;
|
||||
static struct _glapi_table *IndirectAPI = NULL;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -98,7 +98,7 @@ __thread void *__glX_tls_Context __attribute__ ((tls_model("initial-exec")))
|
||||
= &dummyContext;
|
||||
|
||||
_X_HIDDEN void
|
||||
__glXSetCurrentContext(__GLXcontext * c)
|
||||
__glXSetCurrentContext(struct glx_context * c)
|
||||
{
|
||||
__glX_tls_Context = (c != NULL) ? c : &dummyContext;
|
||||
}
|
||||
@@ -133,13 +133,13 @@ init_thread_data(void)
|
||||
}
|
||||
|
||||
_X_HIDDEN void
|
||||
__glXSetCurrentContext(__GLXcontext * c)
|
||||
__glXSetCurrentContext(struct glx_context * c)
|
||||
{
|
||||
pthread_once(&once_control, init_thread_data);
|
||||
pthread_setspecific(ContextTSD, c);
|
||||
}
|
||||
|
||||
_X_HIDDEN __GLXcontext *
|
||||
_X_HIDDEN struct glx_context *
|
||||
__glXGetCurrentContext(void)
|
||||
{
|
||||
void *v;
|
||||
@@ -147,7 +147,7 @@ __glXGetCurrentContext(void)
|
||||
pthread_once(&once_control, init_thread_data);
|
||||
|
||||
v = pthread_getspecific(ContextTSD);
|
||||
return (v == NULL) ? &dummyContext : (__GLXcontext *) v;
|
||||
return (v == NULL) ? &dummyContext : (struct glx_context *) v;
|
||||
}
|
||||
|
||||
# endif /* defined( GLX_USE_TLS ) */
|
||||
@@ -159,7 +159,7 @@ __glXGetCurrentContext(void)
|
||||
#else
|
||||
|
||||
/* not thread safe */
|
||||
_X_HIDDEN __GLXcontext *__glXcurrentContext = &dummyContext;
|
||||
_X_HIDDEN struct glx_context *__glXcurrentContext = &dummyContext;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -182,20 +182,20 @@ __glXSetCurrentContextNull(void)
|
||||
_X_EXPORT GLXContext
|
||||
glXGetCurrentContext(void)
|
||||
{
|
||||
GLXContext cx = __glXGetCurrentContext();
|
||||
struct glx_context *cx = __glXGetCurrentContext();
|
||||
|
||||
if (cx == &dummyContext) {
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
return cx;
|
||||
return (GLXContext) cx;
|
||||
}
|
||||
}
|
||||
|
||||
_X_EXPORT GLXDrawable
|
||||
glXGetCurrentDrawable(void)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
return gc->currentDrawable;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ SendMakeCurrentRequest(Display * dpy, CARD8 opcode,
|
||||
req->oldContextTag = gc_tag;
|
||||
}
|
||||
else {
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
struct glx_display *priv = __glXInitialize(dpy);
|
||||
|
||||
/* If the server can support the GLX 1.3 version, we should
|
||||
* perfer that. Not only that, some servers support GLX 1.3 but
|
||||
@@ -286,9 +286,10 @@ SendMakeCurrentRequest(Display * dpy, CARD8 opcode,
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
static __GLXDRIdrawable *
|
||||
FetchDRIDrawable(Display * dpy, GLXDrawable glxDrawable, GLXContext gc)
|
||||
FetchDRIDrawable(Display * dpy,
|
||||
GLXDrawable glxDrawable, struct glx_context *gc)
|
||||
{
|
||||
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
|
||||
struct glx_display *const priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw;
|
||||
struct glx_screen *psc;
|
||||
|
||||
@@ -314,7 +315,7 @@ FetchDRIDrawable(Display * dpy, GLXDrawable glxDrawable, GLXContext gc)
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
||||
static void
|
||||
__glXGenerateError(Display * dpy, GLXContext gc, XID resource,
|
||||
__glXGenerateError(Display * dpy, struct glx_context *gc, XID resource,
|
||||
BYTE errorCode, CARD16 minorCode)
|
||||
{
|
||||
xError error;
|
||||
@@ -337,9 +338,10 @@ __glXGenerateError(Display * dpy, GLXContext gc, XID resource,
|
||||
*/
|
||||
static Bool
|
||||
MakeContextCurrent(Display * dpy, GLXDrawable draw,
|
||||
GLXDrawable read, GLXContext gc)
|
||||
GLXDrawable read, GLXContext gc_user)
|
||||
{
|
||||
const GLXContext oldGC = __glXGetCurrentContext();
|
||||
struct glx_context *gc = (struct glx_context *) gc_user;
|
||||
struct glx_context *oldGC = __glXGetCurrentContext();
|
||||
#ifdef GLX_USE_APPLEGL
|
||||
bool error = apple_glx_make_current_context(dpy,
|
||||
(oldGC && oldGC != &dummyContext) ? oldGC->driContext : NULL,
|
||||
|
@@ -56,7 +56,7 @@
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
void __glXDumpDrawBuffer(__GLXcontext * ctx);
|
||||
void __glXDumpDrawBuffer(struct glx_context * ctx);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -68,7 +68,7 @@ _X_HIDDEN int __glXDebug = 0;
|
||||
/* Extension required boiler plate */
|
||||
|
||||
static const char __glXExtensionName[] = GLX_EXTENSION_NAME;
|
||||
static __GLXdisplayPrivate *glx_displays;
|
||||
static struct glx_display *glx_displays;
|
||||
|
||||
static /* const */ char *error_list[] = {
|
||||
"GLXBadContext",
|
||||
@@ -107,7 +107,7 @@ XEXT_GENERATE_ERROR_STRING(__glXErrorString, __glXExtensionName,
|
||||
static Bool
|
||||
__glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
|
||||
{
|
||||
__GLXdisplayPrivate *glx_dpy = __glXInitialize(dpy);
|
||||
struct glx_display *glx_dpy = __glXInitialize(dpy);
|
||||
|
||||
if (glx_dpy == NULL)
|
||||
return False;
|
||||
@@ -167,7 +167,7 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
|
||||
static Status
|
||||
__glXEventToWire(Display *dpy, XEvent *event, xEvent *wire)
|
||||
{
|
||||
__GLXdisplayPrivate *glx_dpy = __glXInitialize(dpy);
|
||||
struct glx_display *glx_dpy = __glXInitialize(dpy);
|
||||
|
||||
if (glx_dpy == NULL)
|
||||
return False;
|
||||
@@ -197,7 +197,7 @@ __glXEventToWire(Display *dpy, XEvent *event, xEvent *wire)
|
||||
** __glXScreenConfigs.
|
||||
*/
|
||||
static void
|
||||
FreeScreenConfigs(__GLXdisplayPrivate * priv)
|
||||
FreeScreenConfigs(struct glx_display * priv)
|
||||
{
|
||||
struct glx_screen *psc;
|
||||
GLint i, screens;
|
||||
@@ -239,8 +239,8 @@ FreeScreenConfigs(__GLXdisplayPrivate * priv)
|
||||
static int
|
||||
__glXCloseDisplay(Display * dpy, XExtCodes * codes)
|
||||
{
|
||||
__GLXdisplayPrivate *priv, **prev;
|
||||
GLXContext gc;
|
||||
struct glx_display *priv, **prev;
|
||||
struct glx_context *gc;
|
||||
|
||||
_XLockMutex(_Xglobal_lock);
|
||||
prev = &glx_displays;
|
||||
@@ -647,7 +647,7 @@ createConfigsFromProperties(Display * dpy, int nvisuals, int nprops,
|
||||
|
||||
static GLboolean
|
||||
getVisualConfigs(struct glx_screen *psc,
|
||||
__GLXdisplayPrivate *priv, int screen)
|
||||
struct glx_display *priv, int screen)
|
||||
{
|
||||
xGLXGetVisualConfigsReq *req;
|
||||
xGLXGetVisualConfigsReply reply;
|
||||
@@ -675,7 +675,7 @@ getVisualConfigs(struct glx_screen *psc,
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
getFBConfigs(struct glx_screen *psc, __GLXdisplayPrivate *priv, int screen)
|
||||
getFBConfigs(struct glx_screen *psc, struct glx_display *priv, int screen)
|
||||
{
|
||||
xGLXGetFBConfigsReq *fb_req;
|
||||
xGLXGetFBConfigsSGIXReq *sgi_req;
|
||||
@@ -723,7 +723,7 @@ getFBConfigs(struct glx_screen *psc, __GLXdisplayPrivate *priv, int screen)
|
||||
|
||||
_X_HIDDEN Bool
|
||||
glx_screen_init(struct glx_screen *psc,
|
||||
int screen, __GLXdisplayPrivate * priv)
|
||||
int screen, struct glx_display * priv)
|
||||
{
|
||||
/* Initialize per screen dynamic client GLX extensions */
|
||||
psc->ext_list_first_time = GL_TRUE;
|
||||
@@ -742,7 +742,7 @@ glx_screen_init(struct glx_screen *psc,
|
||||
** If that works then fetch the per screen configs data.
|
||||
*/
|
||||
static Bool
|
||||
AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv)
|
||||
AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv)
|
||||
{
|
||||
struct glx_screen *psc;
|
||||
GLint i, screens;
|
||||
@@ -783,10 +783,10 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv)
|
||||
/*
|
||||
** Initialize the client side extension code.
|
||||
*/
|
||||
_X_HIDDEN __GLXdisplayPrivate *
|
||||
_X_HIDDEN struct glx_display *
|
||||
__glXInitialize(Display * dpy)
|
||||
{
|
||||
__GLXdisplayPrivate *dpyPriv;
|
||||
struct glx_display *dpyPriv;
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
Bool glx_direct, glx_accel;
|
||||
#endif
|
||||
@@ -881,8 +881,8 @@ __glXInitialize(Display * dpy)
|
||||
_X_HIDDEN CARD8
|
||||
__glXSetupForCommand(Display * dpy)
|
||||
{
|
||||
GLXContext gc;
|
||||
__GLXdisplayPrivate *priv;
|
||||
struct glx_context *gc;
|
||||
struct glx_display *priv;
|
||||
|
||||
/* If this thread has a current context, flush its rendering commands */
|
||||
gc = __glXGetCurrentContext();
|
||||
@@ -921,7 +921,7 @@ __glXSetupForCommand(Display * dpy)
|
||||
* \c pc parameter.
|
||||
*/
|
||||
_X_HIDDEN GLubyte *
|
||||
__glXFlushRenderBuffer(__GLXcontext * ctx, GLubyte * pc)
|
||||
__glXFlushRenderBuffer(struct glx_context * ctx, GLubyte * pc)
|
||||
{
|
||||
Display *const dpy = ctx->currentDpy;
|
||||
#ifdef USE_XCB
|
||||
@@ -972,7 +972,7 @@ __glXFlushRenderBuffer(__GLXcontext * ctx, GLubyte * pc)
|
||||
* \param dataLen Size, in bytes, of the command data.
|
||||
*/
|
||||
_X_HIDDEN void
|
||||
__glXSendLargeChunk(__GLXcontext * gc, GLint requestNumber,
|
||||
__glXSendLargeChunk(struct glx_context * gc, GLint requestNumber,
|
||||
GLint totalRequests, const GLvoid * data, GLint dataLen)
|
||||
{
|
||||
Display *dpy = gc->currentDpy;
|
||||
@@ -1021,7 +1021,7 @@ __glXSendLargeChunk(__GLXcontext * gc, GLint requestNumber,
|
||||
* \param dataLen Size, in bytes, of the command data.
|
||||
*/
|
||||
_X_HIDDEN void
|
||||
__glXSendLargeCommand(__GLXcontext * ctx,
|
||||
__glXSendLargeCommand(struct glx_context * ctx,
|
||||
const GLvoid * header, GLint headerLen,
|
||||
const GLvoid * data, GLint dataLen)
|
||||
{
|
||||
@@ -1063,7 +1063,7 @@ __glXSendLargeCommand(__GLXcontext * ctx,
|
||||
|
||||
#ifdef DEBUG
|
||||
_X_HIDDEN void
|
||||
__glXDumpDrawBuffer(__GLXcontext * ctx)
|
||||
__glXDumpDrawBuffer(struct glx_context * ctx)
|
||||
{
|
||||
GLubyte *p = ctx->buf;
|
||||
GLubyte *end = ctx->pc;
|
||||
|
@@ -513,7 +513,7 @@ __glXExtensionBitIsEnabled(struct glx_screen * psc, unsigned bit)
|
||||
*
|
||||
*/
|
||||
GLboolean
|
||||
__glExtensionBitIsEnabled(const __GLXcontext * gc, unsigned bit)
|
||||
__glExtensionBitIsEnabled(struct glx_context *gc, unsigned bit)
|
||||
{
|
||||
GLboolean enabled = GL_FALSE;
|
||||
|
||||
@@ -675,7 +675,7 @@ __glXCalculateUsableExtensions(struct glx_screen * psc,
|
||||
*/
|
||||
|
||||
void
|
||||
__glXCalculateUsableGLExtensions(__GLXcontext * gc,
|
||||
__glXCalculateUsableGLExtensions(struct glx_context * gc,
|
||||
const char *server_string,
|
||||
int major_version, int minor_version)
|
||||
{
|
||||
|
@@ -235,7 +235,7 @@ enum
|
||||
#define __GL_EXT_BYTES ((__NUM_GL_EXTS + 7) / 8)
|
||||
|
||||
struct glx_screen;
|
||||
struct __GLXcontextRec;
|
||||
struct glx_context;
|
||||
|
||||
extern GLboolean __glXExtensionBitIsEnabled(struct glx_screen *psc,
|
||||
unsigned bit);
|
||||
@@ -245,14 +245,14 @@ extern void __glXCalculateUsableExtensions(struct glx_screen *psc,
|
||||
display_is_direct_capable,
|
||||
int server_minor_version);
|
||||
|
||||
extern void __glXCalculateUsableGLExtensions(struct __GLXcontextRec *gc,
|
||||
extern void __glXCalculateUsableGLExtensions(struct glx_context *gc,
|
||||
const char *server_string,
|
||||
int major_version,
|
||||
int minor_version);
|
||||
extern void __glXGetGLVersion(int *major_version, int *minor_version);
|
||||
extern char *__glXGetClientGLExtensionString(void);
|
||||
|
||||
extern GLboolean __glExtensionBitIsEnabled(const struct __GLXcontextRec *gc,
|
||||
extern GLboolean __glExtensionBitIsEnabled(struct glx_context *gc,
|
||||
unsigned bit);
|
||||
|
||||
extern void
|
||||
|
1000
src/glx/indirect.c
1000
src/glx/indirect.c
File diff suppressed because it is too large
Load Diff
@@ -59,15 +59,15 @@ extern HIDDEN NOINLINE CARD32 __glXReadReply( Display *dpy, size_t size,
|
||||
void * dest, GLboolean reply_is_always_array );
|
||||
|
||||
extern HIDDEN NOINLINE void __glXReadPixelReply( Display *dpy,
|
||||
__GLXcontext * gc, unsigned max_dim, GLint width, GLint height,
|
||||
struct glx_context * gc, unsigned max_dim, GLint width, GLint height,
|
||||
GLint depth, GLenum format, GLenum type, void * dest,
|
||||
GLboolean dimensions_in_reply );
|
||||
|
||||
extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupSingleRequest(
|
||||
__GLXcontext * gc, GLint sop, GLint cmdlen );
|
||||
struct glx_context * gc, GLint sop, GLint cmdlen );
|
||||
|
||||
extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest(
|
||||
__GLXcontext * gc, GLint code, GLint vop, GLint cmdlen );
|
||||
struct glx_context * gc, GLint code, GLint vop, GLint cmdlen );
|
||||
|
||||
extern HIDDEN void __indirect_glNewList(GLuint list, GLenum mode);
|
||||
extern HIDDEN void __indirect_glEndList(void);
|
||||
|
@@ -53,13 +53,13 @@ static int NoOp(void)
|
||||
* Create and initialize a new GL dispatch table. The table is initialized
|
||||
* with GLX indirect rendering protocol functions.
|
||||
*/
|
||||
__GLapi * __glXNewIndirectAPI( void )
|
||||
struct _glapi_table *__glXNewIndirectAPI( void )
|
||||
{
|
||||
__GLapi *glAPI;
|
||||
struct _glapi_table *glAPI;
|
||||
GLuint entries;
|
||||
|
||||
entries = _glapi_get_dispatch_table_size();
|
||||
glAPI = (__GLapi *) Xmalloc(entries * sizeof(void *));
|
||||
glAPI = (struct _glapi_table *) Xmalloc(entries * sizeof(void *));
|
||||
|
||||
/* first, set all entries to point to no-op functions */
|
||||
{
|
||||
|
@@ -36,6 +36,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include "glxclient.h"
|
||||
|
||||
extern __GLapi *__glXNewIndirectAPI(void);
|
||||
extern struct _glapi_table *__glXNewIndirectAPI(void);
|
||||
|
||||
#endif /* _INDIRECT_INIT_H_ */
|
||||
|
@@ -84,9 +84,9 @@ static struct array_state *get_array_entry(const struct array_state_vector
|
||||
*arrays, GLenum key,
|
||||
unsigned index);
|
||||
static void fill_array_info_cache(struct array_state_vector *arrays);
|
||||
static GLboolean validate_mode(__GLXcontext * gc, GLenum mode);
|
||||
static GLboolean validate_count(__GLXcontext * gc, GLsizei count);
|
||||
static GLboolean validate_type(__GLXcontext * gc, GLenum type);
|
||||
static GLboolean validate_mode(struct glx_context * gc, GLenum mode);
|
||||
static GLboolean validate_count(struct glx_context * gc, GLsizei count);
|
||||
static GLboolean validate_type(struct glx_context * gc, GLenum type);
|
||||
|
||||
|
||||
/**
|
||||
@@ -109,7 +109,7 @@ const GLuint __glXTypeSize_table[16] = {
|
||||
* __glXInitVertexArrayState().
|
||||
*/
|
||||
void
|
||||
__glXFreeVertexArrayState(__GLXcontext * gc)
|
||||
__glXFreeVertexArrayState(struct glx_context * gc)
|
||||
{
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -135,8 +135,8 @@ __glXFreeVertexArrayState(__GLXcontext * gc)
|
||||
* \param gc GLX context whose vertex array state is to be initialized.
|
||||
*
|
||||
* \warning
|
||||
* This function may only be called after __GLXcontext::gl_extension_bits,
|
||||
* __GLXcontext::server_minor, and __GLXcontext::server_major have been
|
||||
* This function may only be called after struct glx_context::gl_extension_bits,
|
||||
* struct glx_context::server_minor, and __GLXcontext::server_major have been
|
||||
* initialized. These values are used to determine what vertex arrays are
|
||||
* supported.
|
||||
*
|
||||
@@ -144,7 +144,7 @@ __glXFreeVertexArrayState(__GLXcontext * gc)
|
||||
* Return values from malloc are not properly tested.
|
||||
*/
|
||||
void
|
||||
__glXInitVertexArrayState(__GLXcontext * gc)
|
||||
__glXInitVertexArrayState(struct glx_context * gc)
|
||||
{
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays;
|
||||
@@ -487,7 +487,7 @@ fill_array_info_cache(struct array_state_vector *arrays)
|
||||
void
|
||||
emit_DrawArrays_none(GLenum mode, GLint first, GLsizei count)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -549,7 +549,7 @@ emit_DrawArrays_none(GLenum mode, GLint first, GLsizei count)
|
||||
* A pointer to the buffer for array data.
|
||||
*/
|
||||
static GLubyte *
|
||||
emit_DrawArrays_header_old(__GLXcontext * gc,
|
||||
emit_DrawArrays_header_old(struct glx_context * gc,
|
||||
struct array_state_vector *arrays,
|
||||
size_t * elements_per_request,
|
||||
unsigned int *total_requests,
|
||||
@@ -658,7 +658,7 @@ emit_DrawArrays_header_old(__GLXcontext * gc,
|
||||
void
|
||||
emit_DrawArrays_old(GLenum mode, GLint first, GLsizei count)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -720,7 +720,7 @@ void
|
||||
emit_DrawElements_none(GLenum mode, GLsizei count, GLenum type,
|
||||
const GLvoid * indices)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -787,7 +787,7 @@ void
|
||||
emit_DrawElements_old(GLenum mode, GLsizei count, GLenum type,
|
||||
const GLvoid * indices)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -875,7 +875,7 @@ emit_DrawElements_old(GLenum mode, GLsizei count, GLenum type,
|
||||
* \c GL_TRUE if the argument is valid, \c GL_FALSE if is not.
|
||||
*/
|
||||
static GLboolean
|
||||
validate_mode(__GLXcontext * gc, GLenum mode)
|
||||
validate_mode(struct glx_context * gc, GLenum mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case GL_POINTS:
|
||||
@@ -908,7 +908,7 @@ validate_mode(__GLXcontext * gc, GLenum mode)
|
||||
* \c GL_TRUE if the argument is valid, \c GL_FALSE if it is not.
|
||||
*/
|
||||
static GLboolean
|
||||
validate_count(__GLXcontext * gc, GLsizei count)
|
||||
validate_count(struct glx_context * gc, GLsizei count)
|
||||
{
|
||||
if (count < 0) {
|
||||
__glXSetError(gc, GL_INVALID_VALUE);
|
||||
@@ -927,7 +927,7 @@ validate_count(__GLXcontext * gc, GLsizei count)
|
||||
* \c GL_TRUE if the argument is valid, \c GL_FALSE if it is not.
|
||||
*/
|
||||
static GLboolean
|
||||
validate_type(__GLXcontext * gc, GLenum type)
|
||||
validate_type(struct glx_context * gc, GLenum type)
|
||||
{
|
||||
switch (type) {
|
||||
case GL_UNSIGNED_INT:
|
||||
@@ -944,7 +944,7 @@ validate_type(__GLXcontext * gc, GLenum type)
|
||||
void
|
||||
__indirect_glDrawArrays(GLenum mode, GLint first, GLsizei count)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -963,7 +963,7 @@ __indirect_glDrawArrays(GLenum mode, GLint first, GLsizei count)
|
||||
void
|
||||
__indirect_glArrayElement(GLint index)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -989,7 +989,7 @@ void
|
||||
__indirect_glDrawElements(GLenum mode, GLsizei count, GLenum type,
|
||||
const GLvoid * indices)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -1011,7 +1011,7 @@ __indirect_glDrawRangeElements(GLenum mode, GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
const GLvoid * indices)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -1037,7 +1037,7 @@ void
|
||||
__indirect_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count,
|
||||
GLsizei primcount)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -1063,7 +1063,7 @@ __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count,
|
||||
GLenum type, const GLvoid ** indices,
|
||||
GLsizei primcount)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
const __GLXattribute *state =
|
||||
(const __GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
@@ -1119,7 +1119,7 @@ __indirect_glVertexPointer(GLint size, GLenum type, GLsizei stride,
|
||||
0, 0, X_GLrop_Vertex2dv, X_GLrop_Vertex3dv, X_GLrop_Vertex4dv
|
||||
};
|
||||
uint16_t opcode;
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1164,7 +1164,7 @@ __indirect_glNormalPointer(GLenum type, GLsizei stride,
|
||||
const GLvoid * pointer)
|
||||
{
|
||||
uint16_t opcode;
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1235,7 +1235,7 @@ __indirect_glColorPointer(GLint size, GLenum type, GLsizei stride,
|
||||
0, 0, 0, X_GLrop_Color3dv, X_GLrop_Color4dv
|
||||
};
|
||||
uint16_t opcode;
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1290,7 +1290,7 @@ void
|
||||
__indirect_glIndexPointer(GLenum type, GLsizei stride, const GLvoid * pointer)
|
||||
{
|
||||
uint16_t opcode;
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1335,7 +1335,7 @@ __indirect_glIndexPointer(GLenum type, GLsizei stride, const GLvoid * pointer)
|
||||
void
|
||||
__indirect_glEdgeFlagPointer(GLsizei stride, const GLvoid * pointer)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1397,7 +1397,7 @@ __indirect_glTexCoordPointer(GLint size, GLenum type, GLsizei stride,
|
||||
};
|
||||
|
||||
uint16_t opcode;
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1470,7 +1470,7 @@ __indirect_glSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride,
|
||||
const GLvoid * pointer)
|
||||
{
|
||||
uint16_t opcode;
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1530,7 +1530,7 @@ __indirect_glFogCoordPointerEXT(GLenum type, GLsizei stride,
|
||||
const GLvoid * pointer)
|
||||
{
|
||||
uint16_t opcode;
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1577,7 +1577,7 @@ __indirect_glVertexAttribPointerARB(GLuint index, GLint size,
|
||||
static const uint16_t double_ops[5] = { 0, 4197, 4198, 4199, 4200 };
|
||||
|
||||
uint16_t opcode;
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *arrays = state->array_state;
|
||||
struct array_state *a;
|
||||
@@ -1690,7 +1690,7 @@ __indirect_glVertexAttribPointerNV(GLuint index, GLint size,
|
||||
GLenum type, GLsizei stride,
|
||||
const GLvoid * pointer)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
GLboolean normalized = GL_FALSE;
|
||||
|
||||
|
||||
@@ -1718,7 +1718,7 @@ __indirect_glVertexAttribPointerNV(GLuint index, GLint size,
|
||||
void
|
||||
__indirect_glClientActiveTextureARB(GLenum texture)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
__GLXattribute *const state =
|
||||
(__GLXattribute *) (gc->client_state_private);
|
||||
struct array_state_vector *const arrays = state->array_state;
|
||||
|
@@ -37,7 +37,7 @@
|
||||
static void
|
||||
do_vertex_attrib_enable(GLuint index, GLboolean val)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
|
||||
if (!__glXSetArrayEnable(state, GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB,
|
||||
@@ -65,7 +65,7 @@ static void
|
||||
get_parameter(unsigned opcode, unsigned size, GLenum target, GLuint index,
|
||||
void *params)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
Display *const dpy = gc->currentDpy;
|
||||
const GLuint cmdlen = 12;
|
||||
|
||||
@@ -122,7 +122,7 @@ void
|
||||
__indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname,
|
||||
GLvoid ** pointer)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
|
||||
if (pname != GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB) {
|
||||
@@ -177,7 +177,7 @@ get_attrib_array_data(__GLXattribute * state, GLuint index, GLenum cap,
|
||||
|
||||
|
||||
static void
|
||||
get_vertex_attrib(__GLXcontext * gc, unsigned vop,
|
||||
get_vertex_attrib(struct glx_context * gc, unsigned vop,
|
||||
GLuint index, GLenum pname, xReply * reply)
|
||||
{
|
||||
Display *const dpy = gc->currentDpy;
|
||||
@@ -195,7 +195,7 @@ get_vertex_attrib(__GLXcontext * gc, unsigned vop,
|
||||
void
|
||||
__indirect_glGetVertexAttribivARB(GLuint index, GLenum pname, GLint * params)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
Display *const dpy = gc->currentDpy;
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
xGLXSingleReply reply;
|
||||
@@ -229,7 +229,7 @@ void
|
||||
__indirect_glGetVertexAttribfvARB(GLuint index, GLenum pname,
|
||||
GLfloat * params)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
Display *const dpy = gc->currentDpy;
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
xGLXSingleReply reply;
|
||||
@@ -263,7 +263,7 @@ void
|
||||
__indirect_glGetVertexAttribdvARB(GLuint index, GLenum pname,
|
||||
GLdouble * params)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
Display *const dpy = gc->currentDpy;
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
xGLXSingleReply reply;
|
||||
|
@@ -54,7 +54,7 @@
|
||||
|
||||
/* Setup for all commands */
|
||||
#define __GLX_DECLARE_VARIABLES() \
|
||||
__GLXcontext *gc; \
|
||||
struct glx_context *gc; \
|
||||
GLubyte *pc, *pixelHeaderPC; \
|
||||
GLuint compsize, cmdlen
|
||||
|
||||
|
@@ -49,7 +49,7 @@
|
||||
|
||||
/* Declare common variables used during a single command */
|
||||
#define __GLX_SINGLE_DECLARE_VARIABLES() \
|
||||
__GLXcontext *gc = __glXGetCurrentContext(); \
|
||||
struct glx_context *gc = __glXGetCurrentContext(); \
|
||||
GLubyte *pc, *pixelHeaderPC; \
|
||||
GLuint compsize, cmdlen; \
|
||||
Display *dpy = gc->currentDpy; \
|
||||
|
@@ -80,7 +80,7 @@ static const GLubyte HighBitsMask[9] = {
|
||||
** set of pixel modes that are to be done by the server.
|
||||
*/
|
||||
static void
|
||||
FillBitmap(__GLXcontext * gc, GLint width, GLint height,
|
||||
FillBitmap(struct glx_context * gc, GLint width, GLint height,
|
||||
GLenum format, const GLvoid * userdata, GLubyte * destImage)
|
||||
{
|
||||
const __GLXattribute *state = gc->client_state_private;
|
||||
@@ -161,7 +161,7 @@ FillBitmap(__GLXcontext * gc, GLint width, GLint height,
|
||||
** ALIGNMENT = 1.
|
||||
*/
|
||||
void
|
||||
__glFillImage(__GLXcontext * gc, GLint dim, GLint width, GLint height,
|
||||
__glFillImage(struct glx_context * gc, GLint dim, GLint width, GLint height,
|
||||
GLint depth, GLenum format, GLenum type,
|
||||
const GLvoid * userdata, GLubyte * newimage, GLubyte * modes)
|
||||
{
|
||||
@@ -268,7 +268,7 @@ __glFillImage(__GLXcontext * gc, GLint dim, GLint width, GLint height,
|
||||
** into the clients memory using the pixel store PACK modes.
|
||||
*/
|
||||
static void
|
||||
EmptyBitmap(__GLXcontext * gc, GLint width, GLint height,
|
||||
EmptyBitmap(struct glx_context * gc, GLint width, GLint height,
|
||||
GLenum format, const GLubyte * sourceImage, GLvoid * userdata)
|
||||
{
|
||||
const __GLXattribute *state = gc->client_state_private;
|
||||
@@ -388,7 +388,7 @@ EmptyBitmap(__GLXcontext * gc, GLint width, GLint height,
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
void
|
||||
__glEmptyImage(__GLXcontext * gc, GLint dim, GLint width, GLint height,
|
||||
__glEmptyImage(struct glx_context * gc, GLint dim, GLint width, GLint height,
|
||||
GLint depth, GLenum format, GLenum type,
|
||||
const GLubyte * sourceImage, GLvoid * userdata)
|
||||
{
|
||||
|
@@ -46,7 +46,7 @@
|
||||
* \sa __indirect_glPixelStorei, __indirect_glPixelStoref
|
||||
*/
|
||||
static void
|
||||
send_PixelStore(__GLXcontext * gc, unsigned sop, GLenum pname,
|
||||
send_PixelStore(struct glx_context * gc, unsigned sop, GLenum pname,
|
||||
const void *param)
|
||||
{
|
||||
Display *const dpy = gc->currentDpy;
|
||||
@@ -67,7 +67,7 @@ send_PixelStore(__GLXcontext * gc, unsigned sop, GLenum pname,
|
||||
void
|
||||
__indirect_glPixelStoref(GLenum pname, GLfloat param)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = gc->client_state_private;
|
||||
Display *dpy = gc->currentDpy;
|
||||
GLuint a;
|
||||
@@ -217,7 +217,7 @@ __indirect_glPixelStoref(GLenum pname, GLfloat param)
|
||||
void
|
||||
__indirect_glPixelStorei(GLenum pname, GLint param)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = gc->client_state_private;
|
||||
Display *dpy = gc->currentDpy;
|
||||
|
||||
|
@@ -82,7 +82,7 @@
|
||||
* broken.
|
||||
*/
|
||||
void
|
||||
__glXSendLargeImage(__GLXcontext * gc, GLint compsize, GLint dim,
|
||||
__glXSendLargeImage(struct glx_context * gc, GLint compsize, GLint dim,
|
||||
GLint width, GLint height, GLint depth,
|
||||
GLenum format, GLenum type, const GLvoid * src,
|
||||
GLubyte * pc, GLubyte * modes)
|
||||
|
@@ -156,7 +156,7 @@ __indirect_glGetError(void)
|
||||
* On success \c GL_TRUE is returned. Otherwise, \c GL_FALSE is returned.
|
||||
*/
|
||||
static GLboolean
|
||||
get_client_data(__GLXcontext * gc, GLenum cap, GLintptr * data)
|
||||
get_client_data(struct glx_context * gc, GLenum cap, GLintptr * data)
|
||||
{
|
||||
GLboolean retval = GL_TRUE;
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
@@ -646,7 +646,7 @@ version_from_string(const char *ver, int *major_version, int *minor_version)
|
||||
const GLubyte *
|
||||
__indirect_glGetString(GLenum name)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
Display *dpy = gc->currentDpy;
|
||||
GLubyte *s = NULL;
|
||||
|
||||
@@ -837,7 +837,7 @@ __indirect_glIsEnabled(GLenum cap)
|
||||
void
|
||||
__indirect_glGetPointerv(GLenum pname, void **params)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
Display *dpy = gc->currentDpy;
|
||||
|
||||
@@ -885,7 +885,7 @@ GLboolean
|
||||
__indirect_glAreTexturesResident(GLsizei n, const GLuint * textures,
|
||||
GLboolean * residences)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
Display *const dpy = gc->currentDpy;
|
||||
GLboolean retval = (GLboolean) 0;
|
||||
const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
|
||||
@@ -941,14 +941,14 @@ GLboolean
|
||||
glAreTexturesResidentEXT(GLsizei n, const GLuint * textures,
|
||||
GLboolean * residences)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
|
||||
if (gc->isDirect) {
|
||||
return CALL_AreTexturesResident(GET_DISPATCH(),
|
||||
(n, textures, residences));
|
||||
}
|
||||
else {
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
Display *const dpy = gc->currentDpy;
|
||||
GLboolean retval = (GLboolean) 0;
|
||||
const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
|
||||
|
@@ -117,7 +117,7 @@ void NAME(_gloffset_GetSeparableFilter) (GLenum target, GLenum format,
|
||||
GLenum type, GLvoid * row,
|
||||
GLvoid * column, GLvoid * span)
|
||||
{
|
||||
__GLXcontext *const gc = __glXGetCurrentContext();
|
||||
struct glx_context *const gc = __glXGetCurrentContext();
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
if (gc->driContext) {
|
||||
|
@@ -101,7 +101,7 @@ void
|
||||
__indirect_glInterleavedArrays(GLenum format, GLsizei stride,
|
||||
const GLvoid * pointer)
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
|
||||
|
||||
#define NONE {0, 0, 0}
|
||||
|
@@ -212,7 +212,7 @@ isvalid(XFontStruct * fs, int which)
|
||||
}
|
||||
|
||||
_X_HIDDEN void
|
||||
DRI_glXUseXFont(GLXContext CC, Font font, int first, int count, int listbase)
|
||||
DRI_glXUseXFont(struct glx_context *CC, Font font, int first, int count, int listbase)
|
||||
{
|
||||
Display *dpy;
|
||||
Window win;
|
||||
|
@@ -384,9 +384,9 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
|
||||
print ' int error;'
|
||||
|
||||
if self.do_swap:
|
||||
print ' __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);'
|
||||
print ' struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);'
|
||||
else:
|
||||
print ' __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);'
|
||||
print ' struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);'
|
||||
|
||||
print ''
|
||||
if name not in f.glx_vendorpriv_names:
|
||||
|
@@ -220,7 +220,7 @@ __glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_alway
|
||||
}
|
||||
|
||||
NOINLINE void
|
||||
__glXReadPixelReply( Display *dpy, __GLXcontext * gc, unsigned max_dim,
|
||||
__glXReadPixelReply( Display *dpy, struct glx_context * gc, unsigned max_dim,
|
||||
GLint width, GLint height, GLint depth, GLenum format, GLenum type,
|
||||
void * dest, GLboolean dimensions_in_reply )
|
||||
{
|
||||
@@ -264,7 +264,7 @@ __glXReadPixelReply( Display *dpy, __GLXcontext * gc, unsigned max_dim,
|
||||
#define X_GLXSingle 0
|
||||
|
||||
NOINLINE FASTCALL GLubyte *
|
||||
__glXSetupSingleRequest( __GLXcontext * gc, GLint sop, GLint cmdlen )
|
||||
__glXSetupSingleRequest( struct glx_context * gc, GLint sop, GLint cmdlen )
|
||||
{
|
||||
xGLXSingleReq * req;
|
||||
Display * const dpy = gc->currentDpy;
|
||||
@@ -279,7 +279,7 @@ __glXSetupSingleRequest( __GLXcontext * gc, GLint sop, GLint cmdlen )
|
||||
}
|
||||
|
||||
NOINLINE FASTCALL GLubyte *
|
||||
__glXSetupVendorRequest( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen )
|
||||
__glXSetupVendorRequest( struct glx_context * gc, GLint code, GLint vop, GLint cmdlen )
|
||||
{
|
||||
xGLXVendorPrivateReq * req;
|
||||
Display * const dpy = gc->currentDpy;
|
||||
@@ -371,7 +371,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
|
||||
print '#define %s %d' % (func.opcode_vendor_name(name), func.glx_vendorpriv)
|
||||
print '%s gl%s(%s)' % (func.return_type, func_name, func.get_parameter_string())
|
||||
print '{'
|
||||
print ' __GLXcontext * const gc = __glXGetCurrentContext();'
|
||||
print ' struct glx_context * const gc = __glXGetCurrentContext();'
|
||||
print ''
|
||||
print '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)'
|
||||
print ' if (gc->driContext) {'
|
||||
@@ -408,7 +408,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
|
||||
print """static FASTCALL NOINLINE void
|
||||
generic_%u_byte( GLint rop, const void * ptr )
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
struct glx_context * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = %u;
|
||||
|
||||
emit_header(gc->pc, rop, cmdlen);
|
||||
@@ -523,7 +523,7 @@ generic_%u_byte( GLint rop, const void * ptr )
|
||||
|
||||
|
||||
def common_func_print_just_start(self, f, name):
|
||||
print ' __GLXcontext * const gc = __glXGetCurrentContext();'
|
||||
print ' struct glx_context * const gc = __glXGetCurrentContext();'
|
||||
|
||||
# The only reason that single and vendor private commands need
|
||||
# a variable called 'dpy' is becuase they use the SyncHandle
|
||||
@@ -971,15 +971,15 @@ extern HIDDEN NOINLINE CARD32 __glXReadReply( Display *dpy, size_t size,
|
||||
void * dest, GLboolean reply_is_always_array );
|
||||
|
||||
extern HIDDEN NOINLINE void __glXReadPixelReply( Display *dpy,
|
||||
__GLXcontext * gc, unsigned max_dim, GLint width, GLint height,
|
||||
struct glx_context * gc, unsigned max_dim, GLint width, GLint height,
|
||||
GLint depth, GLenum format, GLenum type, void * dest,
|
||||
GLboolean dimensions_in_reply );
|
||||
|
||||
extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupSingleRequest(
|
||||
__GLXcontext * gc, GLint sop, GLint cmdlen );
|
||||
struct glx_context * gc, GLint sop, GLint cmdlen );
|
||||
|
||||
extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest(
|
||||
__GLXcontext * gc, GLint code, GLint vop, GLint cmdlen );
|
||||
struct glx_context * gc, GLint code, GLint vop, GLint cmdlen );
|
||||
"""
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user