summaryrefslogtreecommitdiff
path: root/src/atimach64accel.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2006-10-31 16:10:07 +0200
committerGeorge Sapountzis <gsap7@yahoo.gr>2007-02-05 19:32:00 +0200
commit23b12b9ff55224e8c3c45eb58ea5fbf2f747d82e (patch)
tree1cfb22b70ab001da741ab06407ce3bc322f84d9d /src/atimach64accel.c
parentbc3b222b57d7edf7bdce00a53e8abd9047c314a4 (diff)
Consolidate atiaccel.c w/ atimach64accel.c, part 2.
Merge ATIInitializeAcceleration() in ATIMach64AccelInit().
Diffstat (limited to 'src/atimach64accel.c')
-rw-r--r--src/atimach64accel.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/atimach64accel.c b/src/atimach64accel.c
index 090ae78..276fc86 100644
--- a/src/atimach64accel.c
+++ b/src/atimach64accel.c
@@ -970,13 +970,21 @@ ATIMach64SubsequentColorExpandScanline
* This function fills in structure fields needed for acceleration on Mach64
* variants.
*/
-int
+Bool
ATIMach64AccelInit
(
- ATIPtr pATI,
- XAAInfoRecPtr pXAAInfo
+ ScreenPtr pScreen
)
{
+ ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
+ ATIPtr pATI = ATIPTR(pScreenInfo);
+ XAAInfoRecPtr pXAAInfo;
+
+ if (!(pATI->pXAAInfo = XAACreateInfoRec()))
+ return FALSE;
+
+ pXAAInfo = pATI->pXAAInfo;
+
/* This doesn't seem quite right... */
if (pATI->XModifier == 1)
{
@@ -1040,7 +1048,7 @@ ATIMach64AccelInit
/* The engine does not support the following primitives for 24bpp */
if (pATI->XModifier != 1)
- return ATIMach64MaxY;
+ goto XAAInit;
/* Solid lines */
pXAAInfo->SetupForSolidLine = ATIMach64SetupForSolidLine;
@@ -1048,6 +1056,13 @@ ATIMach64AccelInit
pXAAInfo->SubsequentSolidBresenhamLine =
ATIMach64SubsequentSolidBresenhamLine;
- return ATIMach64MaxY;
+XAAInit:
+ if (!XAAInit(pScreen, pATI->pXAAInfo)) {
+ XAADestroyInfoRec(pATI->pXAAInfo);
+ pATI->pXAAInfo = NULL;
+ return FALSE;
+ }
+
+ return TRUE;
}
#endif /* USE_XAA */