diff options
Diffstat (limited to 'src/atimach64accel.c')
-rw-r--r-- | src/atimach64accel.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/atimach64accel.c b/src/atimach64accel.c index 090ae788..276fc86a 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 */ |