summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-07-03 00:39:45 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-07-03 00:39:45 +0200
commit22f165f290f57e638d198f24a37f62fc16b72bae (patch)
tree4ff24e778516f0af6d46556aa9f300d7f5356d20 /src
parentea5105230c7c3519730b8d3c250e9ba9a4e4374a (diff)
Build and warning fixes for !defined(USE_XAA).
Diffstat (limited to 'src')
-rw-r--r--src/radeon_accel.c2
-rw-r--r--src/radeon_dga.c6
-rw-r--r--src/radeon_dri.c21
-rw-r--r--src/radeon_driver.c2
4 files changed, 24 insertions, 7 deletions
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index b18b6d4..6309771 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -96,6 +96,7 @@
#include "xf86.h"
+#ifdef USE_XAA
static struct {
int rop;
int pattern;
@@ -117,6 +118,7 @@ static struct {
{ RADEON_ROP3_DSan, RADEON_ROP3_DPan }, /* GXnand */
{ RADEON_ROP3_ONE, RADEON_ROP3_ONE } /* GXset */
};
+#endif
/* The FIFO has 64 slots. This routines waits until at least `entries'
* of these slots are empty.
diff --git a/src/radeon_dga.c b/src/radeon_dga.c
index e67a964..f084fd3 100644
--- a/src/radeon_dga.c
+++ b/src/radeon_dga.c
@@ -61,9 +61,9 @@ static Bool RADEON_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
static Bool RADEON_SetMode(ScrnInfoPtr, DGAModePtr);
static int RADEON_GetViewport(ScrnInfoPtr);
static void RADEON_SetViewport(ScrnInfoPtr, int, int, int);
+#ifdef USE_XAA
static void RADEON_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
static void RADEON_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
-#ifdef USE_XAA
static void RADEON_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int,
unsigned long);
#endif
@@ -363,6 +363,8 @@ static void RADEON_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
}
+#ifdef USE_XAA
+
static void RADEON_FillRect(ScrnInfoPtr pScrn,
int x, int y, int w, int h,
unsigned long color)
@@ -422,7 +424,6 @@ static void RADEON_BlitRect(ScrnInfoPtr pScrn,
#endif /* USE_XAA */
}
-#ifdef USE_XAA
static void RADEON_BlitTransRect(ScrnInfoPtr pScrn,
int srcx, int srcy, int w, int h,
int dstx, int dsty, unsigned long color)
@@ -443,6 +444,7 @@ static void RADEON_BlitTransRect(ScrnInfoPtr pScrn,
if (pScrn->bitsPerPixel == info->CurrentLayout.bitsPerPixel)
RADEON_MARK_SYNC(info, pScrn);
}
+
#endif /* USE_XAA */
static Bool RADEON_OpenFramebuffer(ScrnInfoPtr pScrn,
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 8e159d2..62a310d 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -71,7 +71,9 @@ static void RADEONDRITransitionTo3d(ScreenPtr pScreen);
static void RADEONDRITransitionMultiToSingle3d(ScreenPtr pScreen);
static void RADEONDRITransitionSingleToMulti3d(ScreenPtr pScreen);
+#ifdef USE_XAA
static void RADEONDRIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
+#endif
/* Initialize the visual configs that are supported by the hardware.
* These are combined with the visual configs that the indirect
@@ -453,6 +455,8 @@ static void RADEONDRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
}
}
+#ifdef USE_XAA
+
/* The Radeon has depth tiling on all the time. Rely on surface regs to
* translate the addresses (only works if allowColorTiling is true).
*/
@@ -513,6 +517,8 @@ static void RADEONScreenToScreenCopyDepth(ScrnInfoPtr pScrn,
}
}
+#endif /* USE_XAA */
+
/* Initialize the state of the back and depth buffers */
static void RADEONDRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 indx)
{
@@ -1625,6 +1631,7 @@ void RADEONDRIInitPageFlip(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
+#ifdef USE_XAA
/* Have shadowfb run only while there is 3d active. This must happen late,
* after XAAInit has been called
*/
@@ -1636,7 +1643,9 @@ void RADEONDRIInitPageFlip(ScreenPtr pScreen)
} else
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"ShadowFB initialized for Page Flipping\n");
- } else {
+ } else
+#endif /* USE_XAA */
+ {
info->allowPageFlip = 0;
}
}
@@ -1791,6 +1800,8 @@ void RADEONDRICloseScreen(ScreenPtr pScreen)
}
}
+#ifdef USE_XAA
+
/* Use callbacks from dri.c to support pageflipping mode for a single
* 3d context without need for any specific full-screen extension.
*
@@ -1826,7 +1837,6 @@ static void RADEONDRIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
if (!pSAREAPriv->pfAllowPageFlip && pSAREAPriv->pfCurrentPage == 0)
return;
-#ifdef USE_XAA
/* XXX: implement for EXA */
/* pretty much a hack. */
@@ -1852,16 +1862,17 @@ static void RADEONDRIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
}
}
info->dst_pitch_offset &= ~RADEON_DST_TILE_MACRO;
-#endif /* USE_XAA */
}
+#endif /* USE_XAA */
+
static void RADEONEnablePageFlip(ScreenPtr pScreen)
{
+#ifdef USE_XAA
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONSAREAPrivPtr pSAREAPriv = DRIGetSAREAPrivate(pScreen);
-#ifdef USE_XAA
/* XXX: Fix in EXA case */
if (info->allowPageFlip) {
/* pretty much a hack. */
@@ -1912,10 +1923,10 @@ static void RADEONDRITransitionTo3d(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
+#ifdef USE_XAA
FBAreaPtr fbarea;
int width, height;
-#ifdef USE_XAA
/* EXA allocates these areas up front, so it doesn't do the following
* stuff.
*/
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 85c5c77..645f9ff 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -5650,7 +5650,9 @@ _X_EXPORT Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
pScrn->memPhysBase, pScrn->fbOffset));
info->accelOn = FALSE;
+#ifdef USE_XAA
info->accel = NULL;
+#endif
pScrn->fbOffset = 0;
if (info->IsSecondary) pScrn->fbOffset = pScrn->videoRam * 1024;
if (!RADEONMapMem(pScrn)) return FALSE;