diff options
author | kem <kem> | 2001-01-11 00:30:49 +0000 |
---|---|---|
committer | kem <kem> | 2001-01-11 00:30:49 +0000 |
commit | 87a8489eddff1482e16719e162c175b2eabab77d (patch) | |
tree | d452cadc4a88b2672acb3550ed5a1b7dd57a8cc5 /xc | |
parent | 098c675f27c8041985430b8a066b40ec794f1dca (diff) |
- Add XF86Config file option to enable depth buffer moves (they are
disabled by default since they are excuciatingly slow)
Diffstat (limited to 'xc')
3 files changed, 19 insertions, 9 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h index 90311d495..7a2285200 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h @@ -285,6 +285,8 @@ typedef struct { Bool IsPCI; /* Current card is a PCI card */ + Bool depthMoves; /* Enable depth moves -- slow! */ + drmSize agpSize; drmHandle agpMemHandle; /* Handle from drmAgpAlloc */ unsigned long agpOffset; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c index dd5fa4251..8c268ee12 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c @@ -313,7 +313,6 @@ static void RADEONDRISwapContext(ScreenPtr pScreen, DRISyncType syncType, } } -#if 0 /* The Radeon has depth tiling on all the time, so we have to convert * the x,y coordinates into the memory bus address (mba) in the same * manner as the engine. In each case, the linear block address (ba) @@ -418,7 +417,6 @@ static void RADEONScreenToScreenCopyDepth(ScrnInfoPtr pScrn, default: break; } } -#endif /* Initialize the state of the back and depth buffers. */ static void RADEONDRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 index) @@ -621,13 +619,12 @@ static void RADEONDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, destx, desty, w, h); RADEONSelectBuffer(pScrn, RADEON_DEPTH); -#if 0 - /* FIXME: This is disabled because it is much too slow */ - RADEONScreenToScreenCopyDepth(pScrn, - x1, y1, - destx, desty, - w, h); -#endif + + if (info->depthMoves) + RADEONScreenToScreenCopyDepth(pScrn, + x1, y1, + destx, desty, + w, h); } RADEONSelectBuffer(pScrn, RADEON_FRONT); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c index 47406fb4e..dae4d873c 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c @@ -131,6 +131,7 @@ typedef enum { OPTION_AGP_SIZE, OPTION_RING_SIZE, OPTION_BUFFER_SIZE, + OPTION_DEPTH_MOVE, #endif #ifdef ENABLE_FLAT_PANEL /* Note: Radeon flat panel support has been disabled for now */ @@ -157,6 +158,7 @@ OptionInfoRec RADEONOptions[] = { { OPTION_AGP_SIZE, "AGPSize", OPTV_INTEGER, {0}, FALSE }, { OPTION_RING_SIZE, "RingSize", OPTV_INTEGER, {0}, FALSE }, { OPTION_BUFFER_SIZE, "BufferSize", OPTV_INTEGER, {0}, FALSE }, + { OPTION_DEPTH_MOVE, "EnableDepthMoves", OPTV_BOOLEAN, {0}, FALSE }, #endif #ifdef ENABLE_FLAT_PANEL /* Note: Radeon flat panel support has been disabled for now */ @@ -1191,6 +1193,15 @@ static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn) /* This option checked by the RADEON DRM kernel module */ } + /* Depth moves are disabled by default since they are extremely slow */ + if ((info->depthMoves = xf86ReturnOptValBool(RADEONOptions, + OPTION_DEPTH_MOVE, FALSE))) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Enabling depth moves\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Depth moves disabled by default\n"); + } + return TRUE; } #endif |