__DRIdrawable * dPriv,
const struct gl_config * visual, boolean isPixmap)
{
- struct dri_screen *screen = sPriv->private;
+ struct dri_screen *screen = sPriv->driverPrivate;
struct dri_drawable *drawable = NULL;
if (isPixmap)
dri_destroy_screen_helper(screen);
FREE(screen);
- sPriv->private = NULL;
+ sPriv->driverPrivate = NULL;
sPriv->extensions = NULL;
}
static INLINE struct dri_screen *
dri_screen(__DRIscreen * sPriv)
{
- return (struct dri_screen *)sPriv->private;
+ return (struct dri_screen *)sPriv->driverPrivate;
}
struct __DRIimageRec {
screen->sPriv = sPriv;
screen->fd = sPriv->fd;
- sPriv->private = (void *)screen;
+ sPriv->driverPrivate = (void *)screen;
pscreen = driver_descriptor.create_screen(screen->fd);
if (driver_descriptor.configuration)
swrast_no_present = debug_get_option_swrast_no_present();
- sPriv->private = (void *)screen;
+ sPriv->driverPrivate = (void *)screen;
sPriv->extensions = drisw_screen_extensions;
pscreen = drisw_create_screen(&drisw_lf);
*/
static int driUnbindContext(__DRIcontext *pcp)
{
- __DRIscreen *psp;
__DRIdrawable *pdp;
__DRIdrawable *prp;
if (pcp == NULL)
return GL_FALSE;
- psp = pcp->driScreenPriv;
pdp = pcp->driDrawablePriv;
prp = pcp->driReadablePriv;
if (!pdp && !prp)
return GL_TRUE;
/* Let driver unbind drawable from context */
- (*psp->DriverAPI.UnbindContext)(pcp);
+ driDriverAPI.UnbindContext(pcp);
assert(pdp);
if (pdp->refcount == 0) {
__DRIdrawable *pdp,
__DRIdrawable *prp)
{
- __DRIscreen *psp = NULL;
-
/*
** Assume error checking is done properly in glXMakeCurrent before
** calling driUnbindContext.
return GL_FALSE;
/* Bind the drawable to the context */
- psp = pcp->driScreenPriv;
pcp->driDrawablePriv = pdp;
pcp->driReadablePriv = prp;
if (pdp) {
}
/* Call device-specific MakeCurrent */
- return (*psp->DriverAPI.MakeCurrent)(pcp, pdp, prp);
+ return driDriverAPI.MakeCurrent(pcp, pdp, prp);
}
static __DRIdrawable *
pdraw->h = 0;
pdraw->driScreenPriv = screen;
- if (!(*screen->DriverAPI.CreateBuffer)(screen, pdraw, &config->modes, 0)) {
+ if (!driDriverAPI.CreateBuffer(screen, pdraw, &config->modes, 0)) {
free(pdraw);
return NULL;
}
unsigned int attachment, unsigned int format,
int width, int height)
{
- return (*screen->DriverAPI.AllocateBuffer)(screen, attachment, format,
- width, height);
+ return driDriverAPI.AllocateBuffer(screen, attachment, format,
+ width, height);
}
static void
dri2ReleaseBuffer(__DRIscreen *screen, __DRIbuffer *buffer)
{
- (*screen->DriverAPI.ReleaseBuffer)(screen, buffer);
+ driDriverAPI.ReleaseBuffer(screen, buffer);
}
return;
psp = pdp->driScreenPriv;
- (*psp->DriverAPI.DestroyBuffer)(pdp);
+ driDriverAPI.DestroyBuffer(pdp);
free(pdp);
}
}
driDestroyContext(__DRIcontext *pcp)
{
if (pcp) {
- (*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp);
+ driDriverAPI.DestroyContext(pcp);
free(pcp);
}
}
context->driDrawablePriv = NULL;
context->loaderPrivate = data;
- if (!(*screen->DriverAPI.CreateContext)(mesa_api, modes,
- context, shareCtx) ) {
+ if (!driDriverAPI.CreateContext(mesa_api, modes,
+ context, shareCtx) ) {
free(context);
return NULL;
}
_mesa_destroy_shader_compiler();
- if (psp->DriverAPI.DestroyScreen)
- (*psp->DriverAPI.DestroyScreen)(psp);
+ if (driDriverAPI.DestroyScreen)
+ driDriverAPI.DestroyScreen(psp);
driDestroyOptionCache(&psp->optionCache);
driDestroyOptionInfo(&psp->optionInfo);
psp->fd = fd;
psp->myNum = scrn;
- psp->DriverAPI = driDriverAPI;
psp->api_mask = (1 << __DRI_API_OPENGL);
*driver_configs = driDriverAPI.InitScreen(psp);
if (*driver_configs == NULL) {
return NULL;
}
- psp->DriverAPI = driDriverAPI;
psp->loaderPrivate = data;
driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions,
*/
int myNum;
- /**
- * Callback functions into the hardware-specific DRI driver code.
- */
- struct __DriverAPIRec DriverAPI;
-
- const __DRIextension **extensions;
-
- /**
- * DRM (kernel module) version information.
- */
- __DRIversion drm_version;
-
/**
* File descriptor returned when the kernel device driver is opened.
*
*/
int fd;
+ /**
+ * DRM (kernel module) version information.
+ */
+ __DRIversion drm_version;
+
/**
* Device-dependent private information (not stored in the SAREA).
*
* This pointer is never touched by the DRI layer.
*/
-#ifdef __cplusplus
- void *priv;
-#else
- void *private;
-#endif
+ void *driverPrivate;
+
+ void *loaderPrivate;
+
+ const __DRIextension **extensions;
+
+ const __DRIswrastLoaderExtension *swrast_loader;
struct {
/* Flag to indicate that this is a DRI2 screen. Many of the above
driOptionCache optionInfo;
driOptionCache optionCache;
- unsigned int api_mask;
- void *loaderPrivate;
+
+ unsigned int api_mask;
};
extern void
int fd;
- void *private;
+ void *driverPrivate;
const __DRIextension **extensions;
struct gl_context *ctx = &intel->ctx;
struct gl_context *shareCtx = (struct gl_context *) sharedContextPrivate;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
- struct intel_screen *intelScreen = sPriv->private;
+ struct intel_screen *intelScreen = sPriv->driverPrivate;
int bo_reuse_mode;
struct gl_config visual;
int width, int height, int format,
int name, int pitch, void *loaderPrivate)
{
- struct intel_screen *intelScreen = screen->private;
+ struct intel_screen *intelScreen = screen->driverPrivate;
__DRIimage *image;
int cpp;
void *loaderPrivate)
{
__DRIimage *image;
- struct intel_screen *intelScreen = screen->private;
+ struct intel_screen *intelScreen = screen->driverPrivate;
uint32_t tiling;
int cpp;
static void
intelDestroyScreen(__DRIscreen * sPriv)
{
- struct intel_screen *intelScreen = sPriv->private;
+ struct intel_screen *intelScreen = sPriv->driverPrivate;
dri_bufmgr_destroy(intelScreen->bufmgr);
driDestroyOptionInfo(&intelScreen->optionCache);
_mesa_DeleteHashTable(intelScreen->named_regions);
FREE(intelScreen);
- sPriv->private = NULL;
+ sPriv->driverPrivate = NULL;
}
const struct gl_config * mesaVis, GLboolean isPixmap)
{
struct intel_renderbuffer *rb;
- struct intel_screen *screen = (struct intel_screen*) driScrnPriv->private;
+ struct intel_screen *screen = (struct intel_screen*) driScrnPriv->driverPrivate;
if (isPixmap) {
return false; /* not implemented */
void *sharedContextPrivate)
{
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
- struct intel_screen *intelScreen = sPriv->private;
+ struct intel_screen *intelScreen = sPriv->driverPrivate;
#ifdef I915
if (IS_9XX(intelScreen->deviceID)) {
__driConfigOptions, __driNConfigOptions);
intelScreen->driScrnPriv = psp;
- psp->private = (void *) intelScreen;
+ psp->driverPrivate = (void *) intelScreen;
/* Determine chipset ID */
if (!intel_get_param(psp, I915_PARAM_CHIPSET_ID,
int width, int height)
{
struct intel_buffer *intelBuffer;
- struct intel_screen *intelScreen = screen->private;
+ struct intel_screen *intelScreen = screen->driverPrivate;
uint32_t tiling;
intelBuffer = CALLOC(sizeof *intelBuffer);
void *share_ctx)
{
__DRIscreen *dri_screen = dri_ctx->driScreenPriv;
- struct nouveau_screen *screen = dri_screen->private;
+ struct nouveau_screen *screen = dri_screen->driverPrivate;
struct nouveau_context *nctx;
struct gl_context *ctx;
if (!screen)
return NULL;
- dri_screen->private = screen;
+ dri_screen->driverPrivate = screen;
dri_screen->extensions = nouveau_screen_extensions;
screen->dri_screen = dri_screen;
static void
nouveau_destroy_screen(__DRIscreen *dri_screen)
{
- struct nouveau_screen *screen = dri_screen->private;
+ struct nouveau_screen *screen = dri_screen->driverPrivate;
if (!screen)
return;
nouveau_device_close(&screen->device);
FREE(screen);
- dri_screen->private = NULL;
+ dri_screen->driverPrivate = NULL;
}
static GLboolean
void *sharedContextPrivate)
{
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
- radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private);
+ radeonScreenPtr screen = (radeonScreenPtr)(sPriv->driverPrivate);
struct dd_function_table functions;
r200ContextPtr rmesa;
struct gl_context *ctx;
void *sharedContextPrivate)
{
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
- radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
+ radeonScreenPtr screen = (radeonScreenPtr) (sPriv->driverPrivate);
struct gl_context* ctx;
struct gl_context* shareCtx;
int fthrottle_mode;
void *sharedContextPrivate)
{
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
- radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private);
+ radeonScreenPtr screen = (radeonScreenPtr)(sPriv->driverPrivate);
struct dd_function_table functions;
r100ContextPtr rmesa;
struct gl_context *ctx;
int name, int pitch, void *loaderPrivate)
{
__DRIimage *image;
- radeonScreenPtr radeonScreen = screen->private;
+ radeonScreenPtr radeonScreen = screen->driverPrivate;
if (name == 0)
return NULL;
void *loaderPrivate)
{
__DRIimage *image;
- radeonScreenPtr radeonScreen = screen->private;
+ radeonScreenPtr radeonScreen = screen->driverPrivate;
image = CALLOC(sizeof *image);
if (image == NULL)
static void
radeonDestroyScreen( __DRIscreen *sPriv )
{
- radeonScreenPtr screen = (radeonScreenPtr)sPriv->private;
+ radeonScreenPtr screen = (radeonScreenPtr)sPriv->driverPrivate;
if (!screen)
return;
driDestroyOptionInfo (&screen->optionCache);
FREE( screen );
- sPriv->private = NULL;
+ sPriv->driverPrivate = NULL;
}
static GLboolean
radeonInitDriver( __DRIscreen *sPriv )
{
- sPriv->private = (void *) radeonCreateScreen2( sPriv );
- if ( !sPriv->private ) {
+ sPriv->driverPrivate = (void *) radeonCreateScreen2( sPriv );
+ if ( !sPriv->driverPrivate ) {
radeonDestroyScreen( sPriv );
return GL_FALSE;
}
const struct gl_config *mesaVis,
GLboolean isPixmap )
{
- radeonScreenPtr screen = (radeonScreenPtr) driScrnPriv->private;
+ radeonScreenPtr screen = (radeonScreenPtr) driScrnPriv->driverPrivate;
const GLboolean swDepth = GL_FALSE;
const GLboolean swAlpha = GL_FALSE;