From e5e3e733d933fc3accdd6c3c7a02df5950530cae Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 16 Jul 2012 18:48:32 +1000 Subject: nv: make XAA optional. This allows nv to build without XAA. Signed-off-by: Dave Airlie --- src/riva_xaa.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/riva_xaa.c') diff --git a/src/riva_xaa.c b/src/riva_xaa.c index ac0a830..3139d07 100644 --- a/src/riva_xaa.c +++ b/src/riva_xaa.c @@ -29,9 +29,10 @@ #endif #include "riva_include.h" +#ifdef HAVE_XAA_H #include "xaalocal.h" +#endif #include "xaarop.h" - #include "miline.h" static void @@ -78,7 +79,9 @@ RivaSetRopSolid(RivaPtr pRiva, int rop) RivaSetPattern(pRiva, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF); pRiva->currentRop = rop; RIVA_FIFO_FREE(pRiva->riva, Rop, 1); +#ifdef HAVE_XAA_H pRiva->riva.Rop->Rop3 = XAAGetCopyROP(rop); +#endif } } @@ -91,7 +94,7 @@ RivaSetRopPattern(RivaPtr pRiva, int rop) pRiva->riva.Rop->Rop3 = XAAGetPatternROP(rop); } } - +#ifdef HAVE_XAA_H /* * Fill solid rectangles. */ @@ -192,7 +195,7 @@ RivaSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, pRiva->riva.Bitmap->UnclippedRectangle[0].WidthHeight = (w << 16) | h; write_mem_barrier(); } - +#endif void RivaResetGraphics(ScrnInfoPtr pScrn) @@ -220,6 +223,7 @@ void RivaSync(ScrnInfoPtr pScrn) RIVA_BUSY(pRiva->riva); } +#ifdef HAVE_XAA_H /* Color expansion */ static void RivaSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, @@ -451,11 +455,13 @@ RivaValidatePolyPoint( if(pGC->alu != GXcopy) pGC->ops->PolyPoint = miPolyPoint; } +#endif /* Initialize XAA acceleration info */ Bool RivaAccelInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr infoPtr; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RivaPtr pRiva = RivaPTR(pScrn); @@ -536,4 +542,7 @@ RivaAccelInit(ScreenPtr pScreen) RivaResetGraphics(pScrn); return(XAAInit(pScreen, infoPtr)); +#else + return FALSE; +#endif } -- cgit v1.2.3