#undef DRI2_MINOR
#define DRI2_MINOR 1
-typedef struct __GLXDRIdisplayPrivateRec __GLXDRIdisplayPrivate;
-typedef struct __GLXDRIcontextPrivateRec __GLXDRIcontextPrivate;
-typedef struct __GLXDRIdrawablePrivateRec __GLXDRIdrawablePrivate;
-
-struct __GLXDRIdisplayPrivateRec
+struct dri2_display
{
__GLXDRIdisplay base;
const __DRIextension *loader_extensions[4];
};
-struct __GLXDRIcontextPrivateRec
+struct dri2_context
{
__GLXDRIcontext base;
__DRIcontext *driContext;
__GLXscreenConfigs *psc;
};
-struct __GLXDRIdrawablePrivateRec
+struct dri2_drawable
{
__GLXDRIdrawable base;
__DRIbuffer buffers[5];
dri2DestroyContext(__GLXDRIcontext * context,
__GLXscreenConfigs * psc, Display * dpy)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct dri2_context *pcp = (struct dri2_context *) context;
const __DRIcoreExtension *core = pcp->psc->core;
(*core->destroyContext) (pcp->driContext);
dri2BindContext(__GLXDRIcontext * context,
__GLXDRIdrawable * draw, __GLXDRIdrawable * read)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct dri2_context *pcp = (struct dri2_context *) context;
const __DRIcoreExtension *core = pcp->psc->core;
return (*core->bindContext) (pcp->driContext,
static void
dri2UnbindContext(__GLXDRIcontext * context)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct dri2_context *pcp = (struct dri2_context *) context;
const __DRIcoreExtension *core = pcp->psc->core;
(*core->unbindContext) (pcp->driContext);
const __GLcontextModes * mode,
GLXContext gc, GLXContext shareList, int renderType)
{
- __GLXDRIcontextPrivate *pcp, *pcp_shared;
+ struct dri2_context *pcp, *pcp_shared;
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode;
__DRIcontext *shared = NULL;
if (shareList) {
- pcp_shared = (__GLXDRIcontextPrivate *) shareList->driContext;
+ pcp_shared = (struct dri2_context *) shareList->driContext;
shared = pcp_shared->driContext;
}
{
const __DRIcoreExtension *core = pdraw->psc->core;
__GLXdisplayPrivate *dpyPriv;
- __GLXDRIdisplayPrivate *pdp;
+ struct dri2_display *pdp;
dpyPriv = __glXInitialize(pdraw->psc->dpy);
- pdp = (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display;
+ pdp = (struct dri2_display *)dpyPriv->dri2Display;
__glxHashDelete(pdp->dri2Hash, pdraw->xDrawable);
(*core->destroyDrawable) (pdraw->driDrawable);
XID xDrawable,
GLXDrawable drawable, const __GLcontextModes * modes)
{
- __GLXDRIdrawablePrivate *pdraw;
+ struct dri2_drawable *pdraw;
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) modes;
__GLXdisplayPrivate *dpyPriv;
- __GLXDRIdisplayPrivate *pdp;
+ struct dri2_display *pdp;
GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1;
pdraw = Xmalloc(sizeof(*pdraw));
DRI2CreateDrawable(psc->dpy, xDrawable);
dpyPriv = __glXInitialize(psc->dpy);
- pdp = (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display;;
+ pdp = (struct dri2_display *)dpyPriv->dri2Display;;
/* Create a new drawable */
pdraw->base.driDrawable =
(*psc->dri2->createNewDrawable) (psc->__driScreen,
static void
dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y, int width, int height)
{
- __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;
+ struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
XRectangle xrect;
XserverRegion region;
}
static void
-dri2_copy_drawable(__GLXDRIdrawablePrivate *priv, int dest, int src)
+dri2_copy_drawable(struct dri2_drawable *priv, int dest, int src)
{
XRectangle xrect;
XserverRegion region;
static void
dri2WaitX(__GLXDRIdrawable *pdraw)
{
- __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;
+ struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
if (!priv->have_fake_front)
return;
static void
dri2WaitGL(__GLXDRIdrawable * pdraw)
{
- __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;
+ struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
if (!priv->have_fake_front)
return;
static void
dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
{
- __GLXDRIdrawablePrivate *pdraw = loaderPrivate;
+ struct dri2_drawable *pdraw = loaderPrivate;
__GLXdisplayPrivate *priv = __glXInitialize(pdraw->base.psc->dpy);
- __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *)priv->dri2Display;
+ struct dri2_display *pdp = (struct dri2_display *)priv->dri2Display;
/* Old servers don't send invalidate events */
if (!pdp->invalidateAvailable)
* \c DRI2GetBuffers or \c DRI2GetBuffersWithFormat.
*/
static void
-process_buffers(__GLXDRIdrawablePrivate * pdraw, DRI2Buffer * buffers,
+process_buffers(struct dri2_drawable * pdraw, DRI2Buffer * buffers,
unsigned count)
{
int i;
dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
int64_t remainder)
{
- __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;
+ struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
__GLXdisplayPrivate *dpyPriv = __glXInitialize(priv->base.psc->dpy);
- __GLXDRIdisplayPrivate *pdp =
- (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display;
+ struct dri2_display *pdp =
+ (struct dri2_display *)dpyPriv->dri2Display;
int64_t ret;
#ifdef __DRI2_FLUSH
unsigned int *attachments, int count,
int *out_count, void *loaderPrivate)
{
- __GLXDRIdrawablePrivate *pdraw = loaderPrivate;
+ struct dri2_drawable *pdraw = loaderPrivate;
DRI2Buffer *buffers;
buffers = DRI2GetBuffers(pdraw->base.psc->dpy, pdraw->base.xDrawable,
unsigned int *attachments, int count,
int *out_count, void *loaderPrivate)
{
- __GLXDRIdrawablePrivate *pdraw = loaderPrivate;
+ struct dri2_drawable *pdraw = loaderPrivate;
DRI2Buffer *buffers;
buffers = DRI2GetBuffersWithFormat(pdraw->base.psc->dpy,
dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
{
__GLXscreenConfigs *psc = pdraw->psc;
- __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;
+ struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1;
if (psc->config)
static unsigned int
dri2GetSwapInterval(__GLXDRIdrawable *pdraw)
{
- __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;
+ struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
return priv->swap_interval;
}
GLXContext gc = __glXGetCurrentContext();
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL);
__GLXdisplayPrivate *dpyPriv = __glXInitialize(dpy);
- __GLXDRIdisplayPrivate *pdp =
- (__GLXDRIdisplayPrivate *) dpyPriv->dri2Display;
+ struct dri2_display *pdp =
+ (struct dri2_display *) dpyPriv->dri2Display;
if (pdraw != NULL) {
{
const __DRIconfig **driver_configs;
const __DRIextension **extensions;
- const __GLXDRIdisplayPrivate *const pdp = (__GLXDRIdisplayPrivate *)
+ const struct dri2_display *const pdp = (struct dri2_display *)
priv->dri2Display;
__GLXDRIscreen *psp;
char *driverName, *deviceName;
dri2GetGlxDrawableFromXDrawableId(Display *dpy, XID id)
{
__GLXdisplayPrivate *d = __glXInitialize(dpy);
- __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *) d->dri2Display;
+ struct dri2_display *pdp = (struct dri2_display *) d->dri2Display;
__GLXDRIdrawable *pdraw;
if (__glxHashLookup(pdp->dri2Hash, id, (void *) &pdraw) == 0)
_X_HIDDEN __GLXDRIdisplay *
dri2CreateDisplay(Display * dpy)
{
- __GLXDRIdisplayPrivate *pdp;
+ struct dri2_display *pdp;
int eventBase, errorBase, i;
if (!DRI2QueryExtension(dpy, &eventBase, &errorBase))
#include "xf86drm.h"
#include "dri_common.h"
-typedef struct __GLXDRIdisplayPrivateRec __GLXDRIdisplayPrivate;
-typedef struct __GLXDRIcontextPrivateRec __GLXDRIcontextPrivate;
-
-struct __GLXDRIdisplayPrivateRec
+struct dri_display
{
__GLXDRIdisplay base;
int driPatch;
};
-struct __GLXDRIcontextPrivateRec
+struct dri_context
{
__GLXDRIcontext base;
__DRIcontext *driContext;
*/
static void *
CallCreateNewScreen(Display * dpy, int scrn, __GLXscreenConfigs * psc,
- __GLXDRIdisplayPrivate * driDpy)
+ struct dri_display * driDpy)
{
void *psp = NULL;
drm_handle_t hSAREA;
driDestroyContext(__GLXDRIcontext * context,
__GLXscreenConfigs * psc, Display * dpy)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct dri_context *pcp = (struct dri_context *) context;
(*psc->core->destroyContext) (pcp->driContext);
driBindContext(__GLXDRIcontext * context,
__GLXDRIdrawable * draw, __GLXDRIdrawable * read)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct dri_context *pcp = (struct dri_context *) context;
const __DRIcoreExtension *core = pcp->psc->core;
return (*core->bindContext) (pcp->driContext,
static void
driUnbindContext(__GLXDRIcontext * context)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct dri_context *pcp = (struct dri_context *) context;
const __DRIcoreExtension *core = pcp->psc->core;
(*core->unbindContext) (pcp->driContext);
const __GLcontextModes * mode,
GLXContext gc, GLXContext shareList, int renderType)
{
- __GLXDRIcontextPrivate *pcp, *pcp_shared;
+ struct dri_context *pcp, *pcp_shared;
drm_context_t hwContext;
__DRIcontext *shared = NULL;
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode;
return NULL;
if (shareList) {
- pcp_shared = (__GLXDRIcontextPrivate *) shareList->driContext;
+ pcp_shared = (struct dri_context *) shareList->driContext;
shared = pcp_shared->driContext;
}
driCreateScreen(__GLXscreenConfigs * psc, int screen,
__GLXdisplayPrivate * priv)
{
- __GLXDRIdisplayPrivate *pdp;
+ struct dri_display *pdp;
__GLXDRIscreen *psp;
const __DRIextension **extensions;
char *driverName;
return NULL;
}
- pdp = (__GLXDRIdisplayPrivate *) priv->driDisplay;
+ pdp = (struct dri_display *) priv->driDisplay;
psc->__driScreen = CallCreateNewScreen(psc->dpy, screen, psc, pdp);
if (psc->__driScreen == NULL) {
dlclose(psc->driver);
_X_HIDDEN __GLXDRIdisplay *
driCreateDisplay(Display * dpy)
{
- __GLXDRIdisplayPrivate *pdpyp;
+ struct dri_display *pdpyp;
int eventBase, errorBase;
int major, minor, patch;
#include <dlfcn.h>
#include "dri_common.h"
-typedef struct __GLXDRIdisplayPrivateRec __GLXDRIdisplayPrivate;
-typedef struct __GLXDRIcontextPrivateRec __GLXDRIcontextPrivate;
-typedef struct __GLXDRIdrawablePrivateRec __GLXDRIdrawablePrivate;
-
-struct __GLXDRIdisplayPrivateRec
+struct drisw_display
{
__GLXDRIdisplay base;
};
-struct __GLXDRIcontextPrivateRec
+struct drisw_context
{
__GLXDRIcontext base;
__DRIcontext *driContext;
__GLXscreenConfigs *psc;
};
-struct __GLXDRIdrawablePrivateRec
+struct drisw_drawable
{
__GLXDRIdrawable base;
};
static Bool
-XCreateDrawable(__GLXDRIdrawablePrivate * pdp,
+XCreateDrawable(struct drisw_drawable * pdp,
Display * dpy, XID drawable, int visualid)
{
XGCValues gcvalues;
}
static void
-XDestroyDrawable(__GLXDRIdrawablePrivate * pdp, Display * dpy, XID drawable)
+XDestroyDrawable(struct drisw_drawable * pdp, Display * dpy, XID drawable)
{
XDestroyImage(pdp->ximage);
XFree(pdp->visinfo);
int *x, int *y, int *w, int *h,
void *loaderPrivate)
{
- __GLXDRIdrawablePrivate *pdp = loaderPrivate;
+ struct drisw_drawable *pdp = loaderPrivate;
__GLXDRIdrawable *pdraw = &(pdp->base);
Display *dpy = pdraw->psc->dpy;
Drawable drawable;
int x, int y, int w, int h,
char *data, void *loaderPrivate)
{
- __GLXDRIdrawablePrivate *pdp = loaderPrivate;
+ struct drisw_drawable *pdp = loaderPrivate;
__GLXDRIdrawable *pdraw = &(pdp->base);
Display *dpy = pdraw->psc->dpy;
Drawable drawable;
int x, int y, int w, int h,
char *data, void *loaderPrivate)
{
- __GLXDRIdrawablePrivate *prp = loaderPrivate;
+ struct drisw_drawable *prp = loaderPrivate;
__GLXDRIdrawable *pread = &(prp->base);
Display *dpy = pread->psc->dpy;
Drawable readable;
driDestroyContext(__GLXDRIcontext * context,
__GLXscreenConfigs * psc, Display * dpy)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct drisw_context *pcp = (struct drisw_context *) context;
const __DRIcoreExtension *core = pcp->psc->core;
(*core->destroyContext) (pcp->driContext);
driBindContext(__GLXDRIcontext * context,
__GLXDRIdrawable * draw, __GLXDRIdrawable * read)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct drisw_context *pcp = (struct drisw_context *) context;
const __DRIcoreExtension *core = pcp->psc->core;
return (*core->bindContext) (pcp->driContext,
static void
driUnbindContext(__GLXDRIcontext * context)
{
- __GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
+ struct drisw_context *pcp = (struct drisw_context *) context;
const __DRIcoreExtension *core = pcp->psc->core;
(*core->unbindContext) (pcp->driContext);
const __GLcontextModes * mode,
GLXContext gc, GLXContext shareList, int renderType)
{
- __GLXDRIcontextPrivate *pcp, *pcp_shared;
+ struct drisw_context *pcp, *pcp_shared;
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode;
const __DRIcoreExtension *core;
__DRIcontext *shared = NULL;
core = psc->core;
if (shareList) {
- pcp_shared = (__GLXDRIcontextPrivate *) shareList->driContext;
+ pcp_shared = (struct drisw_context *) shareList->driContext;
shared = pcp_shared->driContext;
}
static void
driDestroyDrawable(__GLXDRIdrawable * pdraw)
{
- __GLXDRIdrawablePrivate *pdp = (__GLXDRIdrawablePrivate *) pdraw;
+ struct drisw_drawable *pdp = (struct drisw_drawable *) pdraw;
const __DRIcoreExtension *core = pdraw->psc->core;
(*core->destroyDrawable) (pdraw->driDrawable);
GLXDrawable drawable, const __GLcontextModes * modes)
{
__GLXDRIdrawable *pdraw;
- __GLXDRIdrawablePrivate *pdp;
+ struct drisw_drawable *pdp;
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) modes;
const __DRIswrastExtension *swrast = psc->swrast;
_X_HIDDEN __GLXDRIdisplay *
driswCreateDisplay(Display * dpy)
{
- __GLXDRIdisplayPrivate *pdpyp;
+ struct drisw_display *pdpyp;
pdpyp = Xmalloc(sizeof *pdpyp);
if (pdpyp == NULL)