summaryrefslogtreecommitdiff
path: root/src/nv_dga.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-07-16 18:48:32 +1000
committerDave Airlie <airlied@gmail.com>2012-07-16 18:48:32 +1000
commite5e3e733d933fc3accdd6c3c7a02df5950530cae (patch)
treeb681c75b4536050a4165ed4f129db8ec8d21f14e /src/nv_dga.c
parent713e9501b87465cf2a62c27605b6fc4a454dad95 (diff)
nv: make XAA optional.
This allows nv to build without XAA. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/nv_dga.c')
-rw-r--r--src/nv_dga.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nv_dga.c b/src/nv_dga.c
index 76e5e28..3c9ad11 100644
--- a/src/nv_dga.c
+++ b/src/nv_dga.c
@@ -6,7 +6,9 @@
#include "nv_include.h"
#include "nv_type.h"
#include "nv_proto.h"
+#ifdef HAVE_XAA_H
#include "xaalocal.h"
+#endif
#include "dgaproc.h"
@@ -15,10 +17,12 @@ static Bool NV_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
static Bool NV_SetMode(ScrnInfoPtr, DGAModePtr);
static int NV_GetViewport(ScrnInfoPtr);
static void NV_SetViewport(ScrnInfoPtr, int, int, int);
+#ifdef HAVE_XAA_H
static void NV_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
static void NV_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
static void NV_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int,
unsigned long);
+#endif
static
DGAFunctionRec NV_DGAFuncs = {
@@ -28,9 +32,13 @@ DGAFunctionRec NV_DGAFuncs = {
NV_SetViewport,
NV_GetViewport,
NVSync,
+#ifdef HAVE_XAA_H
NV_FillRect,
NV_BlitRect,
NV_BlitTransRect
+#else
+ NULL, NULL, NULL
+#endif
};
@@ -80,8 +88,10 @@ SECOND_PASS:
if(pixmap)
mode->flags |= DGA_PIXMAP_AVAILABLE;
+#ifdef HAVE_XAA_H
if(!pNv->NoAccel)
mode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT;
+#endif
if(pMode->Flags & V_DBLSCAN)
mode->flags |= DGA_DOUBLESCAN;
if(pMode->Flags & V_INTERLACE)
@@ -242,6 +252,7 @@ NV_SetViewport(
pNv->DGAViewportStatus = 0;
}
+#ifdef HAVE_XAA_H
static void
NV_FillRect (
ScrnInfoPtr pScrn,
@@ -291,7 +302,7 @@ NV_BlitTransRect(
){
/* not implemented */
}
-
+#endif
static Bool
NV_OpenFramebuffer(