summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2011-10-28 15:53:20 -0400
committerKristian Høgsberg <[email protected]>2011-11-02 11:16:01 -0400
commita2ea34d70507ffb6b7277b4612ae3bc1ca582a60 (patch)
tree762fe7e8e32c002390c86d755c81149ed80ebbba /src
parent1837fb8e7c3cef8b9292b68da152d185e7103646 (diff)
dri: Remove DRI1 fields from DRI structs
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c29
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h105
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c6
3 files changed, 2 insertions, 138 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 6d78f82ce39..e42bc84cca3 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -170,16 +170,11 @@ dri2CreateNewDrawable(__DRIscreen *screen,
pdraw->driContextPriv = NULL;
pdraw->loaderPrivate = loaderPrivate;
- pdraw->hHWDrawable = 0;
pdraw->refcount = 1;
pdraw->pStamp = NULL;
pdraw->lastStamp = 0;
- pdraw->index = 0;
pdraw->w = 0;
pdraw->h = 0;
- pdraw->vblSeq = 0;
- pdraw->vblFlags = 0;
-
pdraw->driScreenPriv = screen;
if (!(*screen->DriverAPI.CreateBuffer)(screen, pdraw, &config->modes, 0)) {
@@ -187,14 +182,6 @@ dri2CreateNewDrawable(__DRIscreen *screen,
return NULL;
}
- pdraw->msc_base = 0;
-
- /* This special default value is replaced with the configured
- * default value when the drawable is first bound to a direct
- * rendering context.
- */
- pdraw->swap_interval = (unsigned)-1;
-
pdraw->pStamp = &pdraw->dri2.stamp;
*pdraw->pStamp = pdraw->lastStamp + 1;
@@ -398,14 +385,8 @@ static void driDestroyScreen(__DRIscreen *psp)
if (psp->DriverAPI.DestroyScreen)
(*psp->DriverAPI.DestroyScreen)(psp);
- if (!psp->dri2.enabled) {
- (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX);
- (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize);
- (void)drmCloseOnce(psp->fd);
- } else {
- driDestroyOptionCache(&psp->optionCache);
- driDestroyOptionInfo(&psp->optionInfo);
- }
+ driDestroyOptionCache(&psp->optionCache);
+ driDestroyOptionInfo(&psp->optionInfo);
free(psp);
}
@@ -418,12 +399,6 @@ setupLoaderExtensions(__DRIscreen *psp,
int i;
for (i = 0; extensions[i]; i++) {
- if (strcmp(extensions[i]->name, __DRI_GET_DRAWABLE_INFO) == 0)
- psp->getDrawableInfo = (__DRIgetDrawableInfoExtension *) extensions[i];
- if (strcmp(extensions[i]->name, __DRI_DAMAGE) == 0)
- psp->damage = (__DRIdamageExtension *) extensions[i];
- if (strcmp(extensions[i]->name, __DRI_SYSTEM_TIME) == 0)
- psp->systemTime = (__DRIsystemTimeExtension *) extensions[i];
if (strcmp(extensions[i]->name, __DRI_DRI2_LOADER) == 0)
psp->dri2.loader = (__DRIdri2LoaderExtension *) extensions[i];
if (strcmp(extensions[i]->name, __DRI_IMAGE_LOOKUP) == 0)
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index e4dc623d4d6..e016a238dca 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -171,11 +171,6 @@ extern const struct __DriverAPIRec driDriverAPI;
*/
struct __DRIdrawableRec {
/**
- * Kernel drawable handle
- */
- drm_drawable_t hHWDrawable;
-
- /**
* Driver's private drawable information.
*
* This structure is opaque.
@@ -199,11 +194,6 @@ struct __DRIdrawableRec {
int refcount;
/**
- * Index of this drawable information in the SAREA.
- */
- unsigned int index;
-
- /**
* Pointer to the "drawable has changed ID" stamp in the SAREA (or
* to dri2.stamp if DRI2 is being used).
*/
@@ -221,32 +211,6 @@ struct __DRIdrawableRec {
int w, h;
/**
- * \name Vertical blank tracking information
- * Used for waiting on vertical blank events.
- */
- /*@{*/
- unsigned int vblSeq;
- unsigned int vblFlags;
- /*@}*/
-
- /**
- * \name Monotonic MSC tracking
- *
- * Low level driver is responsible for updating msc_base and
- * vblSeq values so that higher level code can calculate
- * a new msc value or msc target for a WaitMSC call. The new value
- * will be:
- * msc = msc_base + get_vblank_count() - vblank_base;
- *
- * And for waiting on a value, core code will use:
- * actual_target = target_msc - msc_base + vblank_base;
- */
- /*@{*/
- int64_t vblank_base;
- int64_t msc_base;
- /*@}*/
-
- /**
* Pointer to context to which this drawable is currently bound.
*/
__DRIcontext *driContextPriv;
@@ -256,12 +220,6 @@ struct __DRIdrawableRec {
*/
__DRIscreen *driScreenPriv;
- /**
- * Controls swap interval as used by GLX_SGI_swap_control and
- * GLX_MESA_swap_control.
- */
- unsigned int swap_interval;
-
struct {
unsigned int stamp;
} dri2;
@@ -272,11 +230,6 @@ struct __DRIdrawableRec {
*/
struct __DRIcontextRec {
/**
- * Kernel context handle used to access the device lock.
- */
- drm_context_t hHWContext;
-
- /**
* Device driver's private context data. This structure is opaque.
*/
void *driverPrivate;
@@ -322,15 +275,6 @@ struct __DRIscreenRec {
struct __DriverAPIRec DriverAPI;
const __DRIextension **extensions;
- /**
- * DDX / 2D driver version information.
- */
- __DRIversion ddx_version;
-
- /**
- * DRI X extension version information.
- */
- __DRIversion dri_version;
/**
* DRM (kernel module) version information.
@@ -338,14 +282,6 @@ struct __DRIscreenRec {
__DRIversion drm_version;
/**
- * ID used when the client sets the drawable lock.
- *
- * The X server uses this value to detect if the client has died while
- * holding the drawable lock.
- */
- int drawLockID;
-
- /**
* File descriptor returned when the kernel device driver is opened.
*
* Used to:
@@ -356,39 +292,6 @@ struct __DRIscreenRec {
int fd;
/**
- * SAREA pointer
- *
- * Used to access:
- * - the device lock
- * - the device-independent per-drawable and per-context(?) information
- */
- drm_sarea_t *pSAREA;
-
- /**
- * \name Direct frame buffer access information
- * Used for software fallbacks.
- */
- /*@{*/
- unsigned char *pFB;
- int fbSize;
- int fbOrigin;
- int fbStride;
- int fbWidth;
- int fbHeight;
- int fbBPP;
- /*@}*/
-
- /**
- * \name Device-dependent private information (stored in the SAREA).
- *
- * This data is accessed by the client driver only.
- */
- /*@{*/
- void *pDevPriv;
- int devPrivSize;
- /*@}*/
-
- /**
* Device-dependent private information (not stored in the SAREA).
*
* This pointer is never touched by the DRI layer.
@@ -399,11 +302,6 @@ struct __DRIscreenRec {
void *private;
#endif
- /* Extensions provided by the loader. */
- const __DRIgetDrawableInfoExtension *getDrawableInfo;
- const __DRIsystemTimeExtension *systemTime;
- const __DRIdamageExtension *damage;
-
struct {
/* Flag to indicate that this is a DRI2 screen. Many of the above
* fields will not be valid or initializaed in that case. */
@@ -413,9 +311,6 @@ struct __DRIscreenRec {
__DRIuseInvalidateExtension *useInvalidate;
} dri2;
- /* The lock actually in use, old sarea or DRI2 */
- drmLock *lock;
-
driOptionCache optionInfo;
driOptionCache optionCache;
unsigned int api_mask;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 5c9ab4f459e..e0ad9f24a9f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -197,15 +197,9 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
/* DRI fields */
radeon->dri.context = driContextPriv;
radeon->dri.screen = sPriv;
- radeon->dri.hwContext = driContextPriv->hHWContext;
- radeon->dri.hwLock = &sPriv->pSAREA->lock;
- radeon->dri.hwLockCount = 0;
radeon->dri.fd = sPriv->fd;
radeon->dri.drmMinor = sPriv->drm_version.minor;
- radeon->sarea = (drm_radeon_sarea_t *) ((GLubyte *) sPriv->pSAREA +
- screen->sarea_priv_offset);
-
/* Setup IRQs */
fthrottle_mode = driQueryOptioni(&radeon->optionCache, "fthrottle_mode");
radeon->iw.irq_seq = -1;