summaryrefslogtreecommitdiff
path: root/hw/kdrive/mach64
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@gnome.org>2003-10-15 05:34:54 +0000
committerAnders Carlsson <andersca@gnome.org>2003-10-15 05:34:54 +0000
commitf4bcd36a386116c450ea6893ab3d08e81cea663b (patch)
tree87e6d214bbed363b30bd37aac76ae532be7c52b5 /hw/kdrive/mach64
parentf5916edb172738c73c8f78b23981abfd8d03a079 (diff)
Add a memory_base variable and use it.
Diffstat (limited to 'hw/kdrive/mach64')
-rw-r--r--hw/kdrive/mach64/mach64.c2
-rw-r--r--hw/kdrive/mach64/mach64.h1
-rw-r--r--hw/kdrive/mach64/mach64draw.c4
3 files changed, 3 insertions, 4 deletions
diff --git a/hw/kdrive/mach64/mach64.c b/hw/kdrive/mach64/mach64.c
index 06818f8f2..a036f3e1d 100644
--- a/hw/kdrive/mach64/mach64.c
+++ b/hw/kdrive/mach64/mach64.c
@@ -70,7 +70,7 @@ mach64ScreenInit (KdScreenInfo *screen)
screen->dumb = TRUE;
if (mach64s->vesa.mapping != VESA_LINEAR)
screen->dumb = TRUE;
- mach64s->screen = mach64s->vesa.fb;
+ screen->memory_base = mach64s->vesa.fb;
switch (screen->fb[0].depth) {
case 8:
mach64s->colorKey = 0xff;
diff --git a/hw/kdrive/mach64/mach64.h b/hw/kdrive/mach64/mach64.h
index b28ac9b0d..38ddb9ae9 100644
--- a/hw/kdrive/mach64/mach64.h
+++ b/hw/kdrive/mach64/mach64.h
@@ -560,7 +560,6 @@ Bool mach64InitVideo(ScreenPtr pScreen);
typedef struct _mach64ScreenInfo {
VesaScreenPrivRec vesa;
- CARD8 *screen;
CARD32 DP_PIX_WIDTH;
CARD32 DP_SET_GUI_ENGINE;
Bool bpp24;
diff --git a/hw/kdrive/mach64/mach64draw.c b/hw/kdrive/mach64/mach64draw.c
index 13c4a12ea..aa065c5a8 100644
--- a/hw/kdrive/mach64/mach64draw.c
+++ b/hw/kdrive/mach64/mach64draw.c
@@ -116,7 +116,7 @@ mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait)
if (triple)
DST_PITCH *= 3;
/* bytes / 8 */
- DST_OFFSET = ((CARD8 *) pDst->devPrivate.ptr - mach64s->screen) >> 3;
+ DST_OFFSET = ((CARD8 *) pDst->devPrivate.ptr - pScreenPriv->screen->memory_base) >> 3;
mach64WaitAvail(reg, wait + (pSrc ? 5 : 4));
reg->DP_SET_GUI_ENGINE = mach64s->DP_SET_GUI_ENGINE | (combo << 20);
@@ -131,7 +131,7 @@ mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait)
if (triple)
SRC_PITCH *= 3;
/* bytes / 8 */
- SRC_OFFSET = ((CARD8 *) pSrc->devPrivate.ptr - mach64s->screen) >> 3;
+ SRC_OFFSET = ((CARD8 *) pSrc->devPrivate.ptr - pScreenPriv->screen->memory_base) >> 3;
reg->SRC_OFF_PITCH = ((SRC_OFFSET << 0) |
(SRC_PITCH << 22) |