From 57de5e285d6271fc4b2bc8a951a98be6308d649d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 16 Jul 2004 04:38:54 +0000 Subject: Bugzilla #803,804: Fix build in the !XF86DRI case after DRI and Radeon Render acceleration merges. --- src/radeon.h | 2 +- src/radeon_accel.c | 10 ++++++++-- src/radeon_accelfuncs.c | 8 ++++++-- src/radeon_render.c | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/radeon.h b/src/radeon.h index 16890eef..3e8f5540 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -290,6 +290,7 @@ typedef struct { unsigned long LinearAddr; /* Frame buffer physical address */ unsigned long MMIOAddr; /* MMIO region physical address */ unsigned long BIOSAddr; /* BIOS physical address */ + unsigned int fbLocation; unsigned char *MMIO; /* Map of MMIO region */ unsigned char *FB; /* Map of frame buffer */ @@ -499,7 +500,6 @@ typedef struct { int depthX; int depthY; - unsigned int fbLocation; int frontOffset; int frontPitch; int backOffset; diff --git a/src/radeon_accel.c b/src/radeon_accel.c index b4c44ed3..6bebd6c1 100644 --- a/src/radeon_accel.c +++ b/src/radeon_accel.c @@ -322,8 +322,14 @@ void RADEONEngineRestore(ScrnInfoPtr pScrn) /* In the DRI case, it's initialized when the server grabs the lock. We * don't hold the lock here, so don't do it in that case. */ - if (!info->directRenderingEnabled && info->RenderAccel) - RADEONInit3DEngineForRender(pScrn); +#ifdef XF86DRI + if (!info->directRenderingEnabled) { +#endif + if (info->RenderAccel) + RADEONInit3DEngineForRender(pScrn); +#ifdef XF86DRI + } +#endif #endif RADEONWaitForIdleMMIO(pScrn); diff --git a/src/radeon_accelfuncs.c b/src/radeon_accelfuncs.c index 16dcec15..ec9d04fc 100644 --- a/src/radeon_accelfuncs.c +++ b/src/radeon_accelfuncs.c @@ -1348,7 +1348,7 @@ FUNC_NAME(RADEONAccelInit)(ScreenPtr pScreen, XAAInfoRecPtr a) | BIT_ORDER_IN_BYTE_LSBFIRST); #endif -#ifdef RENDER +#if defined(RENDER) && defined(XF86DRI) if (info->RenderAccel && info->directRenderingEnabled && ((pScrn->bitsPerPixel == 32) || (pScrn->bitsPerPixel == 16))) { /* XXX: The non-CP vertex dispatch doesn't seem to work. */ @@ -1396,8 +1396,12 @@ FUNC_NAME(RADEONAccelInit)(ScreenPtr pScreen, XAAInfoRecPtr a) FUNC_NAME(R100SubsequentCPUToScreenTexture); } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Render acceleration enabled\n"); + } else { + info->RenderAccel = FALSE; } -#endif +#else /* RENDER && XF86DRI */ + info->RenderAccel = FALSE; +#endif /* RENDER && XF86DRI */ } #undef FUNC_NAME diff --git a/src/radeon_render.c b/src/radeon_render.c index fe192998..73de8611 100644 --- a/src/radeon_render.c +++ b/src/radeon_render.c @@ -177,9 +177,9 @@ ATILog2(int val) void RADEONInit3DEngineForRender(ScrnInfoPtr pScrn) { +#ifdef XF86DRI RADEONInfoPtr info = RADEONPTR (pScrn); -#ifdef XF86DRI if (info->directRenderingEnabled) RadeonInit3DEngineCP(pScrn); else -- cgit v1.2.3