summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-10-14 21:33:04 +0000
committerKeith Packard <keithp@keithp.com>2003-10-14 21:33:04 +0000
commit28bcd2efd134bfea3daa0738c9155b36cdf84168 (patch)
tree41f561d8e3de5826cc9aeaa7da6da769d8d5714c
parentcb46169759a833605b78409ae68c9fb57618ceba (diff)
Avoid attempting acceleration on non-screen formats (for now)
Offscreen allocator API changes.
-rw-r--r--hw/kdrive/mach64/mach64draw.c6
-rw-r--r--hw/kdrive/mach64/mach64video.c16
2 files changed, 15 insertions, 7 deletions
diff --git a/hw/kdrive/mach64/mach64draw.c b/hw/kdrive/mach64/mach64draw.c
index c8ccdffd1..13c4a12ea 100644
--- a/hw/kdrive/mach64/mach64draw.c
+++ b/hw/kdrive/mach64/mach64draw.c
@@ -105,6 +105,12 @@ mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait)
if (!reg)
return FALSE;
+ /*
+ * No acceleration for other formats (yet)
+ */
+ if (pDst->drawable.bitsPerPixel != pScreenPriv->screen->fb[0].bitsPerPixel)
+ return FALSE;
+
/* pixels / 8 = ((bytes * 8) / bpp) / 8 = bytes / bpp */
DST_PITCH = pDst->devKind / pDst->drawable.bitsPerPixel;
if (triple)
diff --git a/hw/kdrive/mach64/mach64video.c b/hw/kdrive/mach64/mach64video.c
index c2f14ee07..b66b4007a 100644
--- a/hw/kdrive/mach64/mach64video.c
+++ b/hw/kdrive/mach64/mach64video.c
@@ -557,13 +557,16 @@ mach64DisplayVideo(KdScreenInfo *screen,
}
static void
-mach64VideoMoveIn (KdOffscreenArea *area)
+mach64VideoSave (KdOffscreenArea *area)
{
-}
+ ScreenPtr pScreen = area->screen;
+ KdScreenPriv(pScreen);
+ KdScreenInfo *screen = pScreenPriv->screen;
+ Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver;
+ Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr;
-static void
-mach64VideoMoveOut (KdOffscreenArea *area)
-{
+ if (pPortPriv->off_screen == area)
+ pPortPriv->off_screen = 0;
}
static int
@@ -710,8 +713,7 @@ mach64PutImage(KdScreenInfo *screen,
if (!pPortPriv->off_screen)
{
pPortPriv->off_screen = KdOffscreenAlloc (screen->pScreen, size * 2, 64,
- TRUE, mach64VideoMoveIn,
- mach64VideoMoveOut,
+ TRUE, mach64VideoSave,
pPortPriv);
if (!pPortPriv->off_screen)
return BadAlloc;