dri: Remove DRI1 fields from DRI structs
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -170,11 +170,6 @@ extern const struct __DriverAPIRec driDriverAPI;
|
||||
* Per-drawable private DRI driver information.
|
||||
*/
|
||||
struct __DRIdrawableRec {
|
||||
/**
|
||||
* Kernel drawable handle
|
||||
*/
|
||||
drm_drawable_t hHWDrawable;
|
||||
|
||||
/**
|
||||
* Driver's private drawable information.
|
||||
*
|
||||
@@ -198,11 +193,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).
|
||||
@@ -220,32 +210,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.
|
||||
*/
|
||||
@@ -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;
|
||||
@@ -271,11 +229,6 @@ struct __DRIdrawableRec {
|
||||
* Per-context private driver information.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
@@ -322,29 +275,12 @@ 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.
|
||||
*/
|
||||
__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.
|
||||
*
|
||||
@@ -355,39 +291,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).
|
||||
*
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user