summaryrefslogtreecommitdiff
path: root/xc/lib
diff options
context:
space:
mode:
Diffstat (limited to 'xc/lib')
-rw-r--r--xc/lib/GL/glx/xfont.c6
-rw-r--r--xc/lib/GL/mesa/src/Imakefile10
-rw-r--r--xc/lib/GL/mesa/src/X86/Imakefile5
-rw-r--r--xc/lib/GL/mesa/src/X86/Imakefile.inc5
-rw-r--r--xc/lib/GL/mesa/src/drv/common/Imakefile.inc4
-rw-r--r--xc/lib/GL/mesa/src/drv/common/mm.c4
-rw-r--r--xc/lib/GL/mesa/src/drv/ffb/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc4
-rw-r--r--xc/lib/GL/mesa/src/drv/ffb/ffb_state.c4
-rw-r--r--xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c4
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc4
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/Imakefile.inc4
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c6
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/Imakefile.inc4
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgadd.c2
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgaregs.h2681
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgastate.c40
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgatex.c57
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/Imakefile.inc4
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/r128_tex.c2
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c6
-rw-r--r--xc/lib/GL/mesa/src/drv/radeon/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc4
-rw-r--r--xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c4
-rw-r--r--xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c6
-rw-r--r--xc/lib/GL/mesa/src/drv/sis/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c12
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/Imakefile4
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc2
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c7
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c2
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c2
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c14
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c4
-rw-r--r--xc/lib/X11/Font.c6
-rw-r--r--xc/lib/X11/Imakefile6
-rw-r--r--xc/lib/X11/XErrorDB5
-rw-r--r--xc/lib/X11/lcFile.c6
-rw-r--r--xc/lib/Xaw/Text.c10
-rw-r--r--xc/lib/Xext/Xext-def.cpp4
-rw-r--r--xc/lib/Xft/Xft.h3
-rw-r--r--xc/lib/Xft/xftcolor.c4
-rw-r--r--xc/lib/Xft/xftdir.c6
-rw-r--r--xc/lib/Xft/xftdpy.c12
-rw-r--r--xc/lib/Xft/xftdraw.c4
-rw-r--r--xc/lib/Xft/xftfreetype.c4
-rw-r--r--xc/lib/Xft/xftglyphs.c23
-rw-r--r--xc/lib/Xft/xftgram.y6
-rw-r--r--xc/lib/Xft/xftint.h4
-rw-r--r--xc/lib/Xft/xftlex.l20
-rw-r--r--xc/lib/Xmuu/Imakefile7
-rw-r--r--xc/lib/Xrender/Xrender.c11
-rw-r--r--xc/lib/Xv/Xv.c19
-rw-r--r--xc/lib/Xxf86vm/XF86VMode.c101
-rw-r--r--xc/lib/font/FreeType/ftfuncs.c4
-rw-r--r--xc/lib/font/fontfile/fontdir.c59
-rw-r--r--xc/lib/freetype2/Imakefile71
-rw-r--r--xc/lib/freetype2/freetype/Imakefile8
-rw-r--r--xc/lib/freetype2/freetype/config/Imakefile6
-rw-r--r--xc/lib/freetype2/freetype/internal/Imakefile12
64 files changed, 1813 insertions, 1539 deletions
diff --git a/xc/lib/GL/glx/xfont.c b/xc/lib/GL/glx/xfont.c
index f07dee8db..142aa386f 100644
--- a/xc/lib/GL/glx/xfont.c
+++ b/xc/lib/GL/glx/xfont.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/lib/GL/glx/xfont.c,v 1.5 2001/03/21 16:04:39 dawes Exp $ */
+/* $XFree86: xc/lib/GL/glx/xfont.c,v 1.6 2001/05/02 15:06:02 dawes Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
@@ -249,7 +249,7 @@ void DRI_glXUseXFont( Font font, int first, int count, int listbase )
bm = (GLubyte *) Xmalloc((max_bm_width * max_bm_height) * sizeof
(GLubyte));
if (!bm) {
- XFreeFontInfo( NULL, fs, 0 );
+ XFreeFontInfo( NULL, fs, 1 );
__glXSetError(CC, GL_OUT_OF_MEMORY);
return;
}
@@ -362,7 +362,7 @@ bm_height);
}
Xfree(bm);
- XFreeFontInfo( NULL, fs, 0 );
+ XFreeFontInfo( NULL, fs, 1 );
XFreeGC (dpy, gc);
/* Restore saved packing modes. */
diff --git a/xc/lib/GL/mesa/src/Imakefile b/xc/lib/GL/mesa/src/Imakefile
index be3456e67..203651d9a 100644
--- a/xc/lib/GL/mesa/src/Imakefile
+++ b/xc/lib/GL/mesa/src/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.25 2001/04/03 02:29:33 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.26 2001/05/02 15:06:02 dawes Exp $
#include <Threads.tmpl>
@@ -27,7 +27,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
#if GlxBuiltInTdfx
- TDFX_DEFS = -DFX
+ TDFX_DEFINES = -DFX
#endif
#ifdef i386Architecture
@@ -39,11 +39,11 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#include "Imakefile.inc"
#ifdef UseCompaqMathLibrary
- MATHDEF = -DCCPML
+ MATH_DEFINES = -DCCPML
#endif
- DEFINES = $(ALLOC_DEFINES) GlxDefines $(TDFX_DEFS) \
- $(MESA_ASM_DEFS) $(MATHDEF)
+ DEFINES = $(ALLOC_DEFINES) GlxDefines $(TDFX_DEFINES) \
+ $(MESA_ASM_DEFINES) $(MATH_DEFINES)
INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \
-I$(MESASRCDIR)/src -I$(GLXLIBSRC)/dri
SRCS = $(COREMESASRCS)
diff --git a/xc/lib/GL/mesa/src/X86/Imakefile b/xc/lib/GL/mesa/src/X86/Imakefile
index 9c28d6b26..3ca61bd0d 100644
--- a/xc/lib/GL/mesa/src/X86/Imakefile
+++ b/xc/lib/GL/mesa/src/X86/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.17 2001/04/03 02:29:34 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.18 2001/05/02 15:06:03 dawes Exp $
/*
* Only need SharedLib build unless OSMesa lib is built, or driver is built
@@ -28,7 +28,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#define NeedToLinkMesaSrc
#include "Imakefile.inc"
- DEFINES = $(ALLOC_DEFINES) GlxDefines /*-DFX*/ $(MESA_ASM_DEFS)
+ DEFINES = $(ALLOC_DEFINES) GlxDefines $(MESA_ASM_DEFINES)
INCLUDES = -I$(INCLUDESRC) -I$(EXTINCSRC) -I$(MESASRCDIR)/src \
-I$(MESASRCDIR)/src/X86
@@ -86,4 +86,3 @@ ObjectFromAsmSource(katmai_xform_raw4, NullParameter)
#endif
DependTarget()
-
diff --git a/xc/lib/GL/mesa/src/X86/Imakefile.inc b/xc/lib/GL/mesa/src/X86/Imakefile.inc
index 7f505e745..01d6348b1 100644
--- a/xc/lib/GL/mesa/src/X86/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/X86/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile.inc,v 1.1 2001/03/23 19:18:37 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $
#ifndef MesaX86BuildDir
#define MesaX86BuildDir $(GLXLIBSRC)/mesa/src/X86/
@@ -283,6 +283,5 @@ MESA_ASM_DOBJS = $(MESA_X86_DOBJS) $(MESA_MMX_DOBJS) $(MESA_3DNOW_DOBJS) \
MESA_ASM_POBJS = $(MESA_X86_POBJS) $(MESA_MMX_POBJS) $(MESA_3DNOW_POBJS) \
$(MESA_KATMAI_POBJS)
-MESA_ASM_DEFS = -DUSE_X86_ASM $(MESA_MMX_DEFS) $(MESA_3DNOW_DEFS) \
- $(MESA_KATMAI_DEFS)
+MESA_ASM_DEFINES = -DUSE_X86_ASM $(MESA_MMX_DEFS) $(MESA_3DNOW_DEFS) $(MESA_KATMAI_DEFS)
diff --git a/xc/lib/GL/mesa/src/drv/common/Imakefile.inc b/xc/lib/GL/mesa/src/drv/common/Imakefile.inc
index 7fff046d8..24b614c96 100644
--- a/xc/lib/GL/mesa/src/drv/common/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/drv/common/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/common/Imakefile.inc,v 1.1 2001/03/23 19:18:38 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/common/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $
#ifndef MesaDrvSrcDir
#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv
@@ -16,7 +16,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
#if BuildXF86DRI
- DRI_DEFINES = GlxDefines -DDRIVERTS
+ DRI_DEFINES = GlxDefines
DRI_INCLUDES =
#endif
diff --git a/xc/lib/GL/mesa/src/drv/common/mm.c b/xc/lib/GL/mesa/src/drv/common/mm.c
index 416f007e4..2ec5a101a 100644
--- a/xc/lib/GL/mesa/src/drv/common/mm.c
+++ b/xc/lib/GL/mesa/src/drv/common/mm.c
@@ -106,6 +106,8 @@ static TMemBlock* SliceBlock(TMemBlock *p,
/* break left */
if (startofs > p->ofs) {
newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock));
+ if (!newblock)
+ return NULL;
newblock->ofs = startofs;
newblock->size = p->size - (startofs - p->ofs);
newblock->free = 1;
@@ -118,6 +120,8 @@ static TMemBlock* SliceBlock(TMemBlock *p,
/* break right */
if (size < p->size) {
newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock));
+ if (!newblock)
+ return NULL;
newblock->ofs = startofs + size;
newblock->size = p->size - size;
newblock->free = 1;
diff --git a/xc/lib/GL/mesa/src/drv/ffb/Imakefile b/xc/lib/GL/mesa/src/drv/ffb/Imakefile
index ff24b1927..9722ff123 100644
--- a/xc/lib/GL/mesa/src/drv/ffb/Imakefile
+++ b/xc/lib/GL/mesa/src/drv/ffb/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile,v 1.11 2001/04/03 02:29:34 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile,v 1.12 2001/05/10 16:56:10 dawes Exp $
#include <Threads.tmpl>
diff --git a/xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc b/xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc
index c7608f765..72db80797 100644
--- a/xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc,v 1.1 2001/03/23 19:18:39 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $
#ifndef MesaDrvSrcDir
#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv
@@ -16,7 +16,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
#if BuildXF86DRI
- DRI_DEFINES = GlxDefines -DDRIVERTS
+ DRI_DEFINES = GlxDefines
DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \
-I$(INCLUDESRC) -I$(INCLUDESRC)/GL \
-I$(GLXLIBSRC)/mesa/dri \
diff --git a/xc/lib/GL/mesa/src/drv/ffb/ffb_state.c b/xc/lib/GL/mesa/src/drv/ffb/ffb_state.c
index b083533e3..93865574d 100644
--- a/xc/lib/GL/mesa/src/drv/ffb/ffb_state.c
+++ b/xc/lib/GL/mesa/src/drv/ffb/ffb_state.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c,v 1.1 2000/06/20 05:08:39 dawes Exp $
+/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c,v 1.1.4.1 2001/05/24 16:35:38 dawes Exp $
*
* GLX Hardware Device Driver for Sun Creator/Creator3D
* Copyright (C) 2000 David S. Miller
@@ -548,6 +548,7 @@ static void ffbDDReducedPrimitiveChange(GLcontext *ctx, GLenum prim)
"ffbDDReducedPrimitiveChange: prim(%d) ", prim);
#endif
switch(prim) {
+ case GL_POINT:
case GL_POINTS:
#ifdef STATE_TRACE
fprintf(stderr, "GL_POINTS ");
@@ -571,6 +572,7 @@ static void ffbDDReducedPrimitiveChange(GLcontext *ctx, GLenum prim)
}
break;
+ case GL_LINE:
case GL_LINES:
#ifdef STATE_TRACE
fprintf(stderr, "GL_LINES ");
diff --git a/xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c b/xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c
index 89c6a1c5c..f93a837b6 100644
--- a/xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c,v 1.2 2000/12/07 20:26:05 dawes Exp $
+/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c,v 1.2.4.1 2001/05/29 22:28:17 dawes Exp $
*
* GLX Hardware Device Driver for Sun Creator/Creator3D
* Copyright (C) 2000 David S. Miller
@@ -339,6 +339,8 @@ void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv)
ffbCtx->glCtx->Visual->DBflag == 0)
return;
+ FLUSH_VB(ffbCtx->glCtx, "swap buffers");
+
ffb = ffbCtx->regs;
dac = ffbCtx->ffbScreen->dac;
diff --git a/xc/lib/GL/mesa/src/drv/gamma/Imakefile b/xc/lib/GL/mesa/src/drv/gamma/Imakefile
index fc2c6f7bf..bb19ea55e 100644
--- a/xc/lib/GL/mesa/src/drv/gamma/Imakefile
+++ b/xc/lib/GL/mesa/src/drv/gamma/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.22 2001/04/03 02:29:35 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.23 2001/05/10 16:56:11 dawes Exp $
#include <Threads.tmpl>
diff --git a/xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc b/xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc
index a20bc7b55..69fb17703 100644
--- a/xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc,v 1.1 2001/03/23 19:18:39 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $
#ifndef MesaDrvSrcDir
#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv
@@ -16,7 +16,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
#if BuildXF86DRI
- DRI_DEFINES = GlxDefines -DDRIVERTS
+ DRI_DEFINES = GlxDefines
DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \
-I$(INCLUDESRC) -I$(INCLUDESRC)/GL \
-I$(GLXLIBSRC)/mesa/dri \
diff --git a/xc/lib/GL/mesa/src/drv/i810/Imakefile b/xc/lib/GL/mesa/src/drv/i810/Imakefile
index 9d98073d8..21d6e65a4 100644
--- a/xc/lib/GL/mesa/src/drv/i810/Imakefile
+++ b/xc/lib/GL/mesa/src/drv/i810/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile,v 1.18 2001/04/03 02:29:35 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile,v 1.19 2001/05/10 16:56:11 dawes Exp $
#include <Threads.tmpl>
diff --git a/xc/lib/GL/mesa/src/drv/i810/Imakefile.inc b/xc/lib/GL/mesa/src/drv/i810/Imakefile.inc
index b6b0aa65b..4069af00c 100644
--- a/xc/lib/GL/mesa/src/drv/i810/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/drv/i810/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile.inc,v 1.1 2001/03/23 19:18:40 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $
#ifndef MesaDrvSrcDir
#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv
@@ -16,7 +16,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
#if BuildXF86DRI
- DRI_DEFINES = GlxDefines -DDRIVERTS
+ DRI_DEFINES = GlxDefines
DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \
-I$(INCLUDESRC) -I$(INCLUDESRC)/GL \
-I$(GLXLIBSRC)/mesa/dri \
diff --git a/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c b/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c
index 3d50bd2f9..54a561a01 100644
--- a/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c
@@ -154,10 +154,10 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
}
/* Check that the DRM driver version is compatible */
- if (sPriv->drmMajor != 1 ||
- sPriv->drmMinor < 1) {
+ if (sPriv->drmMajor != 2 ||
+ sPriv->drmMinor < 0) {
char msg[1000];
- sprintf(msg, "i810 DRI driver expected DRM driver version 1.1.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
+ sprintf(msg, "i810 DRI driver expected DRM driver version 2.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
__driMesaMessage(msg);
return GL_FALSE;
}
diff --git a/xc/lib/GL/mesa/src/drv/mga/Imakefile b/xc/lib/GL/mesa/src/drv/mga/Imakefile
index f19e439aa..b1e1923f8 100644
--- a/xc/lib/GL/mesa/src/drv/mga/Imakefile
+++ b/xc/lib/GL/mesa/src/drv/mga/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile,v 1.19 2001/04/03 02:29:35 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile,v 1.20 2001/05/10 16:56:11 dawes Exp $
#include <Threads.tmpl>
diff --git a/xc/lib/GL/mesa/src/drv/mga/Imakefile.inc b/xc/lib/GL/mesa/src/drv/mga/Imakefile.inc
index e923fc041..5d4ac8b63 100644
--- a/xc/lib/GL/mesa/src/drv/mga/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/drv/mga/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile.inc,v 1.1 2001/03/23 19:18:41 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $
#ifndef MesaDrvSrcDir
#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv
@@ -16,7 +16,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
#if BuildXF86DRI
- DRI_DEFINES = GlxDefines -DDRIVERTS
+ DRI_DEFINES = GlxDefines
DRI_INCLUDES = -I$(GLXLIBSRC)/dri \
-I$(GLXLIBSRC)/glx \
-I$(INCLUDESRC) \
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgadd.c b/xc/lib/GL/mesa/src/drv/mga/mgadd.c
index 706e14bc8..c99e1c98a 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgadd.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgadd.c
@@ -51,7 +51,7 @@
#include "X86/common_x86_asm.h"
#endif
-#define MGA_DATE "20010321"
+#define MGA_DATE "20010622"
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgaregs.h b/xc/lib/GL/mesa/src/drv/mga/mgaregs.h
index 6e381a9cc..fb667c537 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgaregs.h
+++ b/xc/lib/GL/mesa/src/drv/mga/mgaregs.h
@@ -14,9 +14,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * STEPHEN CROWLEY, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * STEPHEN CROWLEY, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -34,1347 +34,1346 @@
* Power Graphic Mode Memory Space Registers
*/
-#define MGAREG_MGA_EXEC 0x0100
-#define MGAREG_AGP_PLL 0x1e4c
-
- #define AGP_PLL_agp2xpllen_MASK 0xfffffffe /* bit 0 */
- #define AGP_PLL_agp2xpllen_disable 0x0
- #define AGP_PLL_agp2xpllen_enable 0x1
-
-#define MGAREG_CFG_OR 0x1e4c
-
- #define CFG_OR_comp_or_MASK 0xfffffff7 /* bit 3 */
- #define CFG_OR_comp_or_disable 0x0
- #define CFG_OR_comp_or_enable 0x8
- #define CFG_OR_compfreq_MASK 0xffffff0f /* bits 4-7 */
- #define CFG_OR_compfreq_SHIFT 4
- #define CFG_OR_comporup_MASK 0xfffff0ff /* bits 8-11 */
- #define CFG_OR_comporup_SHIFT 8
- #define CFG_OR_compordn_MASK 0xffff0fff /* bits 12-15 */
- #define CFG_OR_compordn_SHIFT 12
- #define CFG_OR_e2pq_MASK 0xfffeffff /* bit 16 */
- #define CFG_OR_e2pq_disable 0x0
- #define CFG_OR_e2pq_enable 0x10000
- #define CFG_OR_e2pqbypcsn_MASK 0xfffdffff /* bit 17 */
- #define CFG_OR_e2pqbypcsn_disable 0x0
- #define CFG_OR_e2pqbypcsn_enable 0x20000
- #define CFG_OR_e2pqbypd_MASK 0xfffbffff /* bit 18 */
- #define CFG_OR_e2pqbypd_disable 0x0
- #define CFG_OR_e2pqbypd_enable 0x40000
- #define CFG_OR_e2pbypclk_MASK 0xfff7ffff /* bit 19 */
- #define CFG_OR_e2pbypclk_disable 0x0
- #define CFG_OR_e2pbypclk_enable 0x80000
- #define CFG_OR_e2pbyp_MASK 0xffefffff /* bit 20 */
- #define CFG_OR_e2pbyp_disable 0x0
- #define CFG_OR_e2pbyp_enable 0x100000
- #define CFG_OR_rate_cap_or_MASK 0xff1fffff /* bits 21-23 */
- #define CFG_OR_rate_cap_or_SHIFT 21
- #define CFG_OR_rq_or_MASK 0xe0ffffff /* bits 24-28 */
- #define CFG_OR_rq_or_SHIFT 24
-
-#define MGAREG_ALPHACTRL 0x2c7c
-
- #define AC_src_MASK 0xfffffff0 /* bits 0-3 */
- #define AC_src_zero 0x0 /* val 0, shift 0 */
- #define AC_src_one 0x1 /* val 1, shift 0 */
- #define AC_src_dst_color 0x2 /* val 2, shift 0 */
- #define AC_src_om_dst_color 0x3 /* val 3, shift 0 */
- #define AC_src_src_alpha 0x4 /* val 4, shift 0 */
- #define AC_src_om_src_alpha 0x5 /* val 5, shift 0 */
- #define AC_src_dst_alpha 0x6 /* val 6, shift 0 */
- #define AC_src_om_dst_alpha 0x7 /* val 7, shift 0 */
- #define AC_src_src_alpha_sat 0x8 /* val 8, shift 0 */
- #define AC_dst_MASK 0xffffff0f /* bits 4-7 */
- #define AC_dst_zero 0x0 /* val 0, shift 4 */
- #define AC_dst_one 0x10 /* val 1, shift 4 */
- #define AC_dst_src_color 0x20 /* val 2, shift 4 */
- #define AC_dst_om_src_color 0x30 /* val 3, shift 4 */
- #define AC_dst_src_alpha 0x40 /* val 4, shift 4 */
- #define AC_dst_om_src_alpha 0x50 /* val 5, shift 4 */
- #define AC_dst_dst_alpha 0x60 /* val 6, shift 4 */
- #define AC_dst_om_dst_alpha 0x70 /* val 7, shift 4 */
- #define AC_amode_MASK 0xfffffcff /* bits 8-9 */
- #define AC_amode_FCOL 0x0 /* val 0, shift 8 */
- #define AC_amode_alpha_channel 0x100 /* val 1, shift 8 */
- #define AC_amode_video_alpha 0x200 /* val 2, shift 8 */
- #define AC_amode_RSVD 0x300 /* val 3, shift 8 */
- #define AC_astipple_MASK 0xfffff7ff /* bit 11 */
- #define AC_astipple_disable 0x0
- #define AC_astipple_enable 0x800
- #define AC_aten_MASK 0xffffefff /* bit 12 */
- #define AC_aten_disable 0x0
- #define AC_aten_enable 0x1000
- #define AC_atmode_MASK 0xffff1fff /* bits 13-15 */
- #define AC_atmode_noacmp 0x0 /* val 0, shift 13 */
- #define AC_atmode_ae 0x4000 /* val 2, shift 13 */
- #define AC_atmode_ane 0x6000 /* val 3, shift 13 */
- #define AC_atmode_alt 0x8000 /* val 4, shift 13 */
- #define AC_atmode_alte 0xa000 /* val 5, shift 13 */
- #define AC_atmode_agt 0xc000 /* val 6, shift 13 */
- #define AC_atmode_agte 0xe000 /* val 7, shift 13 */
- #define AC_atref_MASK 0xff00ffff /* bits 16-23 */
- #define AC_atref_SHIFT 16
- #define AC_alphasel_MASK 0xfcffffff /* bits 24-25 */
- #define AC_alphasel_fromtex 0x0 /* val 0, shift 24 */
- #define AC_alphasel_diffused 0x1000000 /* val 1, shift 24 */
- #define AC_alphasel_modulated 0x2000000 /* val 2, shift 24 */
- #define AC_alphasel_trans 0x3000000 /* val 3, shift 24 */
-
-#define MGAREG_ALPHASTART 0x2c70
-#define MGAREG_ALPHAXINC 0x2c74
-#define MGAREG_ALPHAYINC 0x2c78
-#define MGAREG_AR0 0x1c60
-
- #define AR0_ar0_MASK 0xfffc0000 /* bits 0-17 */
- #define AR0_ar0_SHIFT 0
-
-#define MGAREG_AR1 0x1c64
-
- #define AR1_ar1_MASK 0xff000000 /* bits 0-23 */
- #define AR1_ar1_SHIFT 0
-
-#define MGAREG_AR2 0x1c68
-
- #define AR2_ar2_MASK 0xfffc0000 /* bits 0-17 */
- #define AR2_ar2_SHIFT 0
-
-#define MGAREG_AR3 0x1c6c
-
- #define AR3_ar3_MASK 0xff000000 /* bits 0-23 */
- #define AR3_ar3_SHIFT 0
- #define AR3_spage_MASK 0xf8ffffff /* bits 24-26 */
- #define AR3_spage_SHIFT 24
-
-#define MGAREG_AR4 0x1c70
-
- #define AR4_ar4_MASK 0xfffc0000 /* bits 0-17 */
- #define AR4_ar4_SHIFT 0
-
-#define MGAREG_AR5 0x1c74
-
- #define AR5_ar5_MASK 0xfffc0000 /* bits 0-17 */
- #define AR5_ar5_SHIFT 0
-
-#define MGAREG_AR6 0x1c78
-
- #define AR6_ar6_MASK 0xfffc0000 /* bits 0-17 */
- #define AR6_ar6_SHIFT 0
-
-#define MGAREG_BCOL 0x1c20
-#define MGAREG_BESA1CORG 0x3d10
-#define MGAREG_BESA1ORG 0x3d00
-#define MGAREG_BESA2CORG 0x3d14
-#define MGAREG_BESA2ORG 0x3d04
-#define MGAREG_BESB1CORG 0x3d18
-#define MGAREG_BESB1ORG 0x3d08
-#define MGAREG_BESB2CORG 0x3d1c
-#define MGAREG_BESB2ORG 0x3d0c
-#define MGAREG_BESCTL 0x3d20
-
- #define BC_besen_MASK 0xfffffffe /* bit 0 */
- #define BC_besen_disable 0x0
- #define BC_besen_enable 0x1
- #define BC_besv1srcstp_MASK 0xffffffbf /* bit 6 */
- #define BC_besv1srcstp_even 0x0
- #define BC_besv1srcstp_odd 0x40
- #define BC_besv2srcstp_MASK 0xfffffeff /* bit 8 */
- #define BC_besv2srcstp_disable 0x0
- #define BC_besv2srcstp_enable 0x100
- #define BC_beshfen_MASK 0xfffffbff /* bit 10 */
- #define BC_beshfen_disable 0x0
- #define BC_beshfen_enable 0x400
- #define BC_besvfen_MASK 0xfffff7ff /* bit 11 */
- #define BC_besvfen_disable 0x0
- #define BC_besvfen_enable 0x800
- #define BC_beshfixc_MASK 0xffffefff /* bit 12 */
- #define BC_beshfixc_weight 0x0
- #define BC_beshfixc_coeff 0x1000
- #define BC_bescups_MASK 0xfffeffff /* bit 16 */
- #define BC_bescups_disable 0x0
- #define BC_bescups_enable 0x10000
- #define BC_bes420pl_MASK 0xfffdffff /* bit 17 */
- #define BC_bes420pl_422 0x0
- #define BC_bes420pl_420 0x20000
- #define BC_besdith_MASK 0xfffbffff /* bit 18 */
- #define BC_besdith_disable 0x0
- #define BC_besdith_enable 0x40000
- #define BC_beshmir_MASK 0xfff7ffff /* bit 19 */
- #define BC_beshmir_disable 0x0
- #define BC_beshmir_enable 0x80000
- #define BC_besbwen_MASK 0xffefffff /* bit 20 */
- #define BC_besbwen_color 0x0
- #define BC_besbwen_bw 0x100000
- #define BC_besblank_MASK 0xffdfffff /* bit 21 */
- #define BC_besblank_disable 0x0
- #define BC_besblank_enable 0x200000
- #define BC_besfselm_MASK 0xfeffffff /* bit 24 */
- #define BC_besfselm_soft 0x0
- #define BC_besfselm_hard 0x1000000
- #define BC_besfsel_MASK 0xf9ffffff /* bits 25-26 */
- #define BC_besfsel_a1 0x0 /* val 0, shift 25 */
- #define BC_besfsel_a2 0x2000000 /* val 1, shift 25 */
- #define BC_besfsel_b1 0x4000000 /* val 2, shift 25 */
- #define BC_besfsel_b2 0x6000000 /* val 3, shift 25 */
-
-#define MGAREG_BESGLOBCTL 0x3dc0
-
- #define BGC_beshzoom_MASK 0xfffffffe /* bit 0 */
- #define BGC_beshzoom_disable 0x0
- #define BGC_beshzoom_enable 0x1
- #define BGC_beshzoomf_MASK 0xfffffffd /* bit 1 */
- #define BGC_beshzoomf_disable 0x0
- #define BGC_beshzoomf_enable 0x2
- #define BGC_bescorder_MASK 0xfffffff7 /* bit 3 */
- #define BGC_bescorder_even 0x0
- #define BGC_bescorder_odd 0x8
- #define BGC_besreghup_MASK 0xffffffef /* bit 4 */
- #define BGC_besreghup_disable 0x0
- #define BGC_besreghup_enable 0x10
- #define BGC_besvcnt_MASK 0xf000ffff /* bits 16-27 */
- #define BGC_besvcnt_SHIFT 16
-
-#define MGAREG_BESHCOORD 0x3d28
-
- #define BHC_besright_MASK 0xfffff800 /* bits 0-10 */
- #define BHC_besright_SHIFT 0
- #define BHC_besleft_MASK 0xf800ffff /* bits 16-26 */
- #define BHC_besleft_SHIFT 16
-
-#define MGAREG_BESHISCAL 0x3d30
-
- #define BHISF_beshiscal_MASK 0xffe00003 /* bits 2-20 */
- #define BHISF_beshiscal_SHIFT 2
-
-#define MGAREG_BESHSRCEND 0x3d3c
-
- #define BHSE_beshsrcend_MASK 0xfc000003 /* bits 2-25 */
- #define BHSE_beshsrcend_SHIFT 2
-
-#define MGAREG_BESHSRCLST 0x3d50
-
- #define BHSL_beshsrclst_MASK 0xfc00ffff /* bits 16-25 */
- #define BHSL_beshsrclst_SHIFT 16
-
-#define MGAREG_BESHSRCST 0x3d38
-
- #define BHSS_beshsrcst_MASK 0xfc000003 /* bits 2-25 */
- #define BHSS_beshsrcst_SHIFT 2
-
-#define MGAREG_BESPITCH 0x3d24
-
- #define BP_bespitch_MASK 0xfffff000 /* bits 0-11 */
- #define BP_bespitch_SHIFT 0
-
-#define MGAREG_BESSTATUS 0x3dc4
-
- #define BS_besstat_MASK 0xfffffffc /* bits 0-1 */
- #define BS_besstat_a1 0x0 /* val 0, shift 0 */
- #define BS_besstat_a2 0x1 /* val 1, shift 0 */
- #define BS_besstat_b1 0x2 /* val 2, shift 0 */
- #define BS_besstat_b2 0x3 /* val 3, shift 0 */
-
-#define MGAREG_BESV1SRCLST 0x3d54
-
- #define BSF_besv1srclast_MASK 0xfffffc00 /* bits 0-9 */
- #define BSF_besv1srclast_SHIFT 0
-
-#define MGAREG_BESV2SRCLST 0x3d58
-
- #define BSF_besv2srclst_MASK 0xfffffc00 /* bits 0-9 */
- #define BSF_besv2srclst_SHIFT 0
-
-#define MGAREG_BESV1WGHT 0x3d48
-
- #define BSF_besv1wght_MASK 0xffff0003 /* bits 2-15 */
- #define BSF_besv1wght_SHIFT 2
- #define BSF_besv1wghts_MASK 0xfffeffff /* bit 16 */
- #define BSF_besv1wghts_disable 0x0
- #define BSF_besv1wghts_enable 0x10000
-
-#define MGAREG_BESV2WGHT 0x3d4c
-
- #define BSF_besv2wght_MASK 0xffff0003 /* bits 2-15 */
- #define BSF_besv2wght_SHIFT 2
- #define BSF_besv2wghts_MASK 0xfffeffff /* bit 16 */
- #define BSF_besv2wghts_disable 0x0
- #define BSF_besv2wghts_enable 0x10000
-
-#define MGAREG_BESVCOORD 0x3d2c
-
- #define BVC_besbot_MASK 0xfffff800 /* bits 0-10 */
- #define BVC_besbot_SHIFT 0
- #define BVC_bestop_MASK 0xf800ffff /* bits 16-26 */
- #define BVC_bestop_SHIFT 16
-
-#define MGAREG_BESVISCAL 0x3d34
-
- #define BVISF_besviscal_MASK 0xffe00003 /* bits 2-20 */
- #define BVISF_besviscal_SHIFT 2
-
-#define MGAREG_CODECADDR 0x3e44
-#define MGAREG_CODECCTL 0x3e40
-#define MGAREG_CODECHARDPTR 0x3e4c
-#define MGAREG_CODECHOSTPTR 0x3e48
-#define MGAREG_CODECLCODE 0x3e50
-#define MGAREG_CXBNDRY 0x1c80
-
- #define CXB_cxleft_MASK 0xfffff000 /* bits 0-11 */
- #define CXB_cxleft_SHIFT 0
- #define CXB_cxright_MASK 0xf000ffff /* bits 16-27 */
- #define CXB_cxright_SHIFT 16
-
-#define MGAREG_CXLEFT 0x1ca0
-#define MGAREG_CXRIGHT 0x1ca4
-#define MGAREG_DMAMAP30 0x1e30
-#define MGAREG_DMAMAP74 0x1e34
-#define MGAREG_DMAMAPB8 0x1e38
-#define MGAREG_DMAMAPFC 0x1e3c
-#define MGAREG_DMAPAD 0x1c54
-#define MGAREG_DR0_Z32LSB 0x2c50
-#define MGAREG_DR0_Z32MSB 0x2c54
-#define MGAREG_DR2_Z32LSB 0x2c60
-#define MGAREG_DR2_Z32MSB 0x2c64
-#define MGAREG_DR3_Z32LSB 0x2c68
-#define MGAREG_DR3_Z32MSB 0x2c6c
-#define MGAREG_DR0 0x1cc0
-#define MGAREG_DR2 0x1cc8
-#define MGAREG_DR3 0x1ccc
-#define MGAREG_DR4 0x1cd0
-#define MGAREG_DR6 0x1cd8
-#define MGAREG_DR7 0x1cdc
-#define MGAREG_DR8 0x1ce0
-#define MGAREG_DR10 0x1ce8
-#define MGAREG_DR11 0x1cec
-#define MGAREG_DR12 0x1cf0
-#define MGAREG_DR14 0x1cf8
-#define MGAREG_DR15 0x1cfc
-#define MGAREG_DSTORG 0x2cb8
-
- #define DO_dstmap_MASK 0xfffffffe /* bit 0 */
- #define DO_dstmap_fb 0x0
- #define DO_dstmap_sys 0x1
- #define DO_dstacc_MASK 0xfffffffd /* bit 1 */
- #define DO_dstacc_pci 0x0
- #define DO_dstacc_agp 0x2
- #define DO_dstorg_MASK 0x7 /* bits 3-31 */
- #define DO_dstorg_SHIFT 3
-
-#define MGAREG_DWG_INDIR_WT 0x1e80
-#define MGAREG_DWGCTL 0x1c00
-
- #define DC_opcod_MASK 0xfffffff0 /* bits 0-3 */
- #define DC_opcod_line_open 0x0 /* val 0, shift 0 */
- #define DC_opcod_autoline_open 0x1 /* val 1, shift 0 */
- #define DC_opcod_line_close 0x2 /* val 2, shift 0 */
- #define DC_opcod_autoline_close 0x3 /* val 3, shift 0 */
- #define DC_opcod_trap 0x4 /* val 4, shift 0 */
- #define DC_opcod_texture_trap 0x6 /* val 6, shift 0 */
- #define DC_opcod_bitblt 0x8 /* val 8, shift 0 */
- #define DC_opcod_iload 0x9 /* val 9, shift 0 */
- #define DC_atype_MASK 0xffffff8f /* bits 4-6 */
- #define DC_atype_rpl 0x0 /* val 0, shift 4 */
- #define DC_atype_rstr 0x10 /* val 1, shift 4 */
- #define DC_atype_zi 0x30 /* val 3, shift 4 */
- #define DC_atype_blk 0x40 /* val 4, shift 4 */
- #define DC_atype_i 0x70 /* val 7, shift 4 */
- #define DC_linear_MASK 0xffffff7f /* bit 7 */
- #define DC_linear_xy 0x0
- #define DC_linear_linear 0x80
- #define DC_zmode_MASK 0xfffff8ff /* bits 8-10 */
- #define DC_zmode_nozcmp 0x0 /* val 0, shift 8 */
- #define DC_zmode_ze 0x200 /* val 2, shift 8 */
- #define DC_zmode_zne 0x300 /* val 3, shift 8 */
- #define DC_zmode_zlt 0x400 /* val 4, shift 8 */
- #define DC_zmode_zlte 0x500 /* val 5, shift 8 */
- #define DC_zmode_zgt 0x600 /* val 6, shift 8 */
- #define DC_zmode_zgte 0x700 /* val 7, shift 8 */
- #define DC_solid_MASK 0xfffff7ff /* bit 11 */
- #define DC_solid_disable 0x0
- #define DC_solid_enable 0x800
- #define DC_arzero_MASK 0xffffefff /* bit 12 */
- #define DC_arzero_disable 0x0
- #define DC_arzero_enable 0x1000
- #define DC_sgnzero_MASK 0xffffdfff /* bit 13 */
- #define DC_sgnzero_disable 0x0
- #define DC_sgnzero_enable 0x2000
- #define DC_shftzero_MASK 0xffffbfff /* bit 14 */
- #define DC_shftzero_disable 0x0
- #define DC_shftzero_enable 0x4000
- #define DC_bop_MASK 0xfff0ffff /* bits 16-19 */
- #define DC_bop_SHIFT 16
- #define DC_trans_MASK 0xff0fffff /* bits 20-23 */
- #define DC_trans_SHIFT 20
- #define DC_bltmod_MASK 0xe1ffffff /* bits 25-28 */
- #define DC_bltmod_bmonolef 0x0 /* val 0, shift 25 */
- #define DC_bltmod_bmonowf 0x8000000 /* val 4, shift 25 */
- #define DC_bltmod_bplan 0x2000000 /* val 1, shift 25 */
- #define DC_bltmod_bfcol 0x4000000 /* val 2, shift 25 */
- #define DC_bltmod_bu32bgr 0x6000000 /* val 3, shift 25 */
- #define DC_bltmod_bu32rgb 0xe000000 /* val 7, shift 25 */
- #define DC_bltmod_bu24bgr 0x16000000 /* val 11, shift 25 */
- #define DC_bltmod_bu24rgb 0x1e000000 /* val 15, shift 25 */
- #define DC_pattern_MASK 0xdfffffff /* bit 29 */
- #define DC_pattern_disable 0x0
- #define DC_pattern_enable 0x20000000
- #define DC_transc_MASK 0xbfffffff /* bit 30 */
- #define DC_transc_disable 0x0
- #define DC_transc_enable 0x40000000
- #define DC_clipdis_MASK 0x7fffffff /* bit 31 */
- #define DC_clipdis_disable 0x0
- #define DC_clipdis_enable 0x80000000
-
-#define MGAREG_DWGSYNC 0x2c4c
-
- #define DS_dwgsyncaddr_MASK 0x3 /* bits 2-31 */
- #define DS_dwgsyncaddr_SHIFT 2
-
-#define MGAREG_FCOL 0x1c24
-#define MGAREG_FIFOSTATUS 0x1e10
-
- #define FS_fifocount_MASK 0xffffff80 /* bits 0-6 */
- #define FS_fifocount_SHIFT 0
- #define FS_bfull_MASK 0xfffffeff /* bit 8 */
- #define FS_bfull_disable 0x0
- #define FS_bfull_enable 0x100
- #define FS_bempty_MASK 0xfffffdff /* bit 9 */
- #define FS_bempty_disable 0x0
- #define FS_bempty_enable 0x200
-
-#define MGAREG_FOGCOL 0x1cf4
-#define MGAREG_FOGSTART 0x1cc4
-#define MGAREG_FOGXINC 0x1cd4
-#define MGAREG_FOGYINC 0x1ce4
-#define MGAREG_FXBNDRY 0x1c84
-
- #define XA_fxleft_MASK 0xffff0000 /* bits 0-15 */
- #define XA_fxleft_SHIFT 0
- #define XA_fxright_MASK 0xffff /* bits 16-31 */
- #define XA_fxright_SHIFT 16
-
-#define MGAREG_FXLEFT 0x1ca8
-#define MGAREG_FXRIGHT 0x1cac
-#define MGAREG_ICLEAR 0x1e18
-
- #define IC_softrapiclr_MASK 0xfffffffe /* bit 0 */
- #define IC_softrapiclr_disable 0x0
- #define IC_softrapiclr_enable 0x1
- #define IC_pickiclr_MASK 0xfffffffb /* bit 2 */
- #define IC_pickiclr_disable 0x0
- #define IC_pickiclr_enable 0x4
- #define IC_vlineiclr_MASK 0xffffffdf /* bit 5 */
- #define IC_vlineiclr_disable 0x0
- #define IC_vlineiclr_enable 0x20
- #define IC_wiclr_MASK 0xffffff7f /* bit 7 */
- #define IC_wiclr_disable 0x0
- #define IC_wiclr_enable 0x80
- #define IC_wciclr_MASK 0xfffffeff /* bit 8 */
- #define IC_wciclr_disable 0x0
- #define IC_wciclr_enable 0x100
-
-#define MGAREG_IEN 0x1e1c
-
- #define IE_softrapien_MASK 0xfffffffe /* bit 0 */
- #define IE_softrapien_disable 0x0
- #define IE_softrapien_enable 0x1
- #define IE_pickien_MASK 0xfffffffb /* bit 2 */
- #define IE_pickien_disable 0x0
- #define IE_pickien_enable 0x4
- #define IE_vlineien_MASK 0xffffffdf /* bit 5 */
- #define IE_vlineien_disable 0x0
- #define IE_vlineien_enable 0x20
- #define IE_extien_MASK 0xffffffbf /* bit 6 */
- #define IE_extien_disable 0x0
- #define IE_extien_enable 0x40
- #define IE_wien_MASK 0xffffff7f /* bit 7 */
- #define IE_wien_disable 0x0
- #define IE_wien_enable 0x80
- #define IE_wcien_MASK 0xfffffeff /* bit 8 */
- #define IE_wcien_disable 0x0
- #define IE_wcien_enable 0x100
-
-#define MGAREG_LEN 0x1c5c
-#define MGAREG_MACCESS 0x1c04
-
- #define MA_pwidth_MASK 0xfffffffc /* bits 0-1 */
- #define MA_pwidth_8 0x0 /* val 0, shift 0 */
- #define MA_pwidth_16 0x1 /* val 1, shift 0 */
- #define MA_pwidth_32 0x2 /* val 2, shift 0 */
- #define MA_pwidth_24 0x3 /* val 3, shift 0 */
- #define MA_zwidth_MASK 0xffffffe7 /* bits 3-4 */
- #define MA_zwidth_16 0x0 /* val 0, shift 3 */
- #define MA_zwidth_32 0x8 /* val 1, shift 3 */
- #define MA_zwidth_15 0x10 /* val 2, shift 3 */
- #define MA_zwidth_24 0x18 /* val 3, shift 3 */
- #define MA_memreset_MASK 0xffff7fff /* bit 15 */
- #define MA_memreset_disable 0x0
- #define MA_memreset_enable 0x8000
- #define MA_fogen_MASK 0xfbffffff /* bit 26 */
- #define MA_fogen_disable 0x0
- #define MA_fogen_enable 0x4000000
- #define MA_tlutload_MASK 0xdfffffff /* bit 29 */
- #define MA_tlutload_disable 0x0
- #define MA_tlutload_enable 0x20000000
- #define MA_nodither_MASK 0xbfffffff /* bit 30 */
- #define MA_nodither_disable 0x0
- #define MA_nodither_enable 0x40000000
- #define MA_dit555_MASK 0x7fffffff /* bit 31 */
- #define MA_dit555_disable 0x0
- #define MA_dit555_enable 0x80000000
-
-#define MGAREG_MCTLWTST 0x1c08
-
- #define MCWS_casltncy_MASK 0xfffffff8 /* bits 0-2 */
- #define MCWS_casltncy_SHIFT 0
- #define MCWS_rrddelay_MASK 0xffffffcf /* bits 4-5 */
- #define MCWS_rcddelay_MASK 0xfffffe7f /* bits 7-8 */
- #define MCWS_rasmin_MASK 0xffffe3ff /* bits 10-12 */
- #define MCWS_rasmin_SHIFT 10
- #define MCWS_rpdelay_MASK 0xffff3fff /* bits 14-15 */
- #define MCWS_wrdelay_MASK 0xfff3ffff /* bits 18-19 */
- #define MCWS_rddelay_MASK 0xffdfffff /* bit 21 */
- #define MCWS_rddelay_disable 0x0
- #define MCWS_rddelay_enable 0x200000
- #define MCWS_smrdelay_MASK 0xfe7fffff /* bits 23-24 */
- #define MCWS_bwcdelay_MASK 0xf3ffffff /* bits 26-27 */
- #define MCWS_bpldelay_MASK 0x1fffffff /* bits 29-31 */
- #define MCWS_bpldelay_SHIFT 29
-
-#define MGAREG_MEMRDBK 0x1e44
-
- #define MRB_mclkbrd0_MASK 0xfffffff0 /* bits 0-3 */
- #define MRB_mclkbrd0_SHIFT 0
- #define MRB_mclkbrd1_MASK 0xfffffe1f /* bits 5-8 */
- #define MRB_mclkbrd1_SHIFT 5
- #define MRB_strmfctl_MASK 0xff3fffff /* bits 22-23 */
- #define MRB_mrsopcod_MASK 0xe1ffffff /* bits 25-28 */
- #define MRB_mrsopcod_SHIFT 25
-
-#define MGAREG_OPMODE 0x1e54
-
- #define OM_dmamod_MASK 0xfffffff3 /* bits 2-3 */
- #define OM_dmamod_general 0x0 /* val 0, shift 2 */
- #define OM_dmamod_blit 0x4 /* val 1, shift 2 */
- #define OM_dmamod_vector 0x8 /* val 2, shift 2 */
- #define OM_dmamod_vertex 0xc /* val 3, shift 2 */
- #define OM_dmadatasiz_MASK 0xfffffcff /* bits 8-9 */
- #define OM_dmadatasiz_8 0x0 /* val 0, shift 8 */
- #define OM_dmadatasiz_16 0x100 /* val 1, shift 8 */
- #define OM_dmadatasiz_32 0x200 /* val 2, shift 8 */
- #define OM_dirdatasiz_MASK 0xfffcffff /* bits 16-17 */
- #define OM_dirdatasiz_8 0x0 /* val 0, shift 16 */
- #define OM_dirdatasiz_16 0x10000 /* val 1, shift 16 */
- #define OM_dirdatasiz_32 0x20000 /* val 2, shift 16 */
-
-#define MGAREG_PAT0 0x1c10
-#define MGAREG_PAT1 0x1c14
-#define MGAREG_PITCH 0x1c8c
-
- #define P_iy_MASK 0xffffe000 /* bits 0-12 */
- #define P_iy_SHIFT 0
- #define P_ylin_MASK 0xffff7fff /* bit 15 */
- #define P_ylin_disable 0x0
- #define P_ylin_enable 0x8000
-
-#define MGAREG_PLNWT 0x1c1c
-#define MGAREG_PRIMADDRESS 0x1e58
-
- #define PDCA_primod_MASK 0xfffffffc /* bits 0-1 */
- #define PDCA_primod_general 0x0 /* val 0, shift 0 */
- #define PDCA_primod_blit 0x1 /* val 1, shift 0 */
- #define PDCA_primod_vector 0x2 /* val 2, shift 0 */
- #define PDCA_primod_vertex 0x3 /* val 3, shift 0 */
- #define PDCA_primaddress_MASK 0x3 /* bits 2-31 */
- #define PDCA_primaddress_SHIFT 2
-
-#define MGAREG_PRIMEND 0x1e5c
-
- #define PDEA_primnostart_MASK 0xfffffffe /* bit 0 */
- #define PDEA_primnostart_disable 0x0
- #define PDEA_primnostart_enable 0x1
- #define PDEA_pagpxfer_MASK 0xfffffffd /* bit 1 */
- #define PDEA_pagpxfer_disable 0x0
- #define PDEA_pagpxfer_enable 0x2
- #define PDEA_primend_MASK 0x3 /* bits 2-31 */
- #define PDEA_primend_SHIFT 2
-
-#define MGAREG_PRIMPTR 0x1e50
-
- #define PLS_primptren0_MASK 0xfffffffe /* bit 0 */
- #define PLS_primptren0_disable 0x0
- #define PLS_primptren0_enable 0x1
- #define PLS_primptren1_MASK 0xfffffffd /* bit 1 */
- #define PLS_primptren1_disable 0x0
- #define PLS_primptren1_enable 0x2
- #define PLS_primptr_MASK 0x7 /* bits 3-31 */
- #define PLS_primptr_SHIFT 3
-
-#define MGAREG_RST 0x1e40
-
- #define R_softreset_MASK 0xfffffffe /* bit 0 */
- #define R_softreset_disable 0x0
- #define R_softreset_enable 0x1
- #define R_softextrst_MASK 0xfffffffd /* bit 1 */
- #define R_softextrst_disable 0x0
- #define R_softextrst_enable 0x2
-
-#define MGAREG_SECADDRESS 0x2c40
-
- #define SDCA_secmod_MASK 0xfffffffc /* bits 0-1 */
- #define SDCA_secmod_general 0x0 /* val 0, shift 0 */
- #define SDCA_secmod_blit 0x1 /* val 1, shift 0 */
- #define SDCA_secmod_vector 0x2 /* val 2, shift 0 */
- #define SDCA_secmod_vertex 0x3 /* val 3, shift 0 */
- #define SDCA_secaddress_MASK 0x3 /* bits 2-31 */
- #define SDCA_secaddress_SHIFT 2
-
-#define MGAREG_SECEND 0x2c44
-
- #define SDEA_sagpxfer_MASK 0xfffffffd /* bit 1 */
- #define SDEA_sagpxfer_disable 0x0
- #define SDEA_sagpxfer_enable 0x2
- #define SDEA_secend_MASK 0x3 /* bits 2-31 */
- #define SDEA_secend_SHIFT 2
-
-#define MGAREG_SETUPADDRESS 0x2cd0
-
- #define SETADD_mode_MASK 0xfffffffc /* bits 0-1 */
- #define SETADD_mode_vertlist 0x0 /* val 0, shift 0 */
- #define SETADD_address_MASK 0x3 /* bits 2-31 */
- #define SETADD_address_SHIFT 2
-
-#define MGAREG_SETUPEND 0x2cd4
-
- #define SETEND_agpxfer_MASK 0xfffffffd /* bit 1 */
- #define SETEND_agpxfer_disable 0x0
- #define SETEND_agpxfer_enable 0x2
- #define SETEND_address_MASK 0x3 /* bits 2-31 */
- #define SETEND_address_SHIFT 2
-
-#define MGAREG_SGN 0x1c58
-
- #define S_sdydxl_MASK 0xfffffffe /* bit 0 */
- #define S_sdydxl_y 0x0
- #define S_sdydxl_x 0x1
- #define S_scanleft_MASK 0xfffffffe /* bit 0 */
- #define S_scanleft_disable 0x0
- #define S_scanleft_enable 0x1
- #define S_sdxl_MASK 0xfffffffd /* bit 1 */
- #define S_sdxl_pos 0x0
- #define S_sdxl_neg 0x2
- #define S_sdy_MASK 0xfffffffb /* bit 2 */
- #define S_sdy_pos 0x0
- #define S_sdy_neg 0x4
- #define S_sdxr_MASK 0xffffffdf /* bit 5 */
- #define S_sdxr_pos 0x0
- #define S_sdxr_neg 0x20
- #define S_brkleft_MASK 0xfffffeff /* bit 8 */
- #define S_brkleft_disable 0x0
- #define S_brkleft_enable 0x100
- #define S_errorinit_MASK 0x7fffffff /* bit 31 */
- #define S_errorinit_disable 0x0
- #define S_errorinit_enable 0x80000000
-
-#define MGAREG_SHIFT 0x1c50
-
- #define FSC_x_off_MASK 0xfffffff0 /* bits 0-3 */
- #define FSC_x_off_SHIFT 0
- #define FSC_funcnt_MASK 0xffffff80 /* bits 0-6 */
- #define FSC_funcnt_SHIFT 0
- #define FSC_y_off_MASK 0xffffff8f /* bits 4-6 */
- #define FSC_y_off_SHIFT 4
- #define FSC_funoff_MASK 0xffc0ffff /* bits 16-21 */
- #define FSC_funoff_SHIFT 16
- #define FSC_stylelen_MASK 0xffc0ffff /* bits 16-21 */
- #define FSC_stylelen_SHIFT 16
-
-#define MGAREG_SOFTRAP 0x2c48
-
- #define STH_softraphand_MASK 0x3 /* bits 2-31 */
- #define STH_softraphand_SHIFT 2
-
-#define MGAREG_SPECBSTART 0x2c98
-#define MGAREG_SPECBXINC 0x2c9c
-#define MGAREG_SPECBYINC 0x2ca0
-#define MGAREG_SPECGSTART 0x2c8c
-#define MGAREG_SPECGXINC 0x2c90
-#define MGAREG_SPECGYINC 0x2c94
-#define MGAREG_SPECRSTART 0x2c80
-#define MGAREG_SPECRXINC 0x2c84
-#define MGAREG_SPECRYINC 0x2c88
-#define MGAREG_SRC0 0x1c30
-#define MGAREG_SRC1 0x1c34
-#define MGAREG_SRC2 0x1c38
-#define MGAREG_SRC3 0x1c3c
-#define MGAREG_SRCORG 0x2cb4
-
- #define SO_srcmap_MASK 0xfffffffe /* bit 0 */
- #define SO_srcmap_fb 0x0
- #define SO_srcmap_sys 0x1
- #define SO_srcacc_MASK 0xfffffffd /* bit 1 */
- #define SO_srcacc_pci 0x0
- #define SO_srcacc_agp 0x2
- #define SO_srcorg_MASK 0x7 /* bits 3-31 */
- #define SO_srcorg_SHIFT 3
-
-#define MGAREG_STATUS 0x1e14
-
- #define STAT_softrapen_MASK 0xfffffffe /* bit 0 */
- #define STAT_softrapen_disable 0x0
- #define STAT_softrapen_enable 0x1
- #define STAT_pickpen_MASK 0xfffffffb /* bit 2 */
- #define STAT_pickpen_disable 0x0
- #define STAT_pickpen_enable 0x4
- #define STAT_vsyncsts_MASK 0xfffffff7 /* bit 3 */
- #define STAT_vsyncsts_disable 0x0
- #define STAT_vsyncsts_enable 0x8
- #define STAT_vsyncpen_MASK 0xffffffef /* bit 4 */
- #define STAT_vsyncpen_disable 0x0
- #define STAT_vsyncpen_enable 0x10
- #define STAT_vlinepen_MASK 0xffffffdf /* bit 5 */
- #define STAT_vlinepen_disable 0x0
- #define STAT_vlinepen_enable 0x20
- #define STAT_extpen_MASK 0xffffffbf /* bit 6 */
- #define STAT_extpen_disable 0x0
- #define STAT_extpen_enable 0x40
- #define STAT_wpen_MASK 0xffffff7f /* bit 7 */
- #define STAT_wpen_disable 0x0
- #define STAT_wpen_enable 0x80
- #define STAT_wcpen_MASK 0xfffffeff /* bit 8 */
- #define STAT_wcpen_disable 0x0
- #define STAT_wcpen_enable 0x100
- #define STAT_dwgengsts_MASK 0xfffeffff /* bit 16 */
- #define STAT_dwgengsts_disable 0x0
- #define STAT_dwgengsts_enable 0x10000
- #define STAT_endprdmasts_MASK 0xfffdffff /* bit 17 */
- #define STAT_endprdmasts_disable 0x0
- #define STAT_endprdmasts_enable 0x20000
- #define STAT_wbusy_MASK 0xfffbffff /* bit 18 */
- #define STAT_wbusy_disable 0x0
- #define STAT_wbusy_enable 0x40000
- #define STAT_swflag_MASK 0xfffffff /* bits 28-31 */
- #define STAT_swflag_SHIFT 28
-
-#define MGAREG_STENCIL 0x2cc8
-
- #define S_sref_MASK 0xffffff00 /* bits 0-7 */
- #define S_sref_SHIFT 0
- #define S_smsk_MASK 0xffff00ff /* bits 8-15 */
- #define S_smsk_SHIFT 8
- #define S_swtmsk_MASK 0xff00ffff /* bits 16-23 */
- #define S_swtmsk_SHIFT 16
-
-#define MGAREG_STENCILCTL 0x2ccc
-
- #define SC_smode_MASK 0xfffffff8 /* bits 0-2 */
- #define SC_smode_salways 0x0 /* val 0, shift 0 */
- #define SC_smode_snever 0x1 /* val 1, shift 0 */
- #define SC_smode_se 0x2 /* val 2, shift 0 */
- #define SC_smode_sne 0x3 /* val 3, shift 0 */
- #define SC_smode_slt 0x4 /* val 4, shift 0 */
- #define SC_smode_slte 0x5 /* val 5, shift 0 */
- #define SC_smode_sgt 0x6 /* val 6, shift 0 */
- #define SC_smode_sgte 0x7 /* val 7, shift 0 */
- #define SC_sfailop_MASK 0xffffffc7 /* bits 3-5 */
- #define SC_sfailop_keep 0x0 /* val 0, shift 3 */
- #define SC_sfailop_zero 0x8 /* val 1, shift 3 */
- #define SC_sfailop_replace 0x10 /* val 2, shift 3 */
- #define SC_sfailop_incrsat 0x18 /* val 3, shift 3 */
- #define SC_sfailop_decrsat 0x20 /* val 4, shift 3 */
- #define SC_sfailop_invert 0x28 /* val 5, shift 3 */
- #define SC_sfailop_incr 0x30 /* val 6, shift 3 */
- #define SC_sfailop_decr 0x38 /* val 7, shift 3 */
- #define SC_szfailop_MASK 0xfffffe3f /* bits 6-8 */
- #define SC_szfailop_keep 0x0 /* val 0, shift 6 */
- #define SC_szfailop_zero 0x40 /* val 1, shift 6 */
- #define SC_szfailop_replace 0x80 /* val 2, shift 6 */
- #define SC_szfailop_incrsat 0xc0 /* val 3, shift 6 */
- #define SC_szfailop_decrsat 0x100 /* val 4, shift 6 */
- #define SC_szfailop_invert 0x140 /* val 5, shift 6 */
- #define SC_szfailop_incr 0x180 /* val 6, shift 6 */
- #define SC_szfailop_decr 0x1c0 /* val 7, shift 6 */
- #define SC_szpassop_MASK 0xfffff1ff /* bits 9-11 */
- #define SC_szpassop_keep 0x0 /* val 0, shift 9 */
- #define SC_szpassop_zero 0x200 /* val 1, shift 9 */
- #define SC_szpassop_replace 0x400 /* val 2, shift 9 */
- #define SC_szpassop_incrsat 0x600 /* val 3, shift 9 */
- #define SC_szpassop_decrsat 0x800 /* val 4, shift 9 */
- #define SC_szpassop_invert 0xa00 /* val 5, shift 9 */
- #define SC_szpassop_incr 0xc00 /* val 6, shift 9 */
- #define SC_szpassop_decr 0xe00 /* val 7, shift 9 */
-
-#define MGAREG_TDUALSTAGE0 0x2cf8
-
- #define TD0_color_arg2_MASK 0xfffffffc /* bits 0-1 */
- #define TD0_color_arg2_diffuse 0x0 /* val 0, shift 0 */
- #define TD0_color_arg2_specular 0x1 /* val 1, shift 0 */
- #define TD0_color_arg2_fcol 0x2 /* val 2, shift 0 */
- #define TD0_color_arg2_prevstage 0x3 /* val 3, shift 0 */
- #define TD0_color_alpha_MASK 0xffffffe3 /* bits 2-4 */
- #define TD0_color_alpha_diffuse 0x0 /* val 0, shift 2 */
- #define TD0_color_alpha_fcol 0x4 /* val 1, shift 2 */
- #define TD0_color_alpha_currtex 0x8 /* val 2, shift 2 */
- #define TD0_color_alpha_prevtex 0xc /* val 3, shift 2 */
- #define TD0_color_alpha_prevstage 0x10 /* val 4, shift 2 */
- #define TD0_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */
- #define TD0_color_arg1_replicatealpha_disable 0x0
- #define TD0_color_arg1_replicatealpha_enable 0x20
- #define TD0_color_arg1_inv_MASK 0xffffffbf /* bit 6 */
- #define TD0_color_arg1_inv_disable 0x0
- #define TD0_color_arg1_inv_enable 0x40
- #define TD0_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */
- #define TD0_color_arg2_replicatealpha_disable 0x0
- #define TD0_color_arg2_replicatealpha_enable 0x80
- #define TD0_color_arg2_inv_MASK 0xfffffeff /* bit 8 */
- #define TD0_color_arg2_inv_disable 0x0
- #define TD0_color_arg2_inv_enable 0x100
- #define TD0_color_alpha1inv_MASK 0xfffffdff /* bit 9 */
- #define TD0_color_alpha1inv_disable 0x0
- #define TD0_color_alpha1inv_enable 0x200
- #define TD0_color_alpha2inv_MASK 0xfffffbff /* bit 10 */
- #define TD0_color_alpha2inv_disable 0x0
- #define TD0_color_alpha2inv_enable 0x400
- #define TD0_color_arg1mul_MASK 0xfffff7ff /* bit 11 */
- #define TD0_color_arg1mul_disable 0x0 /* val 0, shift 11 */
- #define TD0_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */
- #define TD0_color_arg2mul_MASK 0xffffefff /* bit 12 */
- #define TD0_color_arg2mul_disable 0x0 /* val 0, shift 12 */
- #define TD0_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */
- #define TD0_color_arg1add_MASK 0xffffdfff /* bit 13 */
- #define TD0_color_arg1add_disable 0x0 /* val 0, shift 13 */
- #define TD0_color_arg1add_mulout 0x2000 /* val 1, shift 13 */
- #define TD0_color_arg2add_MASK 0xffffbfff /* bit 14 */
- #define TD0_color_arg2add_disable 0x0 /* val 0, shift 14 */
- #define TD0_color_arg2add_mulout 0x4000 /* val 1, shift 14 */
- #define TD0_color_modbright_MASK 0xfffe7fff /* bits 15-16 */
- #define TD0_color_modbright_disable 0x0 /* val 0, shift 15 */
- #define TD0_color_modbright_2x 0x8000 /* val 1, shift 15 */
- #define TD0_color_modbright_4x 0x10000 /* val 2, shift 15 */
- #define TD0_color_add_MASK 0xfffdffff /* bit 17 */
- #define TD0_color_add_sub 0x0 /* val 0, shift 17 */
- #define TD0_color_add_add 0x20000 /* val 1, shift 17 */
- #define TD0_color_add2x_MASK 0xfffbffff /* bit 18 */
- #define TD0_color_add2x_disable 0x0
- #define TD0_color_add2x_enable 0x40000
- #define TD0_color_addbias_MASK 0xfff7ffff /* bit 19 */
- #define TD0_color_addbias_disable 0x0
- #define TD0_color_addbias_enable 0x80000
- #define TD0_color_blend_MASK 0xffefffff /* bit 20 */
- #define TD0_color_blend_disable 0x0
- #define TD0_color_blend_enable 0x100000
- #define TD0_color_sel_MASK 0xff9fffff /* bits 21-22 */
- #define TD0_color_sel_arg1 0x0 /* val 0, shift 21 */
- #define TD0_color_sel_arg2 0x200000 /* val 1, shift 21 */
- #define TD0_color_sel_add 0x400000 /* val 2, shift 21 */
- #define TD0_color_sel_mul 0x600000 /* val 3, shift 21 */
- #define TD0_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */
- #define TD0_alpha_arg1_inv_disable 0x0
- #define TD0_alpha_arg1_inv_enable 0x800000
- #define TD0_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */
- #define TD0_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */
- #define TD0_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */
- #define TD0_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */
- #define TD0_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */
- #define TD0_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */
- #define TD0_alpha_arg2_inv_disable 0x0
- #define TD0_alpha_arg2_inv_enable 0x4000000
- #define TD0_alpha_add_MASK 0xf7ffffff /* bit 27 */
- #define TD0_alpha_add_disable 0x0
- #define TD0_alpha_add_enable 0x8000000
- #define TD0_alpha_addbias_MASK 0xefffffff /* bit 28 */
- #define TD0_alpha_addbias_disable 0x0
- #define TD0_alpha_addbias_enable 0x10000000
- #define TD0_alpha_add2x_MASK 0xdfffffff /* bit 29 */
- #define TD0_alpha_add2x_disable 0x0
- #define TD0_alpha_add2x_enable 0x20000000
- #define TD0_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */
- #define TD0_alpha_modbright_disable 0x0 /* val 0, shift 28 */
- #define TD0_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */
- #define TD0_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */
- #define TD0_alpha_sel_MASK 0x3fffffff /* bits 30-31 */
- #define TD0_alpha_sel_arg1 0x0 /* val 0, shift 30 */
- #define TD0_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */
- #define TD0_alpha_sel_add 0x80000000 /* val 2, shift 30 */
- #define TD0_alpha_sel_mul 0xc0000000 /* val 3, shift 30 */
-
-#define MGAREG_TDUALSTAGE1 0x2cfc
-
- #define TD1_color_arg2_MASK 0xfffffffc /* bits 0-1 */
- #define TD1_color_arg2_diffuse 0x0 /* val 0, shift 0 */
- #define TD1_color_arg2_specular 0x1 /* val 1, shift 0 */
- #define TD1_color_arg2_fcol 0x2 /* val 2, shift 0 */
- #define TD1_color_arg2_prevstage 0x3 /* val 3, shift 0 */
- #define TD1_color_alpha_MASK 0xffffffe3 /* bits 2-4 */
- #define TD1_color_alpha_diffuse 0x0 /* val 0, shift 2 */
- #define TD1_color_alpha_fcol 0x4 /* val 1, shift 2 */
- #define TD1_color_alpha_tex0 0x8 /* val 2, shift 2 */
- #define TD1_color_alpha_prevtex 0xc /* val 3, shift 2 */
- #define TD1_color_alpha_prevstage 0x10 /* val 4, shift 2 */
- #define TD1_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */
- #define TD1_color_arg1_replicatealpha_disable 0x0
- #define TD1_color_arg1_replicatealpha_enable 0x20
- #define TD1_color_arg1_inv_MASK 0xffffffbf /* bit 6 */
- #define TD1_color_arg1_inv_disable 0x0
- #define TD1_color_arg1_inv_enable 0x40
- #define TD1_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */
- #define TD1_color_arg2_replicatealpha_disable 0x0
- #define TD1_color_arg2_replicatealpha_enable 0x80
- #define TD1_color_arg2_inv_MASK 0xfffffeff /* bit 8 */
- #define TD1_color_arg2_inv_disable 0x0
- #define TD1_color_arg2_inv_enable 0x100
- #define TD1_color_alpha1inv_MASK 0xfffffdff /* bit 9 */
- #define TD1_color_alpha1inv_disable 0x0
- #define TD1_color_alpha1inv_enable 0x200
- #define TD1_color_alpha2inv_MASK 0xfffffbff /* bit 10 */
- #define TD1_color_alpha2inv_disable 0x0
- #define TD1_color_alpha2inv_enable 0x400
- #define TD1_color_arg1mul_MASK 0xfffff7ff /* bit 11 */
- #define TD1_color_arg1mul_disable 0x0 /* val 0, shift 11 */
- #define TD1_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */
- #define TD1_color_arg2mul_MASK 0xffffefff /* bit 12 */
- #define TD1_color_arg2mul_disable 0x0 /* val 0, shift 12 */
- #define TD1_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */
- #define TD1_color_arg1add_MASK 0xffffdfff /* bit 13 */
- #define TD1_color_arg1add_disable 0x0 /* val 0, shift 13 */
- #define TD1_color_arg1add_mulout 0x2000 /* val 1, shift 13 */
- #define TD1_color_arg2add_MASK 0xffffbfff /* bit 14 */
- #define TD1_color_arg2add_disable 0x0 /* val 0, shift 14 */
- #define TD1_color_arg2add_mulout 0x4000 /* val 1, shift 14 */
- #define TD1_color_modbright_MASK 0xfffe7fff /* bits 15-16 */
- #define TD1_color_modbright_disable 0x0 /* val 0, shift 15 */
- #define TD1_color_modbright_2x 0x8000 /* val 1, shift 15 */
- #define TD1_color_modbright_4x 0x10000 /* val 2, shift 15 */
- #define TD1_color_add_MASK 0xfffdffff /* bit 17 */
- #define TD1_color_add_sub 0x0 /* val 0, shift 17 */
- #define TD1_color_add_add 0x20000 /* val 1, shift 17 */
- #define TD1_color_add2x_MASK 0xfffbffff /* bit 18 */
- #define TD1_color_add2x_disable 0x0
- #define TD1_color_add2x_enable 0x40000
- #define TD1_color_addbias_MASK 0xfff7ffff /* bit 19 */
- #define TD1_color_addbias_disable 0x0
- #define TD1_color_addbias_enable 0x80000
- #define TD1_color_blend_MASK 0xffefffff /* bit 20 */
- #define TD1_color_blend_disable 0x0
- #define TD1_color_blend_enable 0x100000
- #define TD1_color_sel_MASK 0xff9fffff /* bits 21-22 */
- #define TD1_color_sel_arg1 0x0 /* val 0, shift 21 */
- #define TD1_color_sel_arg2 0x200000 /* val 1, shift 21 */
- #define TD1_color_sel_add 0x400000 /* val 2, shift 21 */
- #define TD1_color_sel_mul 0x600000 /* val 3, shift 21 */
- #define TD1_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */
- #define TD1_alpha_arg1_inv_disable 0x0
- #define TD1_alpha_arg1_inv_enable 0x800000
- #define TD1_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */
- #define TD1_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */
- #define TD1_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */
- #define TD1_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */
- #define TD1_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */
- #define TD1_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */
- #define TD1_alpha_arg2_inv_disable 0x0
- #define TD1_alpha_arg2_inv_enable 0x4000000
- #define TD1_alpha_add_MASK 0xf7ffffff /* bit 27 */
- #define TD1_alpha_add_disable 0x0
- #define TD1_alpha_add_enable 0x8000000
- #define TD1_alpha_addbias_MASK 0xefffffff /* bit 28 */
- #define TD1_alpha_addbias_disable 0x0
- #define TD1_alpha_addbias_enable 0x10000000
- #define TD1_alpha_add2x_MASK 0xdfffffff /* bit 29 */
- #define TD1_alpha_add2x_disable 0x0
- #define TD1_alpha_add2x_enable 0x20000000
- #define TD1_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */
- #define TD1_alpha_modbright_disable 0x0 /* val 0, shift 28 */
- #define TD1_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */
- #define TD1_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */
- #define TD1_alpha_sel_MASK 0x3fffffff /* bits 30-31 */
- #define TD1_alpha_sel_arg1 0x0 /* val 0, shift 30 */
- #define TD1_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */
- #define TD1_alpha_sel_add 0x80000000 /* val 2, shift 30 */
- #define TD1_alpha_sel_mul 0xc0000000 /* val 3, shift 30 */
-
-#define MGAREG_TEST0 0x1e48
-
- #define TST_ramtsten_MASK 0xfffffffe /* bit 0 */
- #define TST_ramtsten_disable 0x0
- #define TST_ramtsten_enable 0x1
- #define TST_ramtstdone_MASK 0xfffffffd /* bit 1 */
- #define TST_ramtstdone_disable 0x0
- #define TST_ramtstdone_enable 0x2
- #define TST_wramtstpass_MASK 0xfffffffb /* bit 2 */
- #define TST_wramtstpass_disable 0x0
- #define TST_wramtstpass_enable 0x4
- #define TST_tcachetstpass_MASK 0xfffffff7 /* bit 3 */
- #define TST_tcachetstpass_disable 0x0
- #define TST_tcachetstpass_enable 0x8
- #define TST_tluttstpass_MASK 0xffffffef /* bit 4 */
- #define TST_tluttstpass_disable 0x0
- #define TST_tluttstpass_enable 0x10
- #define TST_luttstpass_MASK 0xffffffdf /* bit 5 */
- #define TST_luttstpass_disable 0x0
- #define TST_luttstpass_enable 0x20
- #define TST_besramtstpass_MASK 0xffffffbf /* bit 6 */
- #define TST_besramtstpass_disable 0x0
- #define TST_besramtstpass_enable 0x40
- #define TST_ringen_MASK 0xfffffeff /* bit 8 */
- #define TST_ringen_disable 0x0
- #define TST_ringen_enable 0x100
- #define TST_apllbyp_MASK 0xfffffdff /* bit 9 */
- #define TST_apllbyp_disable 0x0
- #define TST_apllbyp_enable 0x200
- #define TST_hiten_MASK 0xfffffbff /* bit 10 */
- #define TST_hiten_disable 0x0
- #define TST_hiten_enable 0x400
- #define TST_tmode_MASK 0xffffc7ff /* bits 11-13 */
- #define TST_tmode_SHIFT 11
- #define TST_tclksel_MASK 0xfffe3fff /* bits 14-16 */
- #define TST_tclksel_SHIFT 14
- #define TST_ringcnten_MASK 0xfffdffff /* bit 17 */
- #define TST_ringcnten_disable 0x0
- #define TST_ringcnten_enable 0x20000
- #define TST_ringcnt_MASK 0xc003ffff /* bits 18-29 */
- #define TST_ringcnt_SHIFT 18
- #define TST_ringcntclksl_MASK 0xbfffffff /* bit 30 */
- #define TST_ringcntclksl_disable 0x0
- #define TST_ringcntclksl_enable 0x40000000
- #define TST_biosboot_MASK 0x7fffffff /* bit 31 */
- #define TST_biosboot_disable 0x0
- #define TST_biosboot_enable 0x80000000
-
-#define MGAREG_TEXBORDERCOL 0x2c5c
-#define MGAREG_TEXCTL 0x2c30
-
- #define TMC_tformat_MASK 0xfffffff0 /* bits 0-3 */
- #define TMC_tformat_tw4 0x0 /* val 0, shift 0 */
- #define TMC_tformat_tw8 0x1 /* val 1, shift 0 */
- #define TMC_tformat_tw15 0x2 /* val 2, shift 0 */
- #define TMC_tformat_tw16 0x3 /* val 3, shift 0 */
- #define TMC_tformat_tw12 0x4 /* val 4, shift 0 */
- #define TMC_tformat_tw32 0x6 /* val 6, shift 0 */
- #define TMC_tformat_tw8a 0x7 /* val 7, shift 0 */
- #define TMC_tformat_tw8al 0x8 /* val 8, shift 0 */
- #define TMC_tformat_tw422 0xa /* val 10, shift 0 */
- #define TMC_tpitchlin_MASK 0xfffffeff /* bit 8 */
- #define TMC_tpitchlin_disable 0x0
- #define TMC_tpitchlin_enable 0x100
- #define TMC_tpitchext_MASK 0xfff001ff /* bits 9-19 */
- #define TMC_tpitchext_SHIFT 9
- #define TMC_tpitch_MASK 0xfff8ffff /* bits 16-18 */
- #define TMC_tpitch_SHIFT 16
- #define TMC_owalpha_MASK 0xffbfffff /* bit 22 */
- #define TMC_owalpha_disable 0x0
- #define TMC_owalpha_enable 0x400000
- #define TMC_azeroextend_MASK 0xff7fffff /* bit 23 */
- #define TMC_azeroextend_disable 0x0
- #define TMC_azeroextend_enable 0x800000
- #define TMC_decalckey_MASK 0xfeffffff /* bit 24 */
- #define TMC_decalckey_disable 0x0
- #define TMC_decalckey_enable 0x1000000
- #define TMC_takey_MASK 0xfdffffff /* bit 25 */
- #define TMC_takey_0 0x0
- #define TMC_takey_1 0x2000000
- #define TMC_tamask_MASK 0xfbffffff /* bit 26 */
- #define TMC_tamask_0 0x0
- #define TMC_tamask_1 0x4000000
- #define TMC_clampv_MASK 0xf7ffffff /* bit 27 */
- #define TMC_clampv_disable 0x0
- #define TMC_clampv_enable 0x8000000
- #define TMC_clampu_MASK 0xefffffff /* bit 28 */
- #define TMC_clampu_disable 0x0
- #define TMC_clampu_enable 0x10000000
- #define TMC_tmodulate_MASK 0xdfffffff /* bit 29 */
- #define TMC_tmodulate_disable 0x0
- #define TMC_tmodulate_enable 0x20000000
- #define TMC_strans_MASK 0xbfffffff /* bit 30 */
- #define TMC_strans_disable 0x0
- #define TMC_strans_enable 0x40000000
- #define TMC_itrans_MASK 0x7fffffff /* bit 31 */
- #define TMC_itrans_disable 0x0
- #define TMC_itrans_enable 0x80000000
-
-#define MGAREG_TEXCTL2 0x2c3c
-
- #define TMC_decalblend_MASK 0xfffffffe /* bit 0 */
- #define TMC_decalblend_disable 0x0
- #define TMC_decalblend_enable 0x1
- #define TMC_idecal_MASK 0xfffffffd /* bit 1 */
- #define TMC_idecal_disable 0x0
- #define TMC_idecal_enable 0x2
- #define TMC_decaldis_MASK 0xfffffffb /* bit 2 */
- #define TMC_decaldis_disable 0x0
- #define TMC_decaldis_enable 0x4
- #define TMC_ckstransdis_MASK 0xffffffef /* bit 4 */
- #define TMC_ckstransdis_disable 0x0
- #define TMC_ckstransdis_enable 0x10
- #define TMC_borderen_MASK 0xffffffdf /* bit 5 */
- #define TMC_borderen_disable 0x0
- #define TMC_borderen_enable 0x20
- #define TMC_specen_MASK 0xffffffbf /* bit 6 */
- #define TMC_specen_disable 0x0
- #define TMC_specen_enable 0x40
- #define TMC_dualtex_MASK 0xffffff7f /* bit 7 */
- #define TMC_dualtex_disable 0x0
- #define TMC_dualtex_enable 0x80
- #define TMC_tablefog_MASK 0xfffffeff /* bit 8 */
- #define TMC_tablefog_disable 0x0
- #define TMC_tablefog_enable 0x100
- #define TMC_bumpmap_MASK 0xfffffdff /* bit 9 */
- #define TMC_bumpmap_disable 0x0
- #define TMC_bumpmap_enable 0x200
- #define TMC_map1_MASK 0x7fffffff /* bit 31 */
- #define TMC_map1_disable 0x0
- #define TMC_map1_enable 0x80000000
-
-#define MGAREG_TEXFILTER 0x2c58
-
- #define TF_minfilter_MASK 0xfffffff0 /* bits 0-3 */
- #define TF_minfilter_nrst 0x0 /* val 0, shift 0 */
- #define TF_minfilter_bilin 0x2 /* val 2, shift 0 */
- #define TF_minfilter_cnst 0x3 /* val 3, shift 0 */
- #define TF_minfilter_mm1s 0x8 /* val 8, shift 0 */
- #define TF_minfilter_mm2s 0x9 /* val 9, shift 0 */
- #define TF_minfilter_mm4s 0xa /* val 10, shift 0 */
- #define TF_minfilter_mm8s 0xc /* val 12, shift 0 */
- #define TF_magfilter_MASK 0xffffff0f /* bits 4-7 */
- #define TF_magfilter_nrst 0x0 /* val 0, shift 4 */
- #define TF_magfilter_bilin 0x20 /* val 2, shift 4 */
- #define TF_magfilter_cnst 0x30 /* val 3, shift 4 */
- #define TF_avgstride_MASK 0xfff7ffff /* bit 19 */
- #define TF_avgstride_disable 0x0
- #define TF_avgstride_enable 0x80000
- #define TF_filteralpha_MASK 0xffefffff /* bit 20 */
- #define TF_filteralpha_disable 0x0
- #define TF_filteralpha_enable 0x100000
- #define TF_fthres_MASK 0xe01fffff /* bits 21-28 */
- #define TF_fthres_SHIFT 21
- #define TF_mapnb_MASK 0x1fffffff /* bits 29-31 */
- #define TF_mapnb_SHIFT 29
-
-#define MGAREG_TEXHEIGHT 0x2c2c
-
- #define TH_th_MASK 0xffffffc0 /* bits 0-5 */
- #define TH_th_SHIFT 0
- #define TH_rfh_MASK 0xffff81ff /* bits 9-14 */
- #define TH_rfh_SHIFT 9
- #define TH_thmask_MASK 0xe003ffff /* bits 18-28 */
- #define TH_thmask_SHIFT 18
-
-#define MGAREG_TEXORG 0x2c24
-
- #define TO_texorgmap_MASK 0xfffffffe /* bit 0 */
- #define TO_texorgmap_fb 0x0
- #define TO_texorgmap_sys 0x1
- #define TO_texorgacc_MASK 0xfffffffd /* bit 1 */
- #define TO_texorgacc_pci 0x0
- #define TO_texorgacc_agp 0x2
- #define TO_texorgoffsetsel 0x4
- #define TO_texorg_MASK 0x1f /* bits 5-31 */
- #define TO_texorg_SHIFT 5
-
-#define MGAREG_TEXORG1 0x2ca4
-#define MGAREG_TEXORG2 0x2ca8
-#define MGAREG_TEXORG3 0x2cac
-#define MGAREG_TEXORG4 0x2cb0
-#define MGAREG_TEXTRANS 0x2c34
-
- #define TT_tckey_MASK 0xffff0000 /* bits 0-15 */
- #define TT_tckey_SHIFT 0
- #define TT_tkmask_MASK 0xffff /* bits 16-31 */
- #define TT_tkmask_SHIFT 16
-
-#define MGAREG_TEXTRANSHIGH 0x2c38
-
- #define TT_tckeyh_MASK 0xffff0000 /* bits 0-15 */
- #define TT_tckeyh_SHIFT 0
- #define TT_tkmaskh_MASK 0xffff /* bits 16-31 */
- #define TT_tkmaskh_SHIFT 16
-
-#define MGAREG_TEXWIDTH 0x2c28
-
- #define TW_tw_MASK 0xffffffc0 /* bits 0-5 */
- #define TW_tw_SHIFT 0
- #define TW_rfw_MASK 0xffff81ff /* bits 9-14 */
- #define TW_rfw_SHIFT 9
- #define TW_twmask_MASK 0xe003ffff /* bits 18-28 */
- #define TW_twmask_SHIFT 18
-
-#define MGAREG_TMR0 0x2c00
-#define MGAREG_TMR1 0x2c04
-#define MGAREG_TMR2 0x2c08
-#define MGAREG_TMR3 0x2c0c
-#define MGAREG_TMR4 0x2c10
-#define MGAREG_TMR5 0x2c14
-#define MGAREG_TMR6 0x2c18
-#define MGAREG_TMR7 0x2c1c
-#define MGAREG_TMR8 0x2c20
-#define MGAREG_VBIADDR0 0x3e08
-#define MGAREG_VBIADDR1 0x3e0c
-#define MGAREG_VCOUNT 0x1e20
-#define MGAREG_WACCEPTSEQ 0x1dd4
-
- #define WAS_seqdst0_MASK 0xffffffc0 /* bits 0-5 */
- #define WAS_seqdst0_SHIFT 0
- #define WAS_seqdst1_MASK 0xfffff03f /* bits 6-11 */
- #define WAS_seqdst1_SHIFT 6
- #define WAS_seqdst2_MASK 0xfffc0fff /* bits 12-17 */
- #define WAS_seqdst2_SHIFT 12
- #define WAS_seqdst3_MASK 0xff03ffff /* bits 18-23 */
- #define WAS_seqdst3_SHIFT 18
- #define WAS_seqlen_MASK 0xfcffffff /* bits 24-25 */
- #define WAS_wfirsttag_MASK 0xfbffffff /* bit 26 */
- #define WAS_wfirsttag_disable 0x0
- #define WAS_wfirsttag_enable 0x4000000
- #define WAS_wsametag_MASK 0xf7ffffff /* bit 27 */
- #define WAS_wsametag_disable 0x0
- #define WAS_wsametag_enable 0x8000000
- #define WAS_seqoff_MASK 0xefffffff /* bit 28 */
- #define WAS_seqoff_disable 0x0
- #define WAS_seqoff_enable 0x10000000
-
-#define MGAREG_WCODEADDR 0x1e6c
-
- #define WMA_wcodeaddr_MASK 0xff /* bits 8-31 */
- #define WMA_wcodeaddr_SHIFT 8
-
-#define MGAREG_WFLAG 0x1dc4
-
- #define WF_walustsflag_MASK 0xffffff00 /* bits 0-7 */
- #define WF_walustsflag_SHIFT 0
- #define WF_walucfgflag_MASK 0xffff00ff /* bits 8-15 */
- #define WF_walucfgflag_SHIFT 8
- #define WF_wprgflag_MASK 0xffff /* bits 16-31 */
- #define WF_wprgflag_SHIFT 16
-
-#define MGAREG_WFLAG1 0x1de0
-
- #define WF1_walustsflag1_MASK 0xffffff00 /* bits 0-7 */
- #define WF1_walustsflag1_SHIFT 0
- #define WF1_walucfgflag1_MASK 0xffff00ff /* bits 8-15 */
- #define WF1_walucfgflag1_SHIFT 8
- #define WF1_wprgflag1_MASK 0xffff /* bits 16-31 */
- #define WF1_wprgflag1_SHIFT 16
-
-#define MGAREG_WFLAGNB 0x1e64
-#define MGAREG_WFLAGNB1 0x1e08
-#define MGAREG_WGETMSB 0x1dc8
-
- #define WGV_wgetmsbmin_MASK 0xffffffe0 /* bits 0-4 */
- #define WGV_wgetmsbmin_SHIFT 0
- #define WGV_wgetmsbmax_MASK 0xffffe0ff /* bits 8-12 */
- #define WGV_wgetmsbmax_SHIFT 8
- #define WGV_wbrklefttop_MASK 0xfffeffff /* bit 16 */
- #define WGV_wbrklefttop_disable 0x0
- #define WGV_wbrklefttop_enable 0x10000
- #define WGV_wfastcrop_MASK 0xfffdffff /* bit 17 */
- #define WGV_wfastcrop_disable 0x0
- #define WGV_wfastcrop_enable 0x20000
- #define WGV_wcentersnap_MASK 0xfffbffff /* bit 18 */
- #define WGV_wcentersnap_disable 0x0
- #define WGV_wcentersnap_enable 0x40000
- #define WGV_wbrkrighttop_MASK 0xfff7ffff /* bit 19 */
- #define WGV_wbrkrighttop_disable 0x0
- #define WGV_wbrkrighttop_enable 0x80000
-
-#define MGAREG_WIADDR 0x1dc0
-
- #define WIA_wmode_MASK 0xfffffffc /* bits 0-1 */
- #define WIA_wmode_suspend 0x0 /* val 0, shift 0 */
- #define WIA_wmode_resume 0x1 /* val 1, shift 0 */
- #define WIA_wmode_jump 0x2 /* val 2, shift 0 */
- #define WIA_wmode_start 0x3 /* val 3, shift 0 */
- #define WIA_wagp_MASK 0xfffffffb /* bit 2 */
- #define WIA_wagp_pci 0x0
- #define WIA_wagp_agp 0x4
- #define WIA_wiaddr_MASK 0x7 /* bits 3-31 */
- #define WIA_wiaddr_SHIFT 3
-
-#define MGAREG_WIADDR2 0x1dd8
-
- #define WIA2_wmode_MASK 0xfffffffc /* bits 0-1 */
- #define WIA2_wmode_suspend 0x0 /* val 0, shift 0 */
- #define WIA2_wmode_resume 0x1 /* val 1, shift 0 */
- #define WIA2_wmode_jump 0x2 /* val 2, shift 0 */
- #define WIA2_wmode_start 0x3 /* val 3, shift 0 */
- #define WIA2_wagp_MASK 0xfffffffb /* bit 2 */
- #define WIA2_wagp_pci 0x0
- #define WIA2_wagp_agp 0x4
- #define WIA2_wiaddr_MASK 0x7 /* bits 3-31 */
- #define WIA2_wiaddr_SHIFT 3
-
-#define MGAREG_WIADDRNB 0x1e60
-#define MGAREG_WIADDRNB1 0x1e04
-#define MGAREG_WIADDRNB2 0x1e00
-#define MGAREG_WIMEMADDR 0x1e68
-
- #define WIMA_wimemaddr_MASK 0xffffff00 /* bits 0-7 */
- #define WIMA_wimemaddr_SHIFT 0
-
-#define MGAREG_WIMEMDATA 0x2000
-#define MGAREG_WIMEMDATA1 0x2100
-#define MGAREG_WMISC 0x1e70
-
- #define WM_wucodecache_MASK 0xfffffffe /* bit 0 */
- #define WM_wucodecache_disable 0x0
- #define WM_wucodecache_enable 0x1
- #define WM_wmaster_MASK 0xfffffffd /* bit 1 */
- #define WM_wmaster_disable 0x0
- #define WM_wmaster_enable 0x2
- #define WM_wcacheflush_MASK 0xfffffff7 /* bit 3 */
- #define WM_wcacheflush_disable 0x0
- #define WM_wcacheflush_enable 0x8
-
-#define MGAREG_WR 0x2d00
-#define MGAREG_WVRTXSZ 0x1dcc
-
- #define WVS_wvrtxsz_MASK 0xffffffc0 /* bits 0-5 */
- #define WVS_wvrtxsz_SHIFT 0
- #define WVS_primsz_MASK 0xffffc0ff /* bits 8-13 */
- #define WVS_primsz_SHIFT 8
-
-#define MGAREG_XDST 0x1cb0
-#define MGAREG_XYEND 0x1c44
-
- #define XYEA_x_end_MASK 0xffff0000 /* bits 0-15 */
- #define XYEA_x_end_SHIFT 0
- #define XYEA_y_end_MASK 0xffff /* bits 16-31 */
- #define XYEA_y_end_SHIFT 16
-
-#define MGAREG_XYSTRT 0x1c40
-
- #define XYSA_x_start_MASK 0xffff0000 /* bits 0-15 */
- #define XYSA_x_start_SHIFT 0
- #define XYSA_y_start_MASK 0xffff /* bits 16-31 */
- #define XYSA_y_start_SHIFT 16
-
-#define MGAREG_YBOT 0x1c9c
-#define MGAREG_YDST 0x1c90
-
- #define YA_ydst_MASK 0xff800000 /* bits 0-22 */
- #define YA_ydst_SHIFT 0
- #define YA_sellin_MASK 0x1fffffff /* bits 29-31 */
- #define YA_sellin_SHIFT 29
-
-#define MGAREG_YDSTLEN 0x1c88
-
- #define YDL_length_MASK 0xffff0000 /* bits 0-15 */
- #define YDL_length_SHIFT 0
- #define YDL_yval_MASK 0xffff /* bits 16-31 */
- #define YDL_yval_SHIFT 16
-
-#define MGAREG_YDSTORG 0x1c94
-#define MGAREG_YTOP 0x1c98
-#define MGAREG_ZORG 0x1c0c
-
- #define ZO_zorgmap_MASK 0xfffffffe /* bit 0 */
- #define ZO_zorgmap_fb 0x0
- #define ZO_zorgmap_sys 0x1
- #define ZO_zorgacc_MASK 0xfffffffd /* bit 1 */
- #define ZO_zorgacc_pci 0x0
- #define ZO_zorgacc_agp 0x2
- #define ZO_zorg_MASK 0x3 /* bits 2-31 */
- #define ZO_zorg_SHIFT 2
+#define MGAREG_MGA_EXEC 0x0100
+#define MGAREG_AGP_PLL 0x1e4c
+
+ #define AGP_PLL_agp2xpllen_MASK 0xfffffffe /* bit 0 */
+ #define AGP_PLL_agp2xpllen_disable 0x0
+ #define AGP_PLL_agp2xpllen_enable 0x1
+
+#define MGAREG_CFG_OR 0x1e4c
+
+ #define CFG_OR_comp_or_MASK 0xfffffff7 /* bit 3 */
+ #define CFG_OR_comp_or_disable 0x0
+ #define CFG_OR_comp_or_enable 0x8
+ #define CFG_OR_compfreq_MASK 0xffffff0f /* bits 4-7 */
+ #define CFG_OR_compfreq_SHIFT 4
+ #define CFG_OR_comporup_MASK 0xfffff0ff /* bits 8-11 */
+ #define CFG_OR_comporup_SHIFT 8
+ #define CFG_OR_compordn_MASK 0xffff0fff /* bits 12-15 */
+ #define CFG_OR_compordn_SHIFT 12
+ #define CFG_OR_e2pq_MASK 0xfffeffff /* bit 16 */
+ #define CFG_OR_e2pq_disable 0x0
+ #define CFG_OR_e2pq_enable 0x10000
+ #define CFG_OR_e2pqbypcsn_MASK 0xfffdffff /* bit 17 */
+ #define CFG_OR_e2pqbypcsn_disable 0x0
+ #define CFG_OR_e2pqbypcsn_enable 0x20000
+ #define CFG_OR_e2pqbypd_MASK 0xfffbffff /* bit 18 */
+ #define CFG_OR_e2pqbypd_disable 0x0
+ #define CFG_OR_e2pqbypd_enable 0x40000
+ #define CFG_OR_e2pbypclk_MASK 0xfff7ffff /* bit 19 */
+ #define CFG_OR_e2pbypclk_disable 0x0
+ #define CFG_OR_e2pbypclk_enable 0x80000
+ #define CFG_OR_e2pbyp_MASK 0xffefffff /* bit 20 */
+ #define CFG_OR_e2pbyp_disable 0x0
+ #define CFG_OR_e2pbyp_enable 0x100000
+ #define CFG_OR_rate_cap_or_MASK 0xff1fffff /* bits 21-23 */
+ #define CFG_OR_rate_cap_or_SHIFT 21
+ #define CFG_OR_rq_or_MASK 0xe0ffffff /* bits 24-28 */
+ #define CFG_OR_rq_or_SHIFT 24
+
+#define MGAREG_ALPHACTRL 0x2c7c
+
+ #define AC_src_MASK 0xfffffff0 /* bits 0-3 */
+ #define AC_src_zero 0x0 /* val 0, shift 0 */
+ #define AC_src_one 0x1 /* val 1, shift 0 */
+ #define AC_src_dst_color 0x2 /* val 2, shift 0 */
+ #define AC_src_om_dst_color 0x3 /* val 3, shift 0 */
+ #define AC_src_src_alpha 0x4 /* val 4, shift 0 */
+ #define AC_src_om_src_alpha 0x5 /* val 5, shift 0 */
+ #define AC_src_dst_alpha 0x6 /* val 6, shift 0 */
+ #define AC_src_om_dst_alpha 0x7 /* val 7, shift 0 */
+ #define AC_src_src_alpha_sat 0x8 /* val 8, shift 0 */
+ #define AC_dst_MASK 0xffffff0f /* bits 4-7 */
+ #define AC_dst_zero 0x0 /* val 0, shift 4 */
+ #define AC_dst_one 0x10 /* val 1, shift 4 */
+ #define AC_dst_src_color 0x20 /* val 2, shift 4 */
+ #define AC_dst_om_src_color 0x30 /* val 3, shift 4 */
+ #define AC_dst_src_alpha 0x40 /* val 4, shift 4 */
+ #define AC_dst_om_src_alpha 0x50 /* val 5, shift 4 */
+ #define AC_dst_dst_alpha 0x60 /* val 6, shift 4 */
+ #define AC_dst_om_dst_alpha 0x70 /* val 7, shift 4 */
+ #define AC_amode_MASK 0xfffffcff /* bits 8-9 */
+ #define AC_amode_FCOL 0x0 /* val 0, shift 8 */
+ #define AC_amode_alpha_channel 0x100 /* val 1, shift 8 */
+ #define AC_amode_video_alpha 0x200 /* val 2, shift 8 */
+ #define AC_amode_RSVD 0x300 /* val 3, shift 8 */
+ #define AC_astipple_MASK 0xfffff7ff /* bit 11 */
+ #define AC_astipple_disable 0x0
+ #define AC_astipple_enable 0x800
+ #define AC_aten_MASK 0xffffefff /* bit 12 */
+ #define AC_aten_disable 0x0
+ #define AC_aten_enable 0x1000
+ #define AC_atmode_MASK 0xffff1fff /* bits 13-15 */
+ #define AC_atmode_noacmp 0x0 /* val 0, shift 13 */
+ #define AC_atmode_ae 0x4000 /* val 2, shift 13 */
+ #define AC_atmode_ane 0x6000 /* val 3, shift 13 */
+ #define AC_atmode_alt 0x8000 /* val 4, shift 13 */
+ #define AC_atmode_alte 0xa000 /* val 5, shift 13 */
+ #define AC_atmode_agt 0xc000 /* val 6, shift 13 */
+ #define AC_atmode_agte 0xe000 /* val 7, shift 13 */
+ #define AC_atref_MASK 0xff00ffff /* bits 16-23 */
+ #define AC_atref_SHIFT 16
+ #define AC_alphasel_MASK 0xfcffffff /* bits 24-25 */
+ #define AC_alphasel_fromtex 0x0 /* val 0, shift 24 */
+ #define AC_alphasel_diffused 0x1000000 /* val 1, shift 24 */
+ #define AC_alphasel_modulated 0x2000000 /* val 2, shift 24 */
+ #define AC_alphasel_trans 0x3000000 /* val 3, shift 24 */
+
+#define MGAREG_ALPHASTART 0x2c70
+#define MGAREG_ALPHAXINC 0x2c74
+#define MGAREG_ALPHAYINC 0x2c78
+#define MGAREG_AR0 0x1c60
+
+ #define AR0_ar0_MASK 0xfffc0000 /* bits 0-17 */
+ #define AR0_ar0_SHIFT 0
+
+#define MGAREG_AR1 0x1c64
+
+ #define AR1_ar1_MASK 0xff000000 /* bits 0-23 */
+ #define AR1_ar1_SHIFT 0
+
+#define MGAREG_AR2 0x1c68
+
+ #define AR2_ar2_MASK 0xfffc0000 /* bits 0-17 */
+ #define AR2_ar2_SHIFT 0
+
+#define MGAREG_AR3 0x1c6c
+
+ #define AR3_ar3_MASK 0xff000000 /* bits 0-23 */
+ #define AR3_ar3_SHIFT 0
+ #define AR3_spage_MASK 0xf8ffffff /* bits 24-26 */
+ #define AR3_spage_SHIFT 24
+
+#define MGAREG_AR4 0x1c70
+
+ #define AR4_ar4_MASK 0xfffc0000 /* bits 0-17 */
+ #define AR4_ar4_SHIFT 0
+
+#define MGAREG_AR5 0x1c74
+
+ #define AR5_ar5_MASK 0xfffc0000 /* bits 0-17 */
+ #define AR5_ar5_SHIFT 0
+
+#define MGAREG_AR6 0x1c78
+
+ #define AR6_ar6_MASK 0xfffc0000 /* bits 0-17 */
+ #define AR6_ar6_SHIFT 0
+
+#define MGAREG_BCOL 0x1c20
+#define MGAREG_BESA1CORG 0x3d10
+#define MGAREG_BESA1ORG 0x3d00
+#define MGAREG_BESA2CORG 0x3d14
+#define MGAREG_BESA2ORG 0x3d04
+#define MGAREG_BESB1CORG 0x3d18
+#define MGAREG_BESB1ORG 0x3d08
+#define MGAREG_BESB2CORG 0x3d1c
+#define MGAREG_BESB2ORG 0x3d0c
+#define MGAREG_BESCTL 0x3d20
+
+ #define BC_besen_MASK 0xfffffffe /* bit 0 */
+ #define BC_besen_disable 0x0
+ #define BC_besen_enable 0x1
+ #define BC_besv1srcstp_MASK 0xffffffbf /* bit 6 */
+ #define BC_besv1srcstp_even 0x0
+ #define BC_besv1srcstp_odd 0x40
+ #define BC_besv2srcstp_MASK 0xfffffeff /* bit 8 */
+ #define BC_besv2srcstp_disable 0x0
+ #define BC_besv2srcstp_enable 0x100
+ #define BC_beshfen_MASK 0xfffffbff /* bit 10 */
+ #define BC_beshfen_disable 0x0
+ #define BC_beshfen_enable 0x400
+ #define BC_besvfen_MASK 0xfffff7ff /* bit 11 */
+ #define BC_besvfen_disable 0x0
+ #define BC_besvfen_enable 0x800
+ #define BC_beshfixc_MASK 0xffffefff /* bit 12 */
+ #define BC_beshfixc_weight 0x0
+ #define BC_beshfixc_coeff 0x1000
+ #define BC_bescups_MASK 0xfffeffff /* bit 16 */
+ #define BC_bescups_disable 0x0
+ #define BC_bescups_enable 0x10000
+ #define BC_bes420pl_MASK 0xfffdffff /* bit 17 */
+ #define BC_bes420pl_422 0x0
+ #define BC_bes420pl_420 0x20000
+ #define BC_besdith_MASK 0xfffbffff /* bit 18 */
+ #define BC_besdith_disable 0x0
+ #define BC_besdith_enable 0x40000
+ #define BC_beshmir_MASK 0xfff7ffff /* bit 19 */
+ #define BC_beshmir_disable 0x0
+ #define BC_beshmir_enable 0x80000
+ #define BC_besbwen_MASK 0xffefffff /* bit 20 */
+ #define BC_besbwen_color 0x0
+ #define BC_besbwen_bw 0x100000
+ #define BC_besblank_MASK 0xffdfffff /* bit 21 */
+ #define BC_besblank_disable 0x0
+ #define BC_besblank_enable 0x200000
+ #define BC_besfselm_MASK 0xfeffffff /* bit 24 */
+ #define BC_besfselm_soft 0x0
+ #define BC_besfselm_hard 0x1000000
+ #define BC_besfsel_MASK 0xf9ffffff /* bits 25-26 */
+ #define BC_besfsel_a1 0x0 /* val 0, shift 25 */
+ #define BC_besfsel_a2 0x2000000 /* val 1, shift 25 */
+ #define BC_besfsel_b1 0x4000000 /* val 2, shift 25 */
+ #define BC_besfsel_b2 0x6000000 /* val 3, shift 25 */
+
+#define MGAREG_BESGLOBCTL 0x3dc0
+
+ #define BGC_beshzoom_MASK 0xfffffffe /* bit 0 */
+ #define BGC_beshzoom_disable 0x0
+ #define BGC_beshzoom_enable 0x1
+ #define BGC_beshzoomf_MASK 0xfffffffd /* bit 1 */
+ #define BGC_beshzoomf_disable 0x0
+ #define BGC_beshzoomf_enable 0x2
+ #define BGC_bescorder_MASK 0xfffffff7 /* bit 3 */
+ #define BGC_bescorder_even 0x0
+ #define BGC_bescorder_odd 0x8
+ #define BGC_besreghup_MASK 0xffffffef /* bit 4 */
+ #define BGC_besreghup_disable 0x0
+ #define BGC_besreghup_enable 0x10
+ #define BGC_besvcnt_MASK 0xf000ffff /* bits 16-27 */
+ #define BGC_besvcnt_SHIFT 16
+
+#define MGAREG_BESHCOORD 0x3d28
+
+ #define BHC_besright_MASK 0xfffff800 /* bits 0-10 */
+ #define BHC_besright_SHIFT 0
+ #define BHC_besleft_MASK 0xf800ffff /* bits 16-26 */
+ #define BHC_besleft_SHIFT 16
+
+#define MGAREG_BESHISCAL 0x3d30
+
+ #define BHISF_beshiscal_MASK 0xffe00003 /* bits 2-20 */
+ #define BHISF_beshiscal_SHIFT 2
+
+#define MGAREG_BESHSRCEND 0x3d3c
+
+ #define BHSE_beshsrcend_MASK 0xfc000003 /* bits 2-25 */
+ #define BHSE_beshsrcend_SHIFT 2
+
+#define MGAREG_BESHSRCLST 0x3d50
+
+ #define BHSL_beshsrclst_MASK 0xfc00ffff /* bits 16-25 */
+ #define BHSL_beshsrclst_SHIFT 16
+
+#define MGAREG_BESHSRCST 0x3d38
+
+ #define BHSS_beshsrcst_MASK 0xfc000003 /* bits 2-25 */
+ #define BHSS_beshsrcst_SHIFT 2
+
+#define MGAREG_BESPITCH 0x3d24
+
+ #define BP_bespitch_MASK 0xfffff000 /* bits 0-11 */
+ #define BP_bespitch_SHIFT 0
+
+#define MGAREG_BESSTATUS 0x3dc4
+
+ #define BS_besstat_MASK 0xfffffffc /* bits 0-1 */
+ #define BS_besstat_a1 0x0 /* val 0, shift 0 */
+ #define BS_besstat_a2 0x1 /* val 1, shift 0 */
+ #define BS_besstat_b1 0x2 /* val 2, shift 0 */
+ #define BS_besstat_b2 0x3 /* val 3, shift 0 */
+
+#define MGAREG_BESV1SRCLST 0x3d54
+
+ #define BSF_besv1srclast_MASK 0xfffffc00 /* bits 0-9 */
+ #define BSF_besv1srclast_SHIFT 0
+
+#define MGAREG_BESV2SRCLST 0x3d58
+
+ #define BSF_besv2srclst_MASK 0xfffffc00 /* bits 0-9 */
+ #define BSF_besv2srclst_SHIFT 0
+
+#define MGAREG_BESV1WGHT 0x3d48
+
+ #define BSF_besv1wght_MASK 0xffff0003 /* bits 2-15 */
+ #define BSF_besv1wght_SHIFT 2
+ #define BSF_besv1wghts_MASK 0xfffeffff /* bit 16 */
+ #define BSF_besv1wghts_disable 0x0
+ #define BSF_besv1wghts_enable 0x10000
+
+#define MGAREG_BESV2WGHT 0x3d4c
+
+ #define BSF_besv2wght_MASK 0xffff0003 /* bits 2-15 */
+ #define BSF_besv2wght_SHIFT 2
+ #define BSF_besv2wghts_MASK 0xfffeffff /* bit 16 */
+ #define BSF_besv2wghts_disable 0x0
+ #define BSF_besv2wghts_enable 0x10000
+
+#define MGAREG_BESVCOORD 0x3d2c
+
+ #define BVC_besbot_MASK 0xfffff800 /* bits 0-10 */
+ #define BVC_besbot_SHIFT 0
+ #define BVC_bestop_MASK 0xf800ffff /* bits 16-26 */
+ #define BVC_bestop_SHIFT 16
+
+#define MGAREG_BESVISCAL 0x3d34
+
+ #define BVISF_besviscal_MASK 0xffe00003 /* bits 2-20 */
+ #define BVISF_besviscal_SHIFT 2
+
+#define MGAREG_CODECADDR 0x3e44
+#define MGAREG_CODECCTL 0x3e40
+#define MGAREG_CODECHARDPTR 0x3e4c
+#define MGAREG_CODECHOSTPTR 0x3e48
+#define MGAREG_CODECLCODE 0x3e50
+#define MGAREG_CXBNDRY 0x1c80
+
+ #define CXB_cxleft_MASK 0xfffff000 /* bits 0-11 */
+ #define CXB_cxleft_SHIFT 0
+ #define CXB_cxright_MASK 0xf000ffff /* bits 16-27 */
+ #define CXB_cxright_SHIFT 16
+
+#define MGAREG_CXLEFT 0x1ca0
+#define MGAREG_CXRIGHT 0x1ca4
+#define MGAREG_DMAMAP30 0x1e30
+#define MGAREG_DMAMAP74 0x1e34
+#define MGAREG_DMAMAPB8 0x1e38
+#define MGAREG_DMAMAPFC 0x1e3c
+#define MGAREG_DMAPAD 0x1c54
+#define MGAREG_DR0_Z32LSB 0x2c50
+#define MGAREG_DR0_Z32MSB 0x2c54
+#define MGAREG_DR2_Z32LSB 0x2c60
+#define MGAREG_DR2_Z32MSB 0x2c64
+#define MGAREG_DR3_Z32LSB 0x2c68
+#define MGAREG_DR3_Z32MSB 0x2c6c
+#define MGAREG_DR0 0x1cc0
+#define MGAREG_DR2 0x1cc8
+#define MGAREG_DR3 0x1ccc
+#define MGAREG_DR4 0x1cd0
+#define MGAREG_DR6 0x1cd8
+#define MGAREG_DR7 0x1cdc
+#define MGAREG_DR8 0x1ce0
+#define MGAREG_DR10 0x1ce8
+#define MGAREG_DR11 0x1cec
+#define MGAREG_DR12 0x1cf0
+#define MGAREG_DR14 0x1cf8
+#define MGAREG_DR15 0x1cfc
+#define MGAREG_DSTORG 0x2cb8
+
+ #define DO_dstmap_MASK 0xfffffffe /* bit 0 */
+ #define DO_dstmap_fb 0x0
+ #define DO_dstmap_sys 0x1
+ #define DO_dstacc_MASK 0xfffffffd /* bit 1 */
+ #define DO_dstacc_pci 0x0
+ #define DO_dstacc_agp 0x2
+ #define DO_dstorg_MASK 0x7 /* bits 3-31 */
+ #define DO_dstorg_SHIFT 3
+
+#define MGAREG_DWG_INDIR_WT 0x1e80
+#define MGAREG_DWGCTL 0x1c00
+
+ #define DC_opcod_MASK 0xfffffff0 /* bits 0-3 */
+ #define DC_opcod_line_open 0x0 /* val 0, shift 0 */
+ #define DC_opcod_autoline_open 0x1 /* val 1, shift 0 */
+ #define DC_opcod_line_close 0x2 /* val 2, shift 0 */
+ #define DC_opcod_autoline_close 0x3 /* val 3, shift 0 */
+ #define DC_opcod_trap 0x4 /* val 4, shift 0 */
+ #define DC_opcod_texture_trap 0x6 /* val 6, shift 0 */
+ #define DC_opcod_bitblt 0x8 /* val 8, shift 0 */
+ #define DC_opcod_iload 0x9 /* val 9, shift 0 */
+ #define DC_atype_MASK 0xffffff8f /* bits 4-6 */
+ #define DC_atype_rpl 0x0 /* val 0, shift 4 */
+ #define DC_atype_rstr 0x10 /* val 1, shift 4 */
+ #define DC_atype_zi 0x30 /* val 3, shift 4 */
+ #define DC_atype_blk 0x40 /* val 4, shift 4 */
+ #define DC_atype_i 0x70 /* val 7, shift 4 */
+ #define DC_linear_MASK 0xffffff7f /* bit 7 */
+ #define DC_linear_xy 0x0
+ #define DC_linear_linear 0x80
+ #define DC_zmode_MASK 0xfffff8ff /* bits 8-10 */
+ #define DC_zmode_nozcmp 0x0 /* val 0, shift 8 */
+ #define DC_zmode_ze 0x200 /* val 2, shift 8 */
+ #define DC_zmode_zne 0x300 /* val 3, shift 8 */
+ #define DC_zmode_zlt 0x400 /* val 4, shift 8 */
+ #define DC_zmode_zlte 0x500 /* val 5, shift 8 */
+ #define DC_zmode_zgt 0x600 /* val 6, shift 8 */
+ #define DC_zmode_zgte 0x700 /* val 7, shift 8 */
+ #define DC_solid_MASK 0xfffff7ff /* bit 11 */
+ #define DC_solid_disable 0x0
+ #define DC_solid_enable 0x800
+ #define DC_arzero_MASK 0xffffefff /* bit 12 */
+ #define DC_arzero_disable 0x0
+ #define DC_arzero_enable 0x1000
+ #define DC_sgnzero_MASK 0xffffdfff /* bit 13 */
+ #define DC_sgnzero_disable 0x0
+ #define DC_sgnzero_enable 0x2000
+ #define DC_shftzero_MASK 0xffffbfff /* bit 14 */
+ #define DC_shftzero_disable 0x0
+ #define DC_shftzero_enable 0x4000
+ #define DC_bop_MASK 0xfff0ffff /* bits 16-19 */
+ #define DC_bop_SHIFT 16
+ #define DC_trans_MASK 0xff0fffff /* bits 20-23 */
+ #define DC_trans_SHIFT 20
+ #define DC_bltmod_MASK 0xe1ffffff /* bits 25-28 */
+ #define DC_bltmod_bmonolef 0x0 /* val 0, shift 25 */
+ #define DC_bltmod_bmonowf 0x8000000 /* val 4, shift 25 */
+ #define DC_bltmod_bplan 0x2000000 /* val 1, shift 25 */
+ #define DC_bltmod_bfcol 0x4000000 /* val 2, shift 25 */
+ #define DC_bltmod_bu32bgr 0x6000000 /* val 3, shift 25 */
+ #define DC_bltmod_bu32rgb 0xe000000 /* val 7, shift 25 */
+ #define DC_bltmod_bu24bgr 0x16000000 /* val 11, shift 25 */
+ #define DC_bltmod_bu24rgb 0x1e000000 /* val 15, shift 25 */
+ #define DC_pattern_MASK 0xdfffffff /* bit 29 */
+ #define DC_pattern_disable 0x0
+ #define DC_pattern_enable 0x20000000
+ #define DC_transc_MASK 0xbfffffff /* bit 30 */
+ #define DC_transc_disable 0x0
+ #define DC_transc_enable 0x40000000
+ #define DC_clipdis_MASK 0x7fffffff /* bit 31 */
+ #define DC_clipdis_disable 0x0
+ #define DC_clipdis_enable 0x80000000
+
+#define MGAREG_DWGSYNC 0x2c4c
+
+ #define DS_dwgsyncaddr_MASK 0x3 /* bits 2-31 */
+ #define DS_dwgsyncaddr_SHIFT 2
+
+#define MGAREG_FCOL 0x1c24
+#define MGAREG_FIFOSTATUS 0x1e10
+
+ #define FS_fifocount_MASK 0xffffff80 /* bits 0-6 */
+ #define FS_fifocount_SHIFT 0
+ #define FS_bfull_MASK 0xfffffeff /* bit 8 */
+ #define FS_bfull_disable 0x0
+ #define FS_bfull_enable 0x100
+ #define FS_bempty_MASK 0xfffffdff /* bit 9 */
+ #define FS_bempty_disable 0x0
+ #define FS_bempty_enable 0x200
+
+#define MGAREG_FOGCOL 0x1cf4
+#define MGAREG_FOGSTART 0x1cc4
+#define MGAREG_FOGXINC 0x1cd4
+#define MGAREG_FOGYINC 0x1ce4
+#define MGAREG_FXBNDRY 0x1c84
+
+ #define XA_fxleft_MASK 0xffff0000 /* bits 0-15 */
+ #define XA_fxleft_SHIFT 0
+ #define XA_fxright_MASK 0xffff /* bits 16-31 */
+ #define XA_fxright_SHIFT 16
+
+#define MGAREG_FXLEFT 0x1ca8
+#define MGAREG_FXRIGHT 0x1cac
+#define MGAREG_ICLEAR 0x1e18
+
+ #define IC_softrapiclr_MASK 0xfffffffe /* bit 0 */
+ #define IC_softrapiclr_disable 0x0
+ #define IC_softrapiclr_enable 0x1
+ #define IC_pickiclr_MASK 0xfffffffb /* bit 2 */
+ #define IC_pickiclr_disable 0x0
+ #define IC_pickiclr_enable 0x4
+ #define IC_vlineiclr_MASK 0xffffffdf /* bit 5 */
+ #define IC_vlineiclr_disable 0x0
+ #define IC_vlineiclr_enable 0x20
+ #define IC_wiclr_MASK 0xffffff7f /* bit 7 */
+ #define IC_wiclr_disable 0x0
+ #define IC_wiclr_enable 0x80
+ #define IC_wciclr_MASK 0xfffffeff /* bit 8 */
+ #define IC_wciclr_disable 0x0
+ #define IC_wciclr_enable 0x100
+
+#define MGAREG_IEN 0x1e1c
+
+ #define IE_softrapien_MASK 0xfffffffe /* bit 0 */
+ #define IE_softrapien_disable 0x0
+ #define IE_softrapien_enable 0x1
+ #define IE_pickien_MASK 0xfffffffb /* bit 2 */
+ #define IE_pickien_disable 0x0
+ #define IE_pickien_enable 0x4
+ #define IE_vlineien_MASK 0xffffffdf /* bit 5 */
+ #define IE_vlineien_disable 0x0
+ #define IE_vlineien_enable 0x20
+ #define IE_extien_MASK 0xffffffbf /* bit 6 */
+ #define IE_extien_disable 0x0
+ #define IE_extien_enable 0x40
+ #define IE_wien_MASK 0xffffff7f /* bit 7 */
+ #define IE_wien_disable 0x0
+ #define IE_wien_enable 0x80
+ #define IE_wcien_MASK 0xfffffeff /* bit 8 */
+ #define IE_wcien_disable 0x0
+ #define IE_wcien_enable 0x100
+
+#define MGAREG_LEN 0x1c5c
+#define MGAREG_MACCESS 0x1c04
+
+ #define MA_pwidth_MASK 0xfffffffc /* bits 0-1 */
+ #define MA_pwidth_8 0x0 /* val 0, shift 0 */
+ #define MA_pwidth_16 0x1 /* val 1, shift 0 */
+ #define MA_pwidth_32 0x2 /* val 2, shift 0 */
+ #define MA_pwidth_24 0x3 /* val 3, shift 0 */
+ #define MA_zwidth_MASK 0xffffffe7 /* bits 3-4 */
+ #define MA_zwidth_16 0x0 /* val 0, shift 3 */
+ #define MA_zwidth_32 0x8 /* val 1, shift 3 */
+ #define MA_zwidth_15 0x10 /* val 2, shift 3 */
+ #define MA_zwidth_24 0x18 /* val 3, shift 3 */
+ #define MA_memreset_MASK 0xffff7fff /* bit 15 */
+ #define MA_memreset_disable 0x0
+ #define MA_memreset_enable 0x8000
+ #define MA_fogen_MASK 0xfbffffff /* bit 26 */
+ #define MA_fogen_disable 0x0
+ #define MA_fogen_enable 0x4000000
+ #define MA_tlutload_MASK 0xdfffffff /* bit 29 */
+ #define MA_tlutload_disable 0x0
+ #define MA_tlutload_enable 0x20000000
+ #define MA_nodither_MASK 0xbfffffff /* bit 30 */
+ #define MA_nodither_disable 0x0
+ #define MA_nodither_enable 0x40000000
+ #define MA_dit555_MASK 0x7fffffff /* bit 31 */
+ #define MA_dit555_disable 0x0
+ #define MA_dit555_enable 0x80000000
+
+#define MGAREG_MCTLWTST 0x1c08
+
+ #define MCWS_casltncy_MASK 0xfffffff8 /* bits 0-2 */
+ #define MCWS_casltncy_SHIFT 0
+ #define MCWS_rrddelay_MASK 0xffffffcf /* bits 4-5 */
+ #define MCWS_rcddelay_MASK 0xfffffe7f /* bits 7-8 */
+ #define MCWS_rasmin_MASK 0xffffe3ff /* bits 10-12 */
+ #define MCWS_rasmin_SHIFT 10
+ #define MCWS_rpdelay_MASK 0xffff3fff /* bits 14-15 */
+ #define MCWS_wrdelay_MASK 0xfff3ffff /* bits 18-19 */
+ #define MCWS_rddelay_MASK 0xffdfffff /* bit 21 */
+ #define MCWS_rddelay_disable 0x0
+ #define MCWS_rddelay_enable 0x200000
+ #define MCWS_smrdelay_MASK 0xfe7fffff /* bits 23-24 */
+ #define MCWS_bwcdelay_MASK 0xf3ffffff /* bits 26-27 */
+ #define MCWS_bpldelay_MASK 0x1fffffff /* bits 29-31 */
+ #define MCWS_bpldelay_SHIFT 29
+
+#define MGAREG_MEMRDBK 0x1e44
+
+ #define MRB_mclkbrd0_MASK 0xfffffff0 /* bits 0-3 */
+ #define MRB_mclkbrd0_SHIFT 0
+ #define MRB_mclkbrd1_MASK 0xfffffe1f /* bits 5-8 */
+ #define MRB_mclkbrd1_SHIFT 5
+ #define MRB_strmfctl_MASK 0xff3fffff /* bits 22-23 */
+ #define MRB_mrsopcod_MASK 0xe1ffffff /* bits 25-28 */
+ #define MRB_mrsopcod_SHIFT 25
+
+#define MGAREG_OPMODE 0x1e54
+
+ #define OM_dmamod_MASK 0xfffffff3 /* bits 2-3 */
+ #define OM_dmamod_general 0x0 /* val 0, shift 2 */
+ #define OM_dmamod_blit 0x4 /* val 1, shift 2 */
+ #define OM_dmamod_vector 0x8 /* val 2, shift 2 */
+ #define OM_dmamod_vertex 0xc /* val 3, shift 2 */
+ #define OM_dmadatasiz_MASK 0xfffffcff /* bits 8-9 */
+ #define OM_dmadatasiz_8 0x0 /* val 0, shift 8 */
+ #define OM_dmadatasiz_16 0x100 /* val 1, shift 8 */
+ #define OM_dmadatasiz_32 0x200 /* val 2, shift 8 */
+ #define OM_dirdatasiz_MASK 0xfffcffff /* bits 16-17 */
+ #define OM_dirdatasiz_8 0x0 /* val 0, shift 16 */
+ #define OM_dirdatasiz_16 0x10000 /* val 1, shift 16 */
+ #define OM_dirdatasiz_32 0x20000 /* val 2, shift 16 */
+
+#define MGAREG_PAT0 0x1c10
+#define MGAREG_PAT1 0x1c14
+#define MGAREG_PITCH 0x1c8c
+
+ #define P_iy_MASK 0xffffe000 /* bits 0-12 */
+ #define P_iy_SHIFT 0
+ #define P_ylin_MASK 0xffff7fff /* bit 15 */
+ #define P_ylin_disable 0x0
+ #define P_ylin_enable 0x8000
+
+#define MGAREG_PLNWT 0x1c1c
+#define MGAREG_PRIMADDRESS 0x1e58
+
+ #define PDCA_primod_MASK 0xfffffffc /* bits 0-1 */
+ #define PDCA_primod_general 0x0 /* val 0, shift 0 */
+ #define PDCA_primod_blit 0x1 /* val 1, shift 0 */
+ #define PDCA_primod_vector 0x2 /* val 2, shift 0 */
+ #define PDCA_primod_vertex 0x3 /* val 3, shift 0 */
+ #define PDCA_primaddress_MASK 0x3 /* bits 2-31 */
+ #define PDCA_primaddress_SHIFT 2
+
+#define MGAREG_PRIMEND 0x1e5c
+
+ #define PDEA_primnostart_MASK 0xfffffffe /* bit 0 */
+ #define PDEA_primnostart_disable 0x0
+ #define PDEA_primnostart_enable 0x1
+ #define PDEA_pagpxfer_MASK 0xfffffffd /* bit 1 */
+ #define PDEA_pagpxfer_disable 0x0
+ #define PDEA_pagpxfer_enable 0x2
+ #define PDEA_primend_MASK 0x3 /* bits 2-31 */
+ #define PDEA_primend_SHIFT 2
+
+#define MGAREG_PRIMPTR 0x1e50
+
+ #define PLS_primptren0_MASK 0xfffffffe /* bit 0 */
+ #define PLS_primptren0_disable 0x0
+ #define PLS_primptren0_enable 0x1
+ #define PLS_primptren1_MASK 0xfffffffd /* bit 1 */
+ #define PLS_primptren1_disable 0x0
+ #define PLS_primptren1_enable 0x2
+ #define PLS_primptr_MASK 0x7 /* bits 3-31 */
+ #define PLS_primptr_SHIFT 3
+
+#define MGAREG_RST 0x1e40
+
+ #define R_softreset_MASK 0xfffffffe /* bit 0 */
+ #define R_softreset_disable 0x0
+ #define R_softreset_enable 0x1
+ #define R_softextrst_MASK 0xfffffffd /* bit 1 */
+ #define R_softextrst_disable 0x0
+ #define R_softextrst_enable 0x2
+
+#define MGAREG_SECADDRESS 0x2c40
+
+ #define SDCA_secmod_MASK 0xfffffffc /* bits 0-1 */
+ #define SDCA_secmod_general 0x0 /* val 0, shift 0 */
+ #define SDCA_secmod_blit 0x1 /* val 1, shift 0 */
+ #define SDCA_secmod_vector 0x2 /* val 2, shift 0 */
+ #define SDCA_secmod_vertex 0x3 /* val 3, shift 0 */
+ #define SDCA_secaddress_MASK 0x3 /* bits 2-31 */
+ #define SDCA_secaddress_SHIFT 2
+
+#define MGAREG_SECEND 0x2c44
+
+ #define SDEA_sagpxfer_MASK 0xfffffffd /* bit 1 */
+ #define SDEA_sagpxfer_disable 0x0
+ #define SDEA_sagpxfer_enable 0x2
+ #define SDEA_secend_MASK 0x3 /* bits 2-31 */
+ #define SDEA_secend_SHIFT 2
+
+#define MGAREG_SETUPADDRESS 0x2cd0
+
+ #define SETADD_mode_MASK 0xfffffffc /* bits 0-1 */
+ #define SETADD_mode_vertlist 0x0 /* val 0, shift 0 */
+ #define SETADD_address_MASK 0x3 /* bits 2-31 */
+ #define SETADD_address_SHIFT 2
+
+#define MGAREG_SETUPEND 0x2cd4
+
+ #define SETEND_agpxfer_MASK 0xfffffffd /* bit 1 */
+ #define SETEND_agpxfer_disable 0x0
+ #define SETEND_agpxfer_enable 0x2
+ #define SETEND_address_MASK 0x3 /* bits 2-31 */
+ #define SETEND_address_SHIFT 2
+
+#define MGAREG_SGN 0x1c58
+
+ #define S_sdydxl_MASK 0xfffffffe /* bit 0 */
+ #define S_sdydxl_y 0x0
+ #define S_sdydxl_x 0x1
+ #define S_scanleft_MASK 0xfffffffe /* bit 0 */
+ #define S_scanleft_disable 0x0
+ #define S_scanleft_enable 0x1
+ #define S_sdxl_MASK 0xfffffffd /* bit 1 */
+ #define S_sdxl_pos 0x0
+ #define S_sdxl_neg 0x2
+ #define S_sdy_MASK 0xfffffffb /* bit 2 */
+ #define S_sdy_pos 0x0
+ #define S_sdy_neg 0x4
+ #define S_sdxr_MASK 0xffffffdf /* bit 5 */
+ #define S_sdxr_pos 0x0
+ #define S_sdxr_neg 0x20
+ #define S_brkleft_MASK 0xfffffeff /* bit 8 */
+ #define S_brkleft_disable 0x0
+ #define S_brkleft_enable 0x100
+ #define S_errorinit_MASK 0x7fffffff /* bit 31 */
+ #define S_errorinit_disable 0x0
+ #define S_errorinit_enable 0x80000000
+
+#define MGAREG_SHIFT 0x1c50
+
+ #define FSC_x_off_MASK 0xfffffff0 /* bits 0-3 */
+ #define FSC_x_off_SHIFT 0
+ #define FSC_funcnt_MASK 0xffffff80 /* bits 0-6 */
+ #define FSC_funcnt_SHIFT 0
+ #define FSC_y_off_MASK 0xffffff8f /* bits 4-6 */
+ #define FSC_y_off_SHIFT 4
+ #define FSC_funoff_MASK 0xffc0ffff /* bits 16-21 */
+ #define FSC_funoff_SHIFT 16
+ #define FSC_stylelen_MASK 0xffc0ffff /* bits 16-21 */
+ #define FSC_stylelen_SHIFT 16
+
+#define MGAREG_SOFTRAP 0x2c48
+
+ #define STH_softraphand_MASK 0x3 /* bits 2-31 */
+ #define STH_softraphand_SHIFT 2
+
+#define MGAREG_SPECBSTART 0x2c98
+#define MGAREG_SPECBXINC 0x2c9c
+#define MGAREG_SPECBYINC 0x2ca0
+#define MGAREG_SPECGSTART 0x2c8c
+#define MGAREG_SPECGXINC 0x2c90
+#define MGAREG_SPECGYINC 0x2c94
+#define MGAREG_SPECRSTART 0x2c80
+#define MGAREG_SPECRXINC 0x2c84
+#define MGAREG_SPECRYINC 0x2c88
+#define MGAREG_SRC0 0x1c30
+#define MGAREG_SRC1 0x1c34
+#define MGAREG_SRC2 0x1c38
+#define MGAREG_SRC3 0x1c3c
+#define MGAREG_SRCORG 0x2cb4
+
+ #define SO_srcmap_MASK 0xfffffffe /* bit 0 */
+ #define SO_srcmap_fb 0x0
+ #define SO_srcmap_sys 0x1
+ #define SO_srcacc_MASK 0xfffffffd /* bit 1 */
+ #define SO_srcacc_pci 0x0
+ #define SO_srcacc_agp 0x2
+ #define SO_srcorg_MASK 0x7 /* bits 3-31 */
+ #define SO_srcorg_SHIFT 3
+
+#define MGAREG_STATUS 0x1e14
+
+ #define STAT_softrapen_MASK 0xfffffffe /* bit 0 */
+ #define STAT_softrapen_disable 0x0
+ #define STAT_softrapen_enable 0x1
+ #define STAT_pickpen_MASK 0xfffffffb /* bit 2 */
+ #define STAT_pickpen_disable 0x0
+ #define STAT_pickpen_enable 0x4
+ #define STAT_vsyncsts_MASK 0xfffffff7 /* bit 3 */
+ #define STAT_vsyncsts_disable 0x0
+ #define STAT_vsyncsts_enable 0x8
+ #define STAT_vsyncpen_MASK 0xffffffef /* bit 4 */
+ #define STAT_vsyncpen_disable 0x0
+ #define STAT_vsyncpen_enable 0x10
+ #define STAT_vlinepen_MASK 0xffffffdf /* bit 5 */
+ #define STAT_vlinepen_disable 0x0
+ #define STAT_vlinepen_enable 0x20
+ #define STAT_extpen_MASK 0xffffffbf /* bit 6 */
+ #define STAT_extpen_disable 0x0
+ #define STAT_extpen_enable 0x40
+ #define STAT_wpen_MASK 0xffffff7f /* bit 7 */
+ #define STAT_wpen_disable 0x0
+ #define STAT_wpen_enable 0x80
+ #define STAT_wcpen_MASK 0xfffffeff /* bit 8 */
+ #define STAT_wcpen_disable 0x0
+ #define STAT_wcpen_enable 0x100
+ #define STAT_dwgengsts_MASK 0xfffeffff /* bit 16 */
+ #define STAT_dwgengsts_disable 0x0
+ #define STAT_dwgengsts_enable 0x10000
+ #define STAT_endprdmasts_MASK 0xfffdffff /* bit 17 */
+ #define STAT_endprdmasts_disable 0x0
+ #define STAT_endprdmasts_enable 0x20000
+ #define STAT_wbusy_MASK 0xfffbffff /* bit 18 */
+ #define STAT_wbusy_disable 0x0
+ #define STAT_wbusy_enable 0x40000
+ #define STAT_swflag_MASK 0xfffffff /* bits 28-31 */
+ #define STAT_swflag_SHIFT 28
+
+#define MGAREG_STENCIL 0x2cc8
+
+ #define S_sref_MASK 0xffffff00 /* bits 0-7 */
+ #define S_sref_SHIFT 0
+ #define S_smsk_MASK 0xffff00ff /* bits 8-15 */
+ #define S_smsk_SHIFT 8
+ #define S_swtmsk_MASK 0xff00ffff /* bits 16-23 */
+ #define S_swtmsk_SHIFT 16
+
+#define MGAREG_STENCILCTL 0x2ccc
+
+ #define SC_smode_MASK 0xfffffff8 /* bits 0-2 */
+ #define SC_smode_salways 0x0 /* val 0, shift 0 */
+ #define SC_smode_snever 0x1 /* val 1, shift 0 */
+ #define SC_smode_se 0x2 /* val 2, shift 0 */
+ #define SC_smode_sne 0x3 /* val 3, shift 0 */
+ #define SC_smode_slt 0x4 /* val 4, shift 0 */
+ #define SC_smode_slte 0x5 /* val 5, shift 0 */
+ #define SC_smode_sgt 0x6 /* val 6, shift 0 */
+ #define SC_smode_sgte 0x7 /* val 7, shift 0 */
+ #define SC_sfailop_MASK 0xffffffc7 /* bits 3-5 */
+ #define SC_sfailop_keep 0x0 /* val 0, shift 3 */
+ #define SC_sfailop_zero 0x8 /* val 1, shift 3 */
+ #define SC_sfailop_replace 0x10 /* val 2, shift 3 */
+ #define SC_sfailop_incrsat 0x18 /* val 3, shift 3 */
+ #define SC_sfailop_decrsat 0x20 /* val 4, shift 3 */
+ #define SC_sfailop_invert 0x28 /* val 5, shift 3 */
+ #define SC_sfailop_incr 0x30 /* val 6, shift 3 */
+ #define SC_sfailop_decr 0x38 /* val 7, shift 3 */
+ #define SC_szfailop_MASK 0xfffffe3f /* bits 6-8 */
+ #define SC_szfailop_keep 0x0 /* val 0, shift 6 */
+ #define SC_szfailop_zero 0x40 /* val 1, shift 6 */
+ #define SC_szfailop_replace 0x80 /* val 2, shift 6 */
+ #define SC_szfailop_incrsat 0xc0 /* val 3, shift 6 */
+ #define SC_szfailop_decrsat 0x100 /* val 4, shift 6 */
+ #define SC_szfailop_invert 0x140 /* val 5, shift 6 */
+ #define SC_szfailop_incr 0x180 /* val 6, shift 6 */
+ #define SC_szfailop_decr 0x1c0 /* val 7, shift 6 */
+ #define SC_szpassop_MASK 0xfffff1ff /* bits 9-11 */
+ #define SC_szpassop_keep 0x0 /* val 0, shift 9 */
+ #define SC_szpassop_zero 0x200 /* val 1, shift 9 */
+ #define SC_szpassop_replace 0x400 /* val 2, shift 9 */
+ #define SC_szpassop_incrsat 0x600 /* val 3, shift 9 */
+ #define SC_szpassop_decrsat 0x800 /* val 4, shift 9 */
+ #define SC_szpassop_invert 0xa00 /* val 5, shift 9 */
+ #define SC_szpassop_incr 0xc00 /* val 6, shift 9 */
+ #define SC_szpassop_decr 0xe00 /* val 7, shift 9 */
+
+#define MGAREG_TDUALSTAGE0 0x2cf8
+
+ #define TD0_color_arg2_MASK 0xfffffffc /* bits 0-1 */
+ #define TD0_color_arg2_diffuse 0x0 /* val 0, shift 0 */
+ #define TD0_color_arg2_specular 0x1 /* val 1, shift 0 */
+ #define TD0_color_arg2_fcol 0x2 /* val 2, shift 0 */
+ #define TD0_color_arg2_prevstage 0x3 /* val 3, shift 0 */
+ #define TD0_color_alpha_MASK 0xffffffe3 /* bits 2-4 */
+ #define TD0_color_alpha_diffuse 0x0 /* val 0, shift 2 */
+ #define TD0_color_alpha_fcol 0x4 /* val 1, shift 2 */
+ #define TD0_color_alpha_currtex 0x8 /* val 2, shift 2 */
+ #define TD0_color_alpha_prevtex 0xc /* val 3, shift 2 */
+ #define TD0_color_alpha_prevstage 0x10 /* val 4, shift 2 */
+ #define TD0_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */
+ #define TD0_color_arg1_replicatealpha_disable 0x0
+ #define TD0_color_arg1_replicatealpha_enable 0x20
+ #define TD0_color_arg1_inv_MASK 0xffffffbf /* bit 6 */
+ #define TD0_color_arg1_inv_disable 0x0
+ #define TD0_color_arg1_inv_enable 0x40
+ #define TD0_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */
+ #define TD0_color_arg2_replicatealpha_disable 0x0
+ #define TD0_color_arg2_replicatealpha_enable 0x80
+ #define TD0_color_arg2_inv_MASK 0xfffffeff /* bit 8 */
+ #define TD0_color_arg2_inv_disable 0x0
+ #define TD0_color_arg2_inv_enable 0x100
+ #define TD0_color_alpha1inv_MASK 0xfffffdff /* bit 9 */
+ #define TD0_color_alpha1inv_disable 0x0
+ #define TD0_color_alpha1inv_enable 0x200
+ #define TD0_color_alpha2inv_MASK 0xfffffbff /* bit 10 */
+ #define TD0_color_alpha2inv_disable 0x0
+ #define TD0_color_alpha2inv_enable 0x400
+ #define TD0_color_arg1mul_MASK 0xfffff7ff /* bit 11 */
+ #define TD0_color_arg1mul_arg1 0x0 /* val 0, shift 11 */
+ #define TD0_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */
+ #define TD0_color_arg2mul_MASK 0xffffefff /* bit 12 */
+ #define TD0_color_arg2mul_arg2 0x0 /* val 0, shift 12 */
+ #define TD0_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */
+ #define TD0_color_arg1add_MASK 0xffffdfff /* bit 13 */
+ #define TD0_color_arg1add_arg1 0x0 /* val 0, shift 13 */
+ #define TD0_color_arg1add_mulout 0x2000 /* val 1, shift 13 */
+ #define TD0_color_arg2add_MASK 0xffffbfff /* bit 14 */
+ #define TD0_color_arg2add_arg2 0x0 /* val 0, shift 14 */
+ #define TD0_color_arg2add_mulout 0x4000 /* val 1, shift 14 */
+ #define TD0_color_modbright_MASK 0xfffe7fff /* bits 15-16 */
+ #define TD0_color_modbright_disable 0x0 /* val 0, shift 15 */
+ #define TD0_color_modbright_2x 0x8000 /* val 1, shift 15 */
+ #define TD0_color_modbright_4x 0x10000 /* val 2, shift 15 */
+ #define TD0_color_add_MASK 0xfffdffff /* bit 17 */
+ #define TD0_color_add_sub 0x0 /* val 0, shift 17 */
+ #define TD0_color_add_add 0x20000 /* val 1, shift 17 */
+ #define TD0_color_add2x_MASK 0xfffbffff /* bit 18 */
+ #define TD0_color_add2x_disable 0x0
+ #define TD0_color_add2x_enable 0x40000
+ #define TD0_color_addbias_MASK 0xfff7ffff /* bit 19 */
+ #define TD0_color_addbias_disable 0x0
+ #define TD0_color_addbias_enable 0x80000
+ #define TD0_color_blend_MASK 0xffefffff /* bit 20 */
+ #define TD0_color_blend_disable 0x0
+ #define TD0_color_blend_enable 0x100000
+ #define TD0_color_sel_MASK 0xff9fffff /* bits 21-22 */
+ #define TD0_color_sel_arg1 0x0 /* val 0, shift 21 */
+ #define TD0_color_sel_arg2 0x200000 /* val 1, shift 21 */
+ #define TD0_color_sel_addout 0x400000 /* val 2, shift 21 */
+ #define TD0_color_sel_mulout 0x600000 /* val 3, shift 21 */
+ #define TD0_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */
+ #define TD0_alpha_arg1_inv_disable 0x0
+ #define TD0_alpha_arg1_inv_enable 0x800000
+ #define TD0_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */
+ #define TD0_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */
+ #define TD0_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */
+ #define TD0_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */
+ #define TD0_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */
+ #define TD0_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */
+ #define TD0_alpha_arg2_inv_disable 0x0
+ #define TD0_alpha_arg2_inv_enable 0x4000000
+ #define TD0_alpha_add_MASK 0xf7ffffff /* bit 27 */
+ #define TD0_alpha_add_disable 0x0
+ #define TD0_alpha_add_enable 0x8000000
+ #define TD0_alpha_addbias_MASK 0xefffffff /* bit 28 */
+ #define TD0_alpha_addbias_disable 0x0
+ #define TD0_alpha_addbias_enable 0x10000000
+ #define TD0_alpha_add2x_MASK 0xdfffffff /* bit 29 */
+ #define TD0_alpha_add2x_disable 0x0
+ #define TD0_alpha_add2x_enable 0x20000000
+ #define TD0_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */
+ #define TD0_alpha_modbright_disable 0x0 /* val 0, shift 28 */
+ #define TD0_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */
+ #define TD0_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */
+ #define TD0_alpha_sel_MASK 0x3fffffff /* bits 30-31 */
+ #define TD0_alpha_sel_arg1 0x0 /* val 0, shift 30 */
+ #define TD0_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */
+ #define TD0_alpha_sel_addout 0x80000000 /* val 2, shift 30 */
+ #define TD0_alpha_sel_mulout 0xc0000000 /* val 3, shift 30 */
+
+#define MGAREG_TDUALSTAGE1 0x2cfc
+
+ #define TD1_color_arg2_MASK 0xfffffffc /* bits 0-1 */
+ #define TD1_color_arg2_diffuse 0x0 /* val 0, shift 0 */
+ #define TD1_color_arg2_specular 0x1 /* val 1, shift 0 */
+ #define TD1_color_arg2_fcol 0x2 /* val 2, shift 0 */
+ #define TD1_color_arg2_prevstage 0x3 /* val 3, shift 0 */
+ #define TD1_color_alpha_MASK 0xffffffe3 /* bits 2-4 */
+ #define TD1_color_alpha_diffuse 0x0 /* val 0, shift 2 */
+ #define TD1_color_alpha_fcol 0x4 /* val 1, shift 2 */
+ #define TD1_color_alpha_currtex 0x8 /* val 2, shift 2 */
+ #define TD1_color_alpha_prevtex 0xc /* val 3, shift 2 */
+ #define TD1_color_alpha_prevstage 0x10 /* val 4, shift 2 */
+ #define TD1_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */
+ #define TD1_color_arg1_replicatealpha_disable 0x0
+ #define TD1_color_arg1_replicatealpha_enable 0x20
+ #define TD1_color_arg1_inv_MASK 0xffffffbf /* bit 6 */
+ #define TD1_color_arg1_inv_disable 0x0
+ #define TD1_color_arg1_inv_enable 0x40
+ #define TD1_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */
+ #define TD1_color_arg2_replicatealpha_disable 0x0
+ #define TD1_color_arg2_replicatealpha_enable 0x80
+ #define TD1_color_arg2_inv_MASK 0xfffffeff /* bit 8 */
+ #define TD1_color_arg2_inv_disable 0x0
+ #define TD1_color_arg2_inv_enable 0x100
+ #define TD1_color_alpha1inv_MASK 0xfffffdff /* bit 9 */
+ #define TD1_color_alpha1inv_disable 0x0
+ #define TD1_color_alpha1inv_enable 0x200
+ #define TD1_color_alpha2inv_MASK 0xfffffbff /* bit 10 */
+ #define TD1_color_alpha2inv_disable 0x0
+ #define TD1_color_alpha2inv_enable 0x400
+ #define TD1_color_arg1mul_MASK 0xfffff7ff /* bit 11 */
+ #define TD1_color_arg1mul_arg1 0x0 /* val 0, shift 11 */
+ #define TD1_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */
+ #define TD1_color_arg2mul_MASK 0xffffefff /* bit 12 */
+ #define TD1_color_arg2mul_arg2 0x0 /* val 0, shift 12 */
+ #define TD1_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */
+ #define TD1_color_arg1add_MASK 0xffffdfff /* bit 13 */
+ #define TD1_color_arg1add_arg1 0x0 /* val 0, shift 13 */
+ #define TD1_color_arg1add_mulout 0x2000 /* val 1, shift 13 */
+ #define TD1_color_arg2add_MASK 0xffffbfff /* bit 14 */
+ #define TD1_color_arg2add_arg2 0x0 /* val 0, shift 14 */
+ #define TD1_color_arg2add_mulout 0x4000 /* val 1, shift 14 */
+ #define TD1_color_modbright_MASK 0xfffe7fff /* bits 15-16 */
+ #define TD1_color_modbright_disable 0x0 /* val 0, shift 15 */
+ #define TD1_color_modbright_2x 0x8000 /* val 1, shift 15 */
+ #define TD1_color_modbright_4x 0x10000 /* val 2, shift 15 */
+ #define TD1_color_add_MASK 0xfffdffff /* bit 17 */
+ #define TD1_color_add_sub 0x0 /* val 0, shift 17 */
+ #define TD1_color_add_add 0x20000 /* val 1, shift 17 */
+ #define TD1_color_add2x_MASK 0xfffbffff /* bit 18 */
+ #define TD1_color_add2x_disable 0x0
+ #define TD1_color_add2x_enable 0x40000
+ #define TD1_color_addbias_MASK 0xfff7ffff /* bit 19 */
+ #define TD1_color_addbias_disable 0x0
+ #define TD1_color_addbias_enable 0x80000
+ #define TD1_color_blend_MASK 0xffefffff /* bit 20 */
+ #define TD1_color_blend_disable 0x0
+ #define TD1_color_blend_enable 0x100000
+ #define TD1_color_sel_MASK 0xff9fffff /* bits 21-22 */
+ #define TD1_color_sel_arg1 0x0 /* val 0, shift 21 */
+ #define TD1_color_sel_arg2 0x200000 /* val 1, shift 21 */
+ #define TD1_color_sel_addout 0x400000 /* val 2, shift 21 */
+ #define TD1_color_sel_mulout 0x600000 /* val 3, shift 21 */
+ #define TD1_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */
+ #define TD1_alpha_arg1_inv_disable 0x0
+ #define TD1_alpha_arg1_inv_enable 0x800000
+ #define TD1_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */
+ #define TD1_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */
+ #define TD1_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */
+ #define TD1_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */
+ #define TD1_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */
+ #define TD1_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */
+ #define TD1_alpha_arg2_inv_disable 0x0
+ #define TD1_alpha_arg2_inv_enable 0x4000000
+ #define TD1_alpha_add_MASK 0xf7ffffff /* bit 27 */
+ #define TD1_alpha_add_disable 0x0
+ #define TD1_alpha_add_enable 0x8000000
+ #define TD1_alpha_addbias_MASK 0xefffffff /* bit 28 */
+ #define TD1_alpha_addbias_disable 0x0
+ #define TD1_alpha_addbias_enable 0x10000000
+ #define TD1_alpha_add2x_MASK 0xdfffffff /* bit 29 */
+ #define TD1_alpha_add2x_disable 0x0
+ #define TD1_alpha_add2x_enable 0x20000000
+ #define TD1_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */
+ #define TD1_alpha_modbright_disable 0x0 /* val 0, shift 28 */
+ #define TD1_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */
+ #define TD1_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */
+ #define TD1_alpha_sel_MASK 0x3fffffff /* bits 30-31 */
+ #define TD1_alpha_sel_arg1 0x0 /* val 0, shift 30 */
+ #define TD1_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */
+ #define TD1_alpha_sel_addout 0x80000000 /* val 2, shift 30 */
+ #define TD1_alpha_sel_mulout 0xc0000000 /* val 3, shift 30 */
+
+#define MGAREG_TEST0 0x1e48
+
+ #define TST_ramtsten_MASK 0xfffffffe /* bit 0 */
+ #define TST_ramtsten_disable 0x0
+ #define TST_ramtsten_enable 0x1
+ #define TST_ramtstdone_MASK 0xfffffffd /* bit 1 */
+ #define TST_ramtstdone_disable 0x0
+ #define TST_ramtstdone_enable 0x2
+ #define TST_wramtstpass_MASK 0xfffffffb /* bit 2 */
+ #define TST_wramtstpass_disable 0x0
+ #define TST_wramtstpass_enable 0x4
+ #define TST_tcachetstpass_MASK 0xfffffff7 /* bit 3 */
+ #define TST_tcachetstpass_disable 0x0
+ #define TST_tcachetstpass_enable 0x8
+ #define TST_tluttstpass_MASK 0xffffffef /* bit 4 */
+ #define TST_tluttstpass_disable 0x0
+ #define TST_tluttstpass_enable 0x10
+ #define TST_luttstpass_MASK 0xffffffdf /* bit 5 */
+ #define TST_luttstpass_disable 0x0
+ #define TST_luttstpass_enable 0x20
+ #define TST_besramtstpass_MASK 0xffffffbf /* bit 6 */
+ #define TST_besramtstpass_disable 0x0
+ #define TST_besramtstpass_enable 0x40
+ #define TST_ringen_MASK 0xfffffeff /* bit 8 */
+ #define TST_ringen_disable 0x0
+ #define TST_ringen_enable 0x100
+ #define TST_apllbyp_MASK 0xfffffdff /* bit 9 */
+ #define TST_apllbyp_disable 0x0
+ #define TST_apllbyp_enable 0x200
+ #define TST_hiten_MASK 0xfffffbff /* bit 10 */
+ #define TST_hiten_disable 0x0
+ #define TST_hiten_enable 0x400
+ #define TST_tmode_MASK 0xffffc7ff /* bits 11-13 */
+ #define TST_tmode_SHIFT 11
+ #define TST_tclksel_MASK 0xfffe3fff /* bits 14-16 */
+ #define TST_tclksel_SHIFT 14
+ #define TST_ringcnten_MASK 0xfffdffff /* bit 17 */
+ #define TST_ringcnten_disable 0x0
+ #define TST_ringcnten_enable 0x20000
+ #define TST_ringcnt_MASK 0xc003ffff /* bits 18-29 */
+ #define TST_ringcnt_SHIFT 18
+ #define TST_ringcntclksl_MASK 0xbfffffff /* bit 30 */
+ #define TST_ringcntclksl_disable 0x0
+ #define TST_ringcntclksl_enable 0x40000000
+ #define TST_biosboot_MASK 0x7fffffff /* bit 31 */
+ #define TST_biosboot_disable 0x0
+ #define TST_biosboot_enable 0x80000000
+
+#define MGAREG_TEXBORDERCOL 0x2c5c
+#define MGAREG_TEXCTL 0x2c30
+
+ #define TMC_tformat_MASK 0xfffffff0 /* bits 0-3 */
+ #define TMC_tformat_tw4 0x0 /* val 0, shift 0 */
+ #define TMC_tformat_tw8 0x1 /* val 1, shift 0 */
+ #define TMC_tformat_tw15 0x2 /* val 2, shift 0 */
+ #define TMC_tformat_tw16 0x3 /* val 3, shift 0 */
+ #define TMC_tformat_tw12 0x4 /* val 4, shift 0 */
+ #define TMC_tformat_tw32 0x6 /* val 6, shift 0 */
+ #define TMC_tformat_tw8a 0x7 /* val 7, shift 0 */
+ #define TMC_tformat_tw8al 0x8 /* val 8, shift 0 */
+ #define TMC_tformat_tw422 0xa /* val 10, shift 0 */
+ #define TMC_tpitchlin_MASK 0xfffffeff /* bit 8 */
+ #define TMC_tpitchlin_disable 0x0
+ #define TMC_tpitchlin_enable 0x100
+ #define TMC_tpitchext_MASK 0xfff001ff /* bits 9-19 */
+ #define TMC_tpitchext_SHIFT 9
+ #define TMC_tpitch_MASK 0xfff8ffff /* bits 16-18 */
+ #define TMC_tpitch_SHIFT 16
+ #define TMC_owalpha_MASK 0xffbfffff /* bit 22 */
+ #define TMC_owalpha_disable 0x0
+ #define TMC_owalpha_enable 0x400000
+ #define TMC_azeroextend_MASK 0xff7fffff /* bit 23 */
+ #define TMC_azeroextend_disable 0x0
+ #define TMC_azeroextend_enable 0x800000
+ #define TMC_decalckey_MASK 0xfeffffff /* bit 24 */
+ #define TMC_decalckey_disable 0x0
+ #define TMC_decalckey_enable 0x1000000
+ #define TMC_takey_MASK 0xfdffffff /* bit 25 */
+ #define TMC_takey_0 0x0
+ #define TMC_takey_1 0x2000000
+ #define TMC_tamask_MASK 0xfbffffff /* bit 26 */
+ #define TMC_tamask_0 0x0
+ #define TMC_tamask_1 0x4000000
+ #define TMC_clampv_MASK 0xf7ffffff /* bit 27 */
+ #define TMC_clampv_disable 0x0
+ #define TMC_clampv_enable 0x8000000
+ #define TMC_clampu_MASK 0xefffffff /* bit 28 */
+ #define TMC_clampu_disable 0x0
+ #define TMC_clampu_enable 0x10000000
+ #define TMC_tmodulate_MASK 0xdfffffff /* bit 29 */
+ #define TMC_tmodulate_disable 0x0
+ #define TMC_tmodulate_enable 0x20000000
+ #define TMC_strans_MASK 0xbfffffff /* bit 30 */
+ #define TMC_strans_disable 0x0
+ #define TMC_strans_enable 0x40000000
+ #define TMC_itrans_MASK 0x7fffffff /* bit 31 */
+ #define TMC_itrans_disable 0x0
+ #define TMC_itrans_enable 0x80000000
+
+#define MGAREG_TEXCTL2 0x2c3c
+
+ #define TMC_decalblend_MASK 0xfffffffe /* bit 0 */
+ #define TMC_decalblend_disable 0x0
+ #define TMC_decalblend_enable 0x1
+ #define TMC_idecal_MASK 0xfffffffd /* bit 1 */
+ #define TMC_idecal_disable 0x0
+ #define TMC_idecal_enable 0x2
+ #define TMC_decaldis_MASK 0xfffffffb /* bit 2 */
+ #define TMC_decaldis_disable 0x0
+ #define TMC_decaldis_enable 0x4
+ #define TMC_ckstransdis_MASK 0xffffffef /* bit 4 */
+ #define TMC_ckstransdis_disable 0x0
+ #define TMC_ckstransdis_enable 0x10
+ #define TMC_borderen_MASK 0xffffffdf /* bit 5 */
+ #define TMC_borderen_disable 0x0
+ #define TMC_borderen_enable 0x20
+ #define TMC_specen_MASK 0xffffffbf /* bit 6 */
+ #define TMC_specen_disable 0x0
+ #define TMC_specen_enable 0x40
+ #define TMC_dualtex_MASK 0xffffff7f /* bit 7 */
+ #define TMC_dualtex_disable 0x0
+ #define TMC_dualtex_enable 0x80
+ #define TMC_tablefog_MASK 0xfffffeff /* bit 8 */
+ #define TMC_tablefog_disable 0x0
+ #define TMC_tablefog_enable 0x100
+ #define TMC_bumpmap_MASK 0xfffffdff /* bit 9 */
+ #define TMC_bumpmap_disable 0x0
+ #define TMC_bumpmap_enable 0x200
+ #define TMC_map1_MASK 0x7fffffff /* bit 31 */
+ #define TMC_map1_disable 0x0
+ #define TMC_map1_enable 0x80000000
+
+#define MGAREG_TEXFILTER 0x2c58
+
+ #define TF_minfilter_MASK 0xfffffff0 /* bits 0-3 */
+ #define TF_minfilter_nrst 0x0 /* val 0, shift 0 */
+ #define TF_minfilter_bilin 0x2 /* val 2, shift 0 */
+ #define TF_minfilter_cnst 0x3 /* val 3, shift 0 */
+ #define TF_minfilter_mm1s 0x8 /* val 8, shift 0 */
+ #define TF_minfilter_mm2s 0x9 /* val 9, shift 0 */
+ #define TF_minfilter_mm4s 0xa /* val 10, shift 0 */
+ #define TF_minfilter_mm8s 0xc /* val 12, shift 0 */
+ #define TF_magfilter_MASK 0xffffff0f /* bits 4-7 */
+ #define TF_magfilter_nrst 0x0 /* val 0, shift 4 */
+ #define TF_magfilter_bilin 0x20 /* val 2, shift 4 */
+ #define TF_magfilter_cnst 0x30 /* val 3, shift 4 */
+ #define TF_avgstride_MASK 0xfff7ffff /* bit 19 */
+ #define TF_avgstride_disable 0x0
+ #define TF_avgstride_enable 0x80000
+ #define TF_filteralpha_MASK 0xffefffff /* bit 20 */
+ #define TF_filteralpha_disable 0x0
+ #define TF_filteralpha_enable 0x100000
+ #define TF_fthres_MASK 0xe01fffff /* bits 21-28 */
+ #define TF_fthres_SHIFT 21
+ #define TF_mapnb_MASK 0x1fffffff /* bits 29-31 */
+ #define TF_mapnb_SHIFT 29
+
+#define MGAREG_TEXHEIGHT 0x2c2c
+
+ #define TH_th_MASK 0xffffffc0 /* bits 0-5 */
+ #define TH_th_SHIFT 0
+ #define TH_rfh_MASK 0xffff81ff /* bits 9-14 */
+ #define TH_rfh_SHIFT 9
+ #define TH_thmask_MASK 0xe003ffff /* bits 18-28 */
+ #define TH_thmask_SHIFT 18
+
+#define MGAREG_TEXORG 0x2c24
+
+ #define TO_texorgmap_MASK 0xfffffffe /* bit 0 */
+ #define TO_texorgmap_fb 0x0
+ #define TO_texorgmap_sys 0x1
+ #define TO_texorgacc_MASK 0xfffffffd /* bit 1 */
+ #define TO_texorgacc_pci 0x0
+ #define TO_texorgacc_agp 0x2
+ #define TO_texorgoffsetsel 0x4
+ #define TO_texorg_MASK 0x1f /* bits 5-31 */
+ #define TO_texorg_SHIFT 5
+
+#define MGAREG_TEXORG1 0x2ca4
+#define MGAREG_TEXORG2 0x2ca8
+#define MGAREG_TEXORG3 0x2cac
+#define MGAREG_TEXORG4 0x2cb0
+#define MGAREG_TEXTRANS 0x2c34
+
+ #define TT_tckey_MASK 0xffff0000 /* bits 0-15 */
+ #define TT_tckey_SHIFT 0
+ #define TT_tkmask_MASK 0xffff /* bits 16-31 */
+ #define TT_tkmask_SHIFT 16
+
+#define MGAREG_TEXTRANSHIGH 0x2c38
+
+ #define TT_tckeyh_MASK 0xffff0000 /* bits 0-15 */
+ #define TT_tckeyh_SHIFT 0
+ #define TT_tkmaskh_MASK 0xffff /* bits 16-31 */
+ #define TT_tkmaskh_SHIFT 16
+
+#define MGAREG_TEXWIDTH 0x2c28
+
+ #define TW_tw_MASK 0xffffffc0 /* bits 0-5 */
+ #define TW_tw_SHIFT 0
+ #define TW_rfw_MASK 0xffff81ff /* bits 9-14 */
+ #define TW_rfw_SHIFT 9
+ #define TW_twmask_MASK 0xe003ffff /* bits 18-28 */
+ #define TW_twmask_SHIFT 18
+
+#define MGAREG_TMR0 0x2c00
+#define MGAREG_TMR1 0x2c04
+#define MGAREG_TMR2 0x2c08
+#define MGAREG_TMR3 0x2c0c
+#define MGAREG_TMR4 0x2c10
+#define MGAREG_TMR5 0x2c14
+#define MGAREG_TMR6 0x2c18
+#define MGAREG_TMR7 0x2c1c
+#define MGAREG_TMR8 0x2c20
+#define MGAREG_VBIADDR0 0x3e08
+#define MGAREG_VBIADDR1 0x3e0c
+#define MGAREG_VCOUNT 0x1e20
+#define MGAREG_WACCEPTSEQ 0x1dd4
+
+ #define WAS_seqdst0_MASK 0xffffffc0 /* bits 0-5 */
+ #define WAS_seqdst0_SHIFT 0
+ #define WAS_seqdst1_MASK 0xfffff03f /* bits 6-11 */
+ #define WAS_seqdst1_SHIFT 6
+ #define WAS_seqdst2_MASK 0xfffc0fff /* bits 12-17 */
+ #define WAS_seqdst2_SHIFT 12
+ #define WAS_seqdst3_MASK 0xff03ffff /* bits 18-23 */
+ #define WAS_seqdst3_SHIFT 18
+ #define WAS_seqlen_MASK 0xfcffffff /* bits 24-25 */
+ #define WAS_wfirsttag_MASK 0xfbffffff /* bit 26 */
+ #define WAS_wfirsttag_disable 0x0
+ #define WAS_wfirsttag_enable 0x4000000
+ #define WAS_wsametag_MASK 0xf7ffffff /* bit 27 */
+ #define WAS_wsametag_disable 0x0
+ #define WAS_wsametag_enable 0x8000000
+ #define WAS_seqoff_MASK 0xefffffff /* bit 28 */
+ #define WAS_seqoff_disable 0x0
+ #define WAS_seqoff_enable 0x10000000
+
+#define MGAREG_WCODEADDR 0x1e6c
+
+ #define WMA_wcodeaddr_MASK 0xff /* bits 8-31 */
+ #define WMA_wcodeaddr_SHIFT 8
+
+#define MGAREG_WFLAG 0x1dc4
+
+ #define WF_walustsflag_MASK 0xffffff00 /* bits 0-7 */
+ #define WF_walustsflag_SHIFT 0
+ #define WF_walucfgflag_MASK 0xffff00ff /* bits 8-15 */
+ #define WF_walucfgflag_SHIFT 8
+ #define WF_wprgflag_MASK 0xffff /* bits 16-31 */
+ #define WF_wprgflag_SHIFT 16
+
+#define MGAREG_WFLAG1 0x1de0
+
+ #define WF1_walustsflag1_MASK 0xffffff00 /* bits 0-7 */
+ #define WF1_walustsflag1_SHIFT 0
+ #define WF1_walucfgflag1_MASK 0xffff00ff /* bits 8-15 */
+ #define WF1_walucfgflag1_SHIFT 8
+ #define WF1_wprgflag1_MASK 0xffff /* bits 16-31 */
+ #define WF1_wprgflag1_SHIFT 16
+
+#define MGAREG_WFLAGNB 0x1e64
+#define MGAREG_WFLAGNB1 0x1e08
+#define MGAREG_WGETMSB 0x1dc8
+
+ #define WGV_wgetmsbmin_MASK 0xffffffe0 /* bits 0-4 */
+ #define WGV_wgetmsbmin_SHIFT 0
+ #define WGV_wgetmsbmax_MASK 0xffffe0ff /* bits 8-12 */
+ #define WGV_wgetmsbmax_SHIFT 8
+ #define WGV_wbrklefttop_MASK 0xfffeffff /* bit 16 */
+ #define WGV_wbrklefttop_disable 0x0
+ #define WGV_wbrklefttop_enable 0x10000
+ #define WGV_wfastcrop_MASK 0xfffdffff /* bit 17 */
+ #define WGV_wfastcrop_disable 0x0
+ #define WGV_wfastcrop_enable 0x20000
+ #define WGV_wcentersnap_MASK 0xfffbffff /* bit 18 */
+ #define WGV_wcentersnap_disable 0x0
+ #define WGV_wcentersnap_enable 0x40000
+ #define WGV_wbrkrighttop_MASK 0xfff7ffff /* bit 19 */
+ #define WGV_wbrkrighttop_disable 0x0
+ #define WGV_wbrkrighttop_enable 0x80000
+
+#define MGAREG_WIADDR 0x1dc0
+
+ #define WIA_wmode_MASK 0xfffffffc /* bits 0-1 */
+ #define WIA_wmode_suspend 0x0 /* val 0, shift 0 */
+ #define WIA_wmode_resume 0x1 /* val 1, shift 0 */
+ #define WIA_wmode_jump 0x2 /* val 2, shift 0 */
+ #define WIA_wmode_start 0x3 /* val 3, shift 0 */
+ #define WIA_wagp_MASK 0xfffffffb /* bit 2 */
+ #define WIA_wagp_pci 0x0
+ #define WIA_wagp_agp 0x4
+ #define WIA_wiaddr_MASK 0x7 /* bits 3-31 */
+ #define WIA_wiaddr_SHIFT 3
+
+#define MGAREG_WIADDR2 0x1dd8
+
+ #define WIA2_wmode_MASK 0xfffffffc /* bits 0-1 */
+ #define WIA2_wmode_suspend 0x0 /* val 0, shift 0 */
+ #define WIA2_wmode_resume 0x1 /* val 1, shift 0 */
+ #define WIA2_wmode_jump 0x2 /* val 2, shift 0 */
+ #define WIA2_wmode_start 0x3 /* val 3, shift 0 */
+ #define WIA2_wagp_MASK 0xfffffffb /* bit 2 */
+ #define WIA2_wagp_pci 0x0
+ #define WIA2_wagp_agp 0x4
+ #define WIA2_wiaddr_MASK 0x7 /* bits 3-31 */
+ #define WIA2_wiaddr_SHIFT 3
+
+#define MGAREG_WIADDRNB 0x1e60
+#define MGAREG_WIADDRNB1 0x1e04
+#define MGAREG_WIADDRNB2 0x1e00
+#define MGAREG_WIMEMADDR 0x1e68
+
+ #define WIMA_wimemaddr_MASK 0xffffff00 /* bits 0-7 */
+ #define WIMA_wimemaddr_SHIFT 0
+
+#define MGAREG_WIMEMDATA 0x2000
+#define MGAREG_WIMEMDATA1 0x2100
+#define MGAREG_WMISC 0x1e70
+
+ #define WM_wucodecache_MASK 0xfffffffe /* bit 0 */
+ #define WM_wucodecache_disable 0x0
+ #define WM_wucodecache_enable 0x1
+ #define WM_wmaster_MASK 0xfffffffd /* bit 1 */
+ #define WM_wmaster_disable 0x0
+ #define WM_wmaster_enable 0x2
+ #define WM_wcacheflush_MASK 0xfffffff7 /* bit 3 */
+ #define WM_wcacheflush_disable 0x0
+ #define WM_wcacheflush_enable 0x8
+
+#define MGAREG_WR 0x2d00
+#define MGAREG_WVRTXSZ 0x1dcc
+
+ #define WVS_wvrtxsz_MASK 0xffffffc0 /* bits 0-5 */
+ #define WVS_wvrtxsz_SHIFT 0
+ #define WVS_primsz_MASK 0xffffc0ff /* bits 8-13 */
+ #define WVS_primsz_SHIFT 8
+
+#define MGAREG_XDST 0x1cb0
+#define MGAREG_XYEND 0x1c44
+
+ #define XYEA_x_end_MASK 0xffff0000 /* bits 0-15 */
+ #define XYEA_x_end_SHIFT 0
+ #define XYEA_y_end_MASK 0xffff /* bits 16-31 */
+ #define XYEA_y_end_SHIFT 16
+
+#define MGAREG_XYSTRT 0x1c40
+
+ #define XYSA_x_start_MASK 0xffff0000 /* bits 0-15 */
+ #define XYSA_x_start_SHIFT 0
+ #define XYSA_y_start_MASK 0xffff /* bits 16-31 */
+ #define XYSA_y_start_SHIFT 16
+
+#define MGAREG_YBOT 0x1c9c
+#define MGAREG_YDST 0x1c90
+
+ #define YA_ydst_MASK 0xff800000 /* bits 0-22 */
+ #define YA_ydst_SHIFT 0
+ #define YA_sellin_MASK 0x1fffffff /* bits 29-31 */
+ #define YA_sellin_SHIFT 29
+
+#define MGAREG_YDSTLEN 0x1c88
+
+ #define YDL_length_MASK 0xffff0000 /* bits 0-15 */
+ #define YDL_length_SHIFT 0
+ #define YDL_yval_MASK 0xffff /* bits 16-31 */
+ #define YDL_yval_SHIFT 16
+
+#define MGAREG_YDSTORG 0x1c94
+#define MGAREG_YTOP 0x1c98
+#define MGAREG_ZORG 0x1c0c
+
+ #define ZO_zorgmap_MASK 0xfffffffe /* bit 0 */
+ #define ZO_zorgmap_fb 0x0
+ #define ZO_zorgmap_sys 0x1
+ #define ZO_zorgacc_MASK 0xfffffffd /* bit 1 */
+ #define ZO_zorgacc_pci 0x0
+ #define ZO_zorgacc_agp 0x2
+ #define ZO_zorg_MASK 0x3 /* bits 2-31 */
+ #define ZO_zorg_SHIFT 2
/**************** (END) AUTOMATICLY GENERATED REGISTER FILE ******************/
-#endif /* _MGAREGS_H_ */
-
+#endif /* _MGAREGS_H_ */
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgastate.c b/xc/lib/GL/mesa/src/drv/mga/mgastate.c
index 203a92f27..926548a7d 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgastate.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgastate.c
@@ -24,7 +24,7 @@
* Authors:
* Keith Whitwell <keithw@valinux.com>
*/
-/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.9 2001/04/10 16:07:51 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.10.2.1 2001/05/31 08:31:23 alanh Exp $ */
#include <stdio.h>
@@ -391,20 +391,34 @@ static void mgaUpdateAlphaMode(GLcontext *ctx)
int a = 0;
/* determine source of alpha for blending and testing */
- if ( !ctx->Texture.ReallyEnabled )
+ if ( !ctx->Texture.ReallyEnabled ) {
a |= AC_alphasel_diffused;
+ }
else {
- switch (ctx->Texture.Unit[0].EnvMode) {
- case GL_DECAL:
- case GL_REPLACE:
- a |= AC_alphasel_fromtex;
- break;
- case GL_BLEND:
- case GL_MODULATE:
- a |= AC_alphasel_modulated;
- break;
- default:
- break;
+ /* G400: Regardless of texture env mode, we use the alpha from the
+ * texture unit (AC_alphasel_fromtex) since it will have already
+ * been modulated by the incoming fragment color, if needed.
+ * We don't want (AC_alphasel_modulate) since that'll effectively
+ * do the modulation twice.
+ */
+ if (MGA_IS_G400(mmesa)) {
+ a |= AC_alphasel_fromtex;
+ }
+ else {
+ /* G200 */
+ switch (ctx->Texture.Unit[0].EnvMode) {
+ case GL_DECAL:
+ a |= AC_alphasel_diffused;
+ case GL_REPLACE:
+ a |= AC_alphasel_fromtex;
+ break;
+ case GL_BLEND:
+ case GL_MODULATE:
+ a |= AC_alphasel_modulated;
+ break;
+ default:
+ break;
+ }
}
}
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgatex.c b/xc/lib/GL/mesa/src/drv/mga/mgatex.c
index d99313c81..6c925bc0c 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgatex.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgatex.c
@@ -24,7 +24,7 @@
* Authors:
* Keith Whitwell <keithw@valinux.com>
*/
-/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.10 2001/04/10 16:07:51 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.10.2.1 2001/05/31 08:31:23 alanh Exp $ */
#include <stdlib.h>
#include <stdio.h>
@@ -179,10 +179,6 @@ static GLint mgaChooseTexFormat( mgaContextPtr mmesa,
} while (0)
switch ( texImage->IntFormat ) {
- /* GH: Bias towards GL_RGB, GL_RGBA texture formats. This has
- * got to be better than sticking them way down the end of this
- * huge list.
- */
case GL_RGBA:
case 4:
if ( format == GL_BGRA ) {
@@ -211,9 +207,6 @@ static GLint mgaChooseTexFormat( mgaContextPtr mmesa,
TMC_tformat_tw16, _mesa_texformat_rgb565 );
break;
- /* GH: Okay, keep checking as normal. Still test for GL_RGB,
- * GL_RGBA formats first.
- */
case GL_RGBA8:
case GL_RGB10_A2:
case GL_RGBA12:
@@ -224,12 +217,17 @@ static GLint mgaChooseTexFormat( mgaContextPtr mmesa,
case GL_RGBA4:
case GL_RGBA2:
+ case GL_RGB5_A1:
SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 );
break;
+#if 0
case GL_RGB5_A1:
+ /* GH: Leave this until we use the new texture conversion code.
+ */
SET_FORMAT( TMC_tformat_tw15, _mesa_texformat_argb1555 );
break;
+#endif
case GL_RGB8:
case GL_RGB10:
@@ -427,6 +425,8 @@ static void mgaUpdateTextureEnvG200( GLcontext *ctx )
t = (mgaTextureObjectPtr)tObj->DriverData;
+ t->setup.texctl2 &= ~TMC_decalblend_enable;
+
switch (ctx->Texture.Unit[0].EnvMode) {
case GL_REPLACE:
t->setup.texctl &= ~TMC_tmodulate_enable;
@@ -436,6 +436,7 @@ static void mgaUpdateTextureEnvG200( GLcontext *ctx )
break;
case GL_DECAL:
t->setup.texctl &= ~TMC_tmodulate_enable;
+ t->setup.texctl2 |= TMC_decalblend_enable;
break;
case GL_BLEND:
t->ctx->Fallback |= MGA_FALLBACK_TEXTURE;
@@ -482,16 +483,16 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, int unit )
case GL_MODULATE:
if (unit == 0) {
*reg = ( TD0_color_arg2_diffuse |
- TD0_color_sel_mul |
+ TD0_color_sel_mulout |
TD0_alpha_arg2_diffuse |
- TD0_alpha_sel_mul);
+ TD0_alpha_sel_mulout);
}
else {
*reg = ( TD0_color_arg2_prevstage |
TD0_color_alpha_prevstage |
- TD0_color_sel_mul |
+ TD0_color_sel_mulout |
TD0_alpha_arg2_prevstage |
- TD0_alpha_sel_mul);
+ TD0_alpha_sel_mulout);
}
break;
case GL_DECAL:
@@ -564,44 +565,44 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, int unit )
if (format == GL_INTENSITY)
*reg = ( TD0_color_arg2_diffuse |
TD0_color_add_add |
- TD0_color_sel_add |
+ TD0_color_sel_addout |
TD0_alpha_arg2_diffuse |
TD0_alpha_add_enable |
- TD0_alpha_sel_add);
+ TD0_alpha_sel_addout);
else if (format == GL_ALPHA)
*reg = ( TD0_color_arg2_diffuse |
- TD0_color_sel_mul |
+ TD0_color_sel_mulout |
TD0_alpha_arg2_diffuse |
- TD0_alpha_sel_mul);
+ TD0_alpha_sel_mulout);
else
*reg = ( TD0_color_arg2_diffuse |
TD0_color_add_add |
- TD0_color_sel_add |
+ TD0_color_sel_addout |
TD0_alpha_arg2_diffuse |
- TD0_alpha_sel_mul);
+ TD0_alpha_sel_mulout);
}
else {
if (format == GL_INTENSITY) {
*reg = ( TD0_color_arg2_prevstage |
TD0_color_add_add |
- TD0_color_sel_add |
+ TD0_color_sel_addout |
TD0_alpha_arg2_prevstage |
TD0_alpha_add_enable |
- TD0_alpha_sel_add);
+ TD0_alpha_sel_addout);
}
else if (format == GL_ALPHA) {
*reg = ( TD0_color_arg2_prevstage |
- TD0_color_sel_mul |
+ TD0_color_sel_mulout |
TD0_alpha_arg2_prevstage |
- TD0_alpha_sel_mul);
+ TD0_alpha_sel_mulout);
}
else {
*reg = ( TD0_color_arg2_prevstage |
TD0_color_alpha_prevstage |
TD0_color_add_add |
- TD0_color_sel_add |
+ TD0_color_sel_addout |
TD0_alpha_arg2_prevstage |
- TD0_alpha_sel_mul);
+ TD0_alpha_sel_mulout);
}
}
break;
@@ -609,9 +610,9 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, int unit )
case GL_BLEND:
if (format == GL_ALPHA) {
*reg = ( TD0_color_arg2_diffuse |
- TD0_color_sel_mul |
+ TD0_color_sel_mulout |
TD0_alpha_arg2_diffuse |
- TD0_alpha_sel_mul);
+ TD0_alpha_sel_mulout);
}
else {
mmesa->Fallback |= MGA_FALLBACK_TEXTURE;
@@ -629,7 +630,7 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, int unit )
*/
*reg = ( TD0_color_arg2_diffuse |
TD0_color_arg1_inv_enable |
- TD0_color_sel_mul |
+ TD0_color_sel_mulout |
TD0_alpha_arg2_diffuse |
TD0_alpha_sel_arg1);
} else {
@@ -638,7 +639,7 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, int unit )
*/
*reg = ( TD0_color_arg2_prevstage |
TD0_color_add_add |
- TD0_color_sel_add |
+ TD0_color_sel_addout |
TD0_alpha_arg2_prevstage |
TD0_alpha_sel_arg2);
}
diff --git a/xc/lib/GL/mesa/src/drv/r128/Imakefile b/xc/lib/GL/mesa/src/drv/r128/Imakefile
index d55844a80..e85916629 100644
--- a/xc/lib/GL/mesa/src/drv/r128/Imakefile
+++ b/xc/lib/GL/mesa/src/drv/r128/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile,v 1.16 2001/04/03 02:29:35 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile,v 1.17 2001/05/10 16:56:11 dawes Exp $
#include <Threads.tmpl>
diff --git a/xc/lib/GL/mesa/src/drv/r128/Imakefile.inc b/xc/lib/GL/mesa/src/drv/r128/Imakefile.inc
index ebf4fc39f..daa6a4c09 100644
--- a/xc/lib/GL/mesa/src/drv/r128/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/drv/r128/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile.inc,v 1.2 2001/04/10 17:53:07 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile.inc,v 1.3 2001/05/02 15:06:04 dawes Exp $
#ifndef MesaDrvSrcDir
#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv
@@ -16,7 +16,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
#if BuildXF86DRI
- DRI_DEFINES = GlxDefines -DDRIVERTS -DX_BYTE_ORDER=ByteOrder
+ DRI_DEFINES = GlxDefines -DX_BYTE_ORDER=ByteOrder
DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \
-I$(INCLUDESRC) -I$(INCLUDESRC)/GL \
-I$(GLXLIBSRC)/mesa/dri \
diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_tex.c b/xc/lib/GL/mesa/src/drv/r128/r128_tex.c
index 4e8601c0b..1694f8d36 100644
--- a/xc/lib/GL/mesa/src/drv/r128/r128_tex.c
+++ b/xc/lib/GL/mesa/src/drv/r128/r128_tex.c
@@ -700,7 +700,7 @@ static void r128UploadSubImage( r128ContextPtr rmesa,
return;
image = t->tObj->Image[level];
- if ( !image )
+ if ( !image || !image->Data )
return;
switch ( t->texelBytes ) {
diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c b/xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c
index 8b876a45c..bab1ed81b 100644
--- a/xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c
@@ -80,10 +80,10 @@ GLboolean XMesaInitDriver( __DRIscreenPrivate *sPriv )
}
/* Check that the DRM driver version is compatible */
- if ( sPriv->drmMajor != 2 ||
- sPriv->drmMinor < 1 ) {
+ if ( sPriv->drmMajor != 3 ||
+ sPriv->drmMinor < 0 ) {
char msg[1000];
- sprintf( msg, "R128 DRI driver expected DRM driver version 2.1.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch );
+ sprintf( msg, "R128 DRI driver expected DRM driver version 3.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch );
__driMesaMessage( msg );
return GL_FALSE;
}
diff --git a/xc/lib/GL/mesa/src/drv/radeon/Imakefile b/xc/lib/GL/mesa/src/drv/radeon/Imakefile
index 355fe1a38..fa896fc93 100644
--- a/xc/lib/GL/mesa/src/drv/radeon/Imakefile
+++ b/xc/lib/GL/mesa/src/drv/radeon/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile,v 1.5 2001/04/03 02:29:36 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile,v 1.6 2001/05/10 16:56:11 dawes Exp $
#include <Threads.tmpl>
diff --git a/xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc b/xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc
index 22559bead..87dae79ba 100644
--- a/xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc,v 1.1 2001/03/23 19:18:42 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc,v 1.2 2001/05/02 15:06:04 dawes Exp $
#ifndef MesaDrvSrcDir
#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv
@@ -16,7 +16,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
#if BuildXF86DRI
- DRI_DEFINES = GlxDefines -DDRIVERTS
+ DRI_DEFINES = GlxDefines
DRI_INCLUDES = -I$(GLXLIBSRC)/dri \
-I$(GLXLIBSRC)/glx \
-I$(INCLUDESRC) \
diff --git a/xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c b/xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c
index 7e901d9c7..6854b62e5 100644
--- a/xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c
+++ b/xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c,v 1.2 2001/03/21 16:14:25 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c,v 1.3 2001/05/02 15:06:04 dawes Exp $ */
/**************************************************************************
Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
@@ -51,6 +51,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define PCI_CHIP_RADEON_QE 0x5145
#define PCI_CHIP_RADEON_QF 0x5146
#define PCI_CHIP_RADEON_QG 0x5147
+#define PCI_CHIP_RADEON_VE 0x5159
#endif
@@ -122,6 +123,7 @@ radeonScreenPtr radeonCreateScreen( __DRIscreenPrivate *sPriv )
case PCI_CHIP_RADEON_QE:
case PCI_CHIP_RADEON_QF:
case PCI_CHIP_RADEON_QG:
+ case PCI_CHIP_RADEON_VE:
radeonScreen->chipset = RADEON_CARD_TYPE_RADEON;
break;
default:
diff --git a/xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c b/xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c
index 802bb3ab1..8985361b7 100644
--- a/xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c
+++ b/xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c,v 1.3 2001/03/21 16:14:25 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c,v 1.3.2.1 2001/05/22 21:25:41 dawes Exp $ */
/**************************************************************************
Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
@@ -90,10 +90,10 @@ static void radeonSetTexFilter( radeonTexObjPtr t, GLenum minf, GLenum magf )
case GL_NEAREST_MIPMAP_NEAREST:
t->pp_txfilter |= RADEON_MIN_FILTER_NEAREST_MIP_NEAREST;
break;
- case GL_LINEAR_MIPMAP_NEAREST:
+ case GL_NEAREST_MIPMAP_LINEAR:
t->pp_txfilter |= RADEON_MIN_FILTER_LINEAR_MIP_NEAREST;
break;
- case GL_NEAREST_MIPMAP_LINEAR:
+ case GL_LINEAR_MIPMAP_NEAREST:
t->pp_txfilter |= RADEON_MIN_FILTER_NEAREST_MIP_LINEAR;
break;
case GL_LINEAR_MIPMAP_LINEAR:
diff --git a/xc/lib/GL/mesa/src/drv/sis/Imakefile b/xc/lib/GL/mesa/src/drv/sis/Imakefile
index 9931cf603..d58ed4a30 100644
--- a/xc/lib/GL/mesa/src/drv/sis/Imakefile
+++ b/xc/lib/GL/mesa/src/drv/sis/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.16 2001/04/03 02:29:36 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.17 2001/05/10 16:56:12 dawes Exp $
#include <Threads.tmpl>
diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c b/xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c
index 9e1eb105c..b1d87f599 100644
--- a/xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c
@@ -24,7 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c,v 1.9 2000/12/22 09:20:04 alanh Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c,v 1.9.2.1 2001/05/22 21:25:41 dawes Exp $ */
/*
* Authors:
@@ -80,9 +80,9 @@ GLboolean XMesaInitDriver (__DRIscreenPrivate * driScrnPriv)
{
int major, minor, patch;
if (XF86DRIQueryVersion(driScrnPriv->display, &major, &minor, &patch)) {
- if (major != 3 || minor != 1 || patch < 0) {
+ if (major != 4 || minor < 0) {
char msg[1000];
- sprintf(msg, "sis DRI driver expected DRI version 3.1.x but got version %d.%d.%d", major, minor, patch);
+ sprintf(msg, "sis DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch);
__driMesaMessage(msg);
return GL_FALSE;
}
@@ -90,11 +90,11 @@ GLboolean XMesaInitDriver (__DRIscreenPrivate * driScrnPriv)
}
/* Check that the DDX driver version is compatible */
- if (driScrnPriv->ddxMajor != 1 ||
- driScrnPriv->ddxMinor != 0 ||
+ if (driScrnPriv->ddxMajor != 0 ||
+ driScrnPriv->ddxMinor != 1 ||
driScrnPriv->ddxPatch < 0) {
char msg[1000];
- sprintf(msg, "sis DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", driScrnPriv->ddxMajor, driScrnPriv->ddxMinor, driScrnPriv->ddxPatch);
+ sprintf(msg, "sis DRI driver expected DDX driver version 0.1.x but got version %d.%d.%d", driScrnPriv->ddxMajor, driScrnPriv->ddxMinor, driScrnPriv->ddxPatch);
__driMesaMessage(msg);
return GL_FALSE;
}
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/Imakefile b/xc/lib/GL/mesa/src/drv/tdfx/Imakefile
index d5ecc195a..0cff09645 100644
--- a/xc/lib/GL/mesa/src/drv/tdfx/Imakefile
+++ b/xc/lib/GL/mesa/src/drv/tdfx/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.24 2001/04/03 02:29:36 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.25.2.1 2001/06/01 07:42:23 alanh Exp $
#include <Threads.tmpl>
@@ -23,6 +23,8 @@ XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.24 2001/04/03 02:29:36
#include "../../X86/Imakefile.inc"
#endif
+ DEPEND_DEFINES = -D__linux__
+
DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES)
INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES)
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc b/xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc
index 8b54c25a1..88ad0d988 100644
--- a/xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc
+++ b/xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc,v 1.1 2001/03/23 19:18:44 dawes Exp $
+XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc,v 1.2 2001/05/02 15:06:04 dawes Exp $
#ifndef MesaDrvSrcDir
#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c
index d5bba169b..0615b4a34 100644
--- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c
+++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c
@@ -23,7 +23,7 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.1 2001/03/21 16:14:27 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.1.2.1 2001/05/22 21:25:41 dawes Exp $ */
/*
* Original rewrite:
@@ -464,7 +464,7 @@ void tdfxDestroyContext( tdfxContextPtr fxMesa )
GLcontext *ctx = fxMesa->glCtx;
struct gl_texture_object *tObj;
- if ( ctx->Shared->RefCount == 1 ) {
+ if ( ctx->Shared->RefCount == 1 && fxMesa->driDrawable ) {
/* This share group is about to go away, free our private
* texture object data.
*/
@@ -521,9 +521,6 @@ GLboolean tdfxInitGlide(tdfxContextPtr tmesa)
return GL_FALSE;
}
- if (env && strstr(env, "verbose")) {
- fprintf(stderr, "libGL: trying Glide library %s\n", libName);
- }
libHandle = dlopen(libName, 0);
if (!libHandle) {
/* The device-specific Glide library filename didn't work, try the
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c
index ba10d35ec..797ec88d6 100644
--- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c
+++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c
@@ -23,7 +23,7 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c,v 1.3 2001/04/10 16:07:54 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c,v 1.4 2001/05/02 15:06:04 dawes Exp $ */
/*
* Original rewrite:
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c
index 369dc064f..10316454b 100644
--- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c
+++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c
@@ -23,7 +23,7 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c,v 1.2 2001/05/02 15:06:04 dawes Exp $ */
/*
* Original rewrite:
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c
index fec6a7985..b54e6b387 100644
--- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c
+++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c
@@ -23,7 +23,7 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c,v 1.1.2.1 2001/05/22 21:25:41 dawes Exp $ */
/*
* Original rewrite:
@@ -517,7 +517,7 @@ tdfxDDTexImage2D( GLcontext *ctx, GLenum target, GLint level,
image->rescaled.height = dstHeight;
image->rescaled.size = size;
- _mesa_rescale_teximage2d( texFormat,
+ _mesa_rescale_teximage2d( texFormat->TexelBytes,
texImage->Width, texImage->Height,
dstWidth, dstHeight,
image->original.data, image->rescaled.data );
@@ -582,7 +582,7 @@ tdfxDDTexSubImage2D( GLcontext *ctx, GLenum target, GLint level,
*/
if ( image->wScale > 1 || image->hScale > 1 ) {
assert( image->rescaled.data );
- _mesa_rescale_teximage2d( texImage->TexFormat,
+ _mesa_rescale_teximage2d( texImage->TexFormat->TexelBytes,
image->original.width, image->original.height,
image->rescaled.width, image->rescaled.height,
image->original.data, image->rescaled.data );
@@ -795,9 +795,11 @@ static void tdfxDDDeleteTexture( GLcontext *ctx,
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
- LOCK_HARDWARE( fxMesa );
- tdfxTMFreeTextureLocked( fxMesa, tObj );
- UNLOCK_HARDWARE( fxMesa );
+ if ( fxMesa->driDrawable ) {
+ LOCK_HARDWARE( fxMesa );
+ tdfxTMFreeTextureLocked( fxMesa, tObj );
+ UNLOCK_HARDWARE( fxMesa );
+ }
fxMesa->new_state |= TDFX_NEW_TEXTURE;
}
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c
index 4c92c21b7..d3d2275af 100644
--- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c
+++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c
@@ -23,7 +23,7 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c,v 1.2 2001/04/10 16:07:54 dawes Exp $ */
+/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c,v 1.2.2.1 2001/05/22 21:25:41 dawes Exp $ */
/*
* Original rewrite:
@@ -317,7 +317,7 @@ void tdfxTMClose( tdfxContextPtr fxMesa )
{
GLcontext *ctx = fxMesa->glCtx;
- if ( ctx->Shared->RefCount == 1 ) {
+ if ( ctx->Shared->RefCount == 1 && fxMesa->driDrawable ) {
/* RefCount will soon go to zero, free our 3dfx stuff */
tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ctx->Shared->DriverData;
int unit;
diff --git a/xc/lib/X11/Font.c b/xc/lib/X11/Font.c
index 29d98a9d9..7fa5922e7 100644
--- a/xc/lib/X11/Font.c
+++ b/xc/lib/X11/Font.c
@@ -28,7 +28,7 @@ sale, use or other dealings in this Software without prior written
authorization from the X Consortium and the XFree86 Project.
*/
-/* $XFree86: xc/lib/X11/Font.c,v 1.12 2001/01/17 19:41:35 dawes Exp $ */
+/* $XFree86: xc/lib/X11/Font.c,v 1.13 2001/05/01 07:53:46 alanh Exp $ */
#define NEED_REPLIES
#include "Xlibint.h"
@@ -39,11 +39,7 @@ authorization from the X Consortium and the XFree86 Project.
#ifdef USE_XF86BIGFONT
#include <sys/types.h>
#ifdef HAS_SHM
-#ifndef __CYGWIN__
#include <sys/ipc.h>
-#else
-#include <sys/cygipc.h>
-#endif
#include <sys/shm.h>
#endif
diff --git a/xc/lib/X11/Imakefile b/xc/lib/X11/Imakefile
index 25d6abd7c..75b2da1f5 100644
--- a/xc/lib/X11/Imakefile
+++ b/xc/lib/X11/Imakefile
@@ -3,7 +3,7 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:44:38 cpqbld Exp $
-XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.37 2001/04/23 16:17:07 tsi Exp $
+XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.38 2001/05/01 10:35:05 alanh Exp $
#define DoNormalLib NormalLibX11
#define DoSharedLib SharedLibX11
@@ -901,6 +901,10 @@ MISCOBJS = os2Stubs.o
OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
+#if UseCygIPC
+REQUIREDLIBS = -lcygipc
+#endif
+
#if !BuildServersOnly || XnestServer || BuildGLXLibrary || BuildClients
#include <Library.tmpl>
diff --git a/xc/lib/X11/XErrorDB b/xc/lib/X11/XErrorDB
index 37c66d53e..d24eb59d2 100644
--- a/xc/lib/X11/XErrorDB
+++ b/xc/lib/X11/XErrorDB
@@ -19,7 +19,7 @@
! other dealings in this Software without prior written authorization
! from The Open Group.
!
-! $XFree86: xc/lib/X11/XErrorDB,v 3.34 2001/01/17 19:41:47 dawes Exp $
+! $XFree86: xc/lib/X11/XErrorDB,v 3.35 2001/05/18 23:35:28 dawes Exp $
!
! these are used in XGetErrorMessage.
XlibMessage.XError: X Error of failed request
@@ -581,6 +581,9 @@ XRequest.XFree86-VidModeExtension.13: XF86VidModeGetDotClocks
XRequest.XFree86-VidModeExtension.14: XF86VidModeSetClientVersion
XRequest.XFree86-VidModeExtension.15: XF86VidModeSetGamma
XRequest.XFree86-VidModeExtension.16: XF86VidModeGetGamma
+XRequest.XFree86-VidModeExtension.17: XF86VidModeGetGammaRamp
+XRequest.XFree86-VidModeExtension.18: XF86VidModeSetGammaRamp
+XRequest.XFree86-VidModeExtension.19: XF86VidModeGetGammaRampSize
XProtoError.XFree86-VidModeExtension.0: XF86VidModeBadClock
XProtoError.XFree86-VidModeExtension.1: XF86VidModeBadHTimings
XProtoError.XFree86-VidModeExtension.2: XF86VidModeBadVTimings
diff --git a/xc/lib/X11/lcFile.c b/xc/lib/X11/lcFile.c
index 6de7c6d51..20d173760 100644
--- a/xc/lib/X11/lcFile.c
+++ b/xc/lib/X11/lcFile.c
@@ -23,7 +23,7 @@
* SOFTWARE.
*
*/
-/* $XFree86: xc/lib/X11/lcFile.c,v 3.21 2001/02/16 13:24:04 eich Exp $ */
+/* $XFree86: xc/lib/X11/lcFile.c,v 3.23 2001/05/18 23:35:28 dawes Exp $ */
#include <stdlib.h>
#include <stdio.h>
@@ -97,11 +97,7 @@ parse_line(
break;
}
argv[argc++] = p;
-#if 0
- while (!isspace(*p) && *p != ':' && *p != '\0') {
-#else
while (*p != ':' && *p != '\n' && *p != '\0') {
-#endif
++p;
}
if (*p == '\0') {
diff --git a/xc/lib/Xaw/Text.c b/xc/lib/Xaw/Text.c
index dc5b1819a..568de0191 100644
--- a/xc/lib/Xaw/Text.c
+++ b/xc/lib/Xaw/Text.c
@@ -70,7 +70,7 @@ SOFTWARE.
* XFree86 Project.
*/
-/* $XFree86: xc/lib/Xaw/Text.c,v 3.42 2001/01/30 21:54:33 paulo Exp $ */
+/* $XFree86: xc/lib/Xaw/Text.c,v 3.42.2.1 2001/05/25 21:44:59 paulo Exp $ */
#include <stdio.h>
#include <X11/IntrinsicP.h>
@@ -2498,12 +2498,14 @@ _XawTextSourceChanged(Widget w, XawTextPosition left, XawTextPosition right,
int delta, line, line_from;
if (left < ctx->text.old_insert) {
+ XawTextPosition old_insert = ctx->text.old_insert;
+
if (right < ctx->text.old_insert)
- ctx->text.old_insert -= right - left;
+ old_insert -= right - left;
else
- ctx->text.old_insert = left;
+ old_insert = left;
- ctx->text.insertPos = ctx->text.old_insert + block->length;
+ ctx->text.insertPos = old_insert + block->length;
}
#ifndef OLDXAW
if (left <= ctx->text.lt.top) {
diff --git a/xc/lib/Xext/Xext-def.cpp b/xc/lib/Xext/Xext-def.cpp
index dfb724224..6d82ea1ba 100644
--- a/xc/lib/Xext/Xext-def.cpp
+++ b/xc/lib/Xext/Xext-def.cpp
@@ -102,8 +102,6 @@ EXPORTS
XSecurityFreeXauth
XSecurityGenerateAuthorization
XSecurityRevokeAuthorization
- XLbxQueryExtension
- XLbxQueryVersion
XagQueryVersion
XagCreateAssociation
XagCreateEmbeddedApplicationGroup
@@ -139,4 +137,4 @@ EXPORTS
XeviQueryVersion
XeviGetVisualInfo
/* $Xorg: Xext-def.cpp,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ */
-/* $XFree86: xc/lib/Xext/Xext-def.cpp,v 1.7 2001/01/17 19:42:46 dawes Exp $ */
+/* $XFree86: xc/lib/Xext/Xext-def.cpp,v 1.8 2001/05/06 10:35:51 alanh Exp $ */
diff --git a/xc/lib/Xft/Xft.h b/xc/lib/Xft/Xft.h
index 3e900de90..7746a7507 100644
--- a/xc/lib/Xft/Xft.h
+++ b/xc/lib/Xft/Xft.h
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/Xft.h,v 1.18 2001/03/30 18:50:18 keithp Exp $
+ * $XFree86: xc/lib/Xft/Xft.h,v 1.19 2001/04/29 03:21:17 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -58,6 +58,7 @@ typedef unsigned int XftChar32;
#define XFT_SCALE "scale" /* double */
#define XFT_RENDER "render" /* Bool */
#define XFT_MINSPACE "minspace" /* Bool use minimum line spacing */
+#define XFT_DPI "dpi" /* double */
/* specific to FreeType rasterizer */
#define XFT_CHAR_WIDTH "charwidth" /* Int */
diff --git a/xc/lib/Xft/xftcolor.c b/xc/lib/Xft/xftcolor.c
index 6443e00ec..b2f80bc2f 100644
--- a/xc/lib/Xft/xftcolor.c
+++ b/xc/lib/Xft/xftcolor.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftcolor.c,v 1.1 2000/12/01 03:27:57 keithp Exp $
+ * $XFree86: xc/lib/Xft/xftcolor.c,v 1.2 2001/05/16 17:20:06 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -110,7 +110,7 @@ XftColorAllocValue (Display *dpy,
result->color.red = color->red;
result->color.green = color->green;
result->color.blue = color->blue;
- result->color.alpha = 0xffff;
+ result->color.alpha = color->alpha;
return True;
}
diff --git a/xc/lib/Xft/xftdir.c b/xc/lib/Xft/xftdir.c
index 5fc684a01..36c3af2eb 100644
--- a/xc/lib/Xft/xftdir.c
+++ b/xc/lib/Xft/xftdir.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftdir.c,v 1.2 2001/01/02 02:46:51 keithp Exp $
+ * $XFree86: xc/lib/Xft/xftdir.c,v 1.3 2001/05/16 10:32:54 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -99,7 +99,11 @@ XftDirScan (XftFontSet *set, const char *dir, Bool force)
if (font)
{
if (!XftFontSetAdd (set, font))
+ {
+ XftPatternDestroy (font);
+ font = 0;
ret = False;
+ }
}
id++;
} while (font && ret && id < count);
diff --git a/xc/lib/Xft/xftdpy.c b/xc/lib/Xft/xftdpy.c
index 94d7928c1..2b4472a9a 100644
--- a/xc/lib/Xft/xftdpy.c
+++ b/xc/lib/Xft/xftdpy.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftdpy.c,v 1.6 2001/01/26 20:51:15 keithp Exp $
+ * $XFree86: xc/lib/Xft/xftdpy.c,v 1.7 2001/04/29 03:21:17 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -236,6 +236,8 @@ _XftDefaultInit (Display *dpy)
goto bail1;
if (!_XftDefaultInitDouble (dpy, pat, XFT_SCALE))
goto bail1;
+ if (!_XftDefaultInitDouble (dpy, pat, XFT_DPI))
+ goto bail1;
if (!_XftDefaultInitBool (dpy, pat, XFT_RENDER))
goto bail1;
if (!_XftDefaultInitInteger (dpy, pat, XFT_RGBA))
@@ -388,6 +390,7 @@ XftDefaultSubstitute (Display *dpy, int screen, XftPattern *pattern)
if (XftPatternGet (pattern, XFT_PIXEL_SIZE, 0, &v) == XftResultNoMatch)
{
int pixels, mm;
+ double dpi;
if (XftPatternGet (pattern, XFT_SIZE, 0, &v) != XftResultMatch)
{
@@ -412,9 +415,10 @@ XftDefaultSubstitute (Display *dpy, int screen, XftPattern *pattern)
size *= scale;
pixels = DisplayHeight (dpy, screen);
mm = DisplayHeightMM (dpy, screen);
- size = size / 72.0;
- size = size * 25.4;
- size = size * pixels / mm;
+ dpi = (((double) DisplayHeight (dpy, screen) * 25.4) /
+ (double) DisplayHeightMM (dpy, screen));
+ dpi = XftDefaultGetDouble (dpy, XFT_DPI, screen, dpi);
+ size = size * dpi / 72.0;
XftPatternAddDouble (pattern, XFT_PIXEL_SIZE, size);
}
}
diff --git a/xc/lib/Xft/xftdraw.c b/xc/lib/Xft/xftdraw.c
index 409a5c947..49ca016ed 100644
--- a/xc/lib/Xft/xftdraw.c
+++ b/xc/lib/Xft/xftdraw.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftdraw.c,v 1.14 2001/04/01 14:00:01 tsi Exp $
+ * $XFree86: xc/lib/Xft/xftdraw.c,v 1.15 2001/05/16 19:20:43 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -414,7 +414,7 @@ XftDrawRect (XftDraw *draw,
{
if (XftDrawRenderPrepare (draw, color, 0, XFT_DRAW_SRC_RECT))
{
- XRenderFillRectangle (draw->dpy, PictOpSrc, draw->render.pict,
+ XRenderFillRectangle (draw->dpy, PictOpOver, draw->render.pict,
&color->color, x, y, width, height);
}
else
diff --git a/xc/lib/Xft/xftfreetype.c b/xc/lib/Xft/xftfreetype.c
index a750c10d0..62096da0b 100644
--- a/xc/lib/Xft/xftfreetype.c
+++ b/xc/lib/Xft/xftfreetype.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.12 2001/04/01 14:00:01 tsi Exp $
+ * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.13 2001/05/16 10:32:54 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -106,9 +106,11 @@ XftFreeTypeQuery (const char *file, int id, int *count)
if (!XftPatternAddInteger (pat, XFT_INDEX, id))
goto bail1;
+#if 0
if ((face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) != 0)
if (!XftPatternAddInteger (pat, XFT_SPACING, XFT_MONO))
goto bail1;
+#endif
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
{
diff --git a/xc/lib/Xft/xftglyphs.c b/xc/lib/Xft/xftglyphs.c
index b06431131..5d6460a5e 100644
--- a/xc/lib/Xft/xftglyphs.c
+++ b/xc/lib/Xft/xftglyphs.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.12 2001/04/01 14:00:01 tsi Exp $
+ * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.13 2001/05/16 10:32:54 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -112,6 +112,7 @@ XftGlyphLoad (Display *dpy,
if (font->charmap != -1)
{
glyphindex = FT_Get_Char_Index (font->face, charcode);
+#if 0
if (!glyphindex)
{
if (_XftFontDebug() & XFT_DBG_GLYPH)
@@ -119,6 +120,7 @@ XftGlyphLoad (Display *dpy,
(int) charcode, (int) charcode);
continue;
}
+#endif
}
else
glyphindex = (FT_UInt) charcode;
@@ -415,6 +417,23 @@ XftGlyphLoad (Display *dpy,
#define STEP 256
+/*
+ * Return whether the given glyph generates any image on the screen,
+ * this means it exists or a default glyph exists
+ */
+static Bool
+XftGlyphDrawable (Display *dpy,
+ XftFontStruct *font,
+ XftChar32 glyph)
+{
+ if (font->charmap != -1)
+ {
+ FT_Set_Charmap (font->face, font->face->charmaps[font->charmap]);
+ glyph = (XftChar32) FT_Get_Char_Index (font->face, (FT_ULong) glyph);
+ }
+ return glyph <= font->face->num_glyphs;
+}
+
void
XftGlyphCheck (Display *dpy,
XftFontStruct *font,
@@ -445,7 +464,7 @@ XftGlyphCheck (Display *dpy,
}
if (font->realized[glyph] == _UntestedGlyph)
{
- if (XftFreeTypeGlyphExists (dpy, font, glyph))
+ if (XftGlyphDrawable (dpy, font, glyph))
{
font->realized[glyph] = (XGlyphInfo *) malloc (sizeof (XGlyphInfo));
n = *nmissing;
diff --git a/xc/lib/Xft/xftgram.y b/xc/lib/Xft/xftgram.y
index b58dcddbf..e9dad4d2b 100644
--- a/xc/lib/Xft/xftgram.y
+++ b/xc/lib/Xft/xftgram.y
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftgram.y,v 1.4 2001/03/31 01:57:20 keithp Exp $
+ * $XFree86: xc/lib/Xft/xftgram.y,v 1.5 2001/05/16 10:32:54 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -258,7 +258,7 @@ XftTestCreate (XftQual qual, const char *field, XftOp compare, XftValue value)
{
test->next = 0;
test->qual = qual;
- test->field = _XftSaveString (field);
+ test->field = field; /* already saved in grammar */
test->op = compare;
if (value.type == XftTypeString)
value.u.s = _XftSaveString (value.u.s);
@@ -428,7 +428,7 @@ XftEditCreate (const char *field, XftOp op, XftExpr *expr)
if (e)
{
e->next = 0;
- e->field = _XftSaveString (field);
+ e->field = field; /* already saved in grammar */
e->op = op;
e->expr = expr;
}
diff --git a/xc/lib/Xft/xftint.h b/xc/lib/Xft/xftint.h
index 37b8e8d81..f92dd4876 100644
--- a/xc/lib/Xft/xftint.h
+++ b/xc/lib/Xft/xftint.h
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftint.h,v 1.24 2001/03/31 01:57:20 keithp Exp $
+ * $XFree86: xc/lib/Xft/xftint.h,v 1.25 2001/05/18 16:03:06 tsi Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -135,7 +135,7 @@ typedef enum _XftQual {
typedef struct _XftTest {
struct _XftTest *next;
XftQual qual;
- char *field;
+ const char *field;
XftOp op;
XftValue value;
} XftTest;
diff --git a/xc/lib/Xft/xftlex.l b/xc/lib/Xft/xftlex.l
index c426fa315..3eff3f429 100644
--- a/xc/lib/Xft/xftlex.l
+++ b/xc/lib/Xft/xftlex.l
@@ -1,6 +1,6 @@
%{
/*
- * $XFree86: xc/lib/Xft/xftlex.l,v 1.5 2001/03/31 01:57:20 keithp Exp $
+ * $XFree86: xc/lib/Xft/xftlex.l,v 1.7 2001/05/18 16:03:06 tsi Exp $
*
* Copyright (c) 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -76,16 +76,20 @@ int XftConfigFiledeep = 0;
static int input (void)
{
char buf[1];
- int r;
+ static int r = EOF;
- YY_INPUT(buf, r, 1);
if (r == 0)
return 0;
+ YY_INPUT(buf, r, 1);
+ if (r == 0)
+ return EOF;
return buf[0];
}
static void unput (char c)
{
+ if (!c || c == EOF)
+ return;
if (c == '\n')
XftConfigLineno--;
ungetc (c, XftConfigInput);
@@ -173,6 +177,7 @@ _XftConfigSkipLine (void)
do {
c = input();
} while (c != EOF && c != '\n');
+ if (c == '\n') unput('\n');
}
Bool
@@ -250,6 +255,7 @@ _XftConfigPopInput (void)
if (c >= 0)
return c;
fclose (XftConfigInput);
+ XftConfigInput = 0;
if (XftConfigInpt == XftConfigInStack + XFT_CONFIG_IN_DEEP)
return EOF;
XftConfigInput = *XftConfigInpt++;
@@ -259,3 +265,11 @@ _XftConfigPopInput (void)
--XftConfigFiledeep;
}
}
+
+void
+XftConfigLexDone (void)
+{
+#ifdef FLEX_SCANNER
+ XftConfig_delete_buffer (XftConfig_current_buffer);
+#endif
+}
diff --git a/xc/lib/Xmuu/Imakefile b/xc/lib/Xmuu/Imakefile
index 32a564b0d..b8f0b1d6d 100644
--- a/xc/lib/Xmuu/Imakefile
+++ b/xc/lib/Xmuu/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/Xmuu/Imakefile,v 1.1 2001/03/30 02:18:41 keithp Exp $
+XCOMM $XFree86: xc/lib/Xmuu/Imakefile,v 1.2 2001/05/11 08:16:54 alanh Exp $
XCOMM Mini Xmu library: pull out just those things that are used by apps
XCOMM that do not use Xt and Xaw in the core applications
XCOMM
@@ -47,7 +47,10 @@ OBJS = ClientWin.o\
GetHost.o\
Lower.o
-INCLUDES = -I$(XMUSRC)
+### Commented out following line...
+### INCLUDES = -I$(XMUSRC)
+### ... it breaks Lower.c (which needs -I../../lib/misc to find snprintf.c)
+###
#include <Library.tmpl>
diff --git a/xc/lib/Xrender/Xrender.c b/xc/lib/Xrender/Xrender.c
index 94e63f01d..10a601573 100644
--- a/xc/lib/Xrender/Xrender.c
+++ b/xc/lib/Xrender/Xrender.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xrender/Xrender.c,v 1.3 2000/12/01 21:32:00 keithp Exp $
+ * $XFree86: xc/lib/Xrender/Xrender.c,v 1.4 2001/05/16 10:33:16 keithp Exp $
*
* Copyright © 2000 SuSE, Inc.
*
@@ -160,6 +160,7 @@ XRenderQueryFormats (Display *dpy)
xPictScreen *xScreen;
xPictDepth *xDepth;
xPictVisual *xVisual;
+ void *xData;
int nf, ns, nd, nv;
int rlength;
@@ -190,19 +191,20 @@ XRenderQueryFormats (Display *dpy)
rep.numScreens * sizeof (xPictScreen) +
rep.numDepths * sizeof (xPictDepth) +
rep.numVisuals * sizeof (xPictVisual));
- xFormat = (xPictFormInfo *) Xmalloc (rlength);
+ xData = (void *) Xmalloc (rlength);
if (!xri || !xFormat)
{
if (xri) Xfree (xri);
- if (xFormat) Xfree (xFormat);
+ if (xData) Xfree (xData);
_XEatData (dpy, rlength);
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
- _XRead (dpy, (char *) xFormat, rlength);
+ _XRead (dpy, (char *) xData, rlength);
format = xri->format;
+ xFormat = (xPictFormInfo *) xData;
for (nf = 0; nf < rep.numFormats; nf++)
{
format->id = xFormat->id;
@@ -248,6 +250,7 @@ XRenderQueryFormats (Display *dpy)
}
xScreen = (xPictScreen *) xDepth;
}
+ Xfree (xData);
info->data = (XPointer) xri;
return 1;
}
diff --git a/xc/lib/Xv/Xv.c b/xc/lib/Xv/Xv.c
index 65f005e4f..a364351f3 100644
--- a/xc/lib/Xv/Xv.c
+++ b/xc/lib/Xv/Xv.c
@@ -21,7 +21,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xv/Xv.c,v 1.14 2000/05/25 20:47:39 mvojkovi Exp $ */
+/* $XFree86: xc/lib/Xv/Xv.c,v 1.15 2001/05/11 08:23:22 alanh Exp $ */
/*
** File:
**
@@ -189,12 +189,16 @@ XvQueryAdaptors(
/* GET INPUT ADAPTORS */
- size = rep.num_adaptors*sizeof(XvAdaptorInfo);
- if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) {
- Xfree(buffer);
- UnlockDisplay(dpy);
- SyncHandle();
- return(XvBadAlloc);
+ if (rep.num_adaptors == 0) {
+ pas = NULL;
+ } else {
+ size = rep.num_adaptors*sizeof(XvAdaptorInfo);
+ if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) {
+ Xfree(buffer);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return(XvBadAlloc);
+ }
}
/* INIT ADAPTOR FIELDS */
@@ -204,6 +208,7 @@ XvQueryAdaptors(
pa->num_adaptors = 0;
pa->name = (char *)NULL;
pa->formats = (XvFormat *)NULL;
+ pa++;
}
pa = pas;
diff --git a/xc/lib/Xxf86vm/XF86VMode.c b/xc/lib/Xxf86vm/XF86VMode.c
index d8d5ee9e4..b6ef6cf64 100644
--- a/xc/lib/Xxf86vm/XF86VMode.c
+++ b/xc/lib/Xxf86vm/XF86VMode.c
@@ -1,5 +1,5 @@
/* $XConsortium: XF86VMode.c /main/2 1995/11/14 18:17:58 kaleb $ */
-/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.29 2000/08/22 16:14:47 alanh Exp $ */
+/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.31 2001/05/07 20:11:13 mvojkovi Exp $ */
/*
Copyright (c) 1995 Kaleb S. KEITHLEY
@@ -1109,3 +1109,102 @@ XF86VidModeGetDotClocks(dpy, screen,
return True;
}
+Bool
+XF86VidModeSetGammaRamp (
+ Display *dpy,
+ int screen,
+ int size,
+ unsigned short *red,
+ unsigned short *green,
+ unsigned short *blue
+)
+{
+ int length = (size + 1) & ~1;
+ XExtDisplayInfo *info = find_display (dpy);
+ xXF86VidModeSetGammaRampReq *req;
+
+ XF86VidModeCheckExtension (dpy, info, False);
+ LockDisplay(dpy);
+ GetReq(XF86VidModeSetGammaRamp, req);
+ req->reqType = info->codes->major_opcode;
+ req->xf86vidmodeReqType = X_XF86VidModeSetGammaRamp;
+ req->screen = screen;
+ req->length += (length >> 1) * 3;
+ req->size = size;
+ _XSend(dpy, (char*)red, size * 2);
+ _XSend(dpy, (char*)green, size * 2);
+ _XSend(dpy, (char*)blue, size * 2);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return True;
+}
+
+
+Bool
+XF86VidModeGetGammaRamp (
+ Display *dpy,
+ int screen,
+ int size,
+ unsigned short *red,
+ unsigned short *green,
+ unsigned short *blue
+)
+{
+ XExtDisplayInfo *info = find_display (dpy);
+ xXF86VidModeGetGammaRampReq *req;
+ xXF86VidModeGetGammaRampReply rep;
+
+ XF86VidModeCheckExtension (dpy, info, False);
+
+ LockDisplay(dpy);
+ GetReq(XF86VidModeGetGammaRamp, req);
+ req->reqType = info->codes->major_opcode;
+ req->xf86vidmodeReqType = X_XF86VidModeGetGammaRamp;
+ req->screen = screen;
+ req->size = size;
+ if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) {
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return False;
+ }
+ if(rep.size) {
+ _XRead(dpy, (char*)red, rep.size << 1);
+ _XRead(dpy, (char*)green, rep.size << 1);
+ _XRead(dpy, (char*)blue, rep.size << 1);
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return True;
+}
+
+Bool XF86VidModeGetGammaRampSize(
+ Display *dpy,
+ int screen,
+ int *size
+)
+{
+ XExtDisplayInfo *info = find_display (dpy);
+ xXF86VidModeGetGammaRampSizeReq *req;
+ xXF86VidModeGetGammaRampSizeReply rep;
+
+ *size = 0;
+
+ XF86VidModeCheckExtension (dpy, info, False);
+
+ LockDisplay(dpy);
+ GetReq(XF86VidModeGetGammaRampSize, req);
+ req->reqType = info->codes->major_opcode;
+ req->xf86vidmodeReqType = X_XF86VidModeGetGammaRampSize;
+ req->screen = screen;
+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return False;
+ }
+ *size = rep.size;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return True;
+}
+
diff --git a/xc/lib/font/FreeType/ftfuncs.c b/xc/lib/font/FreeType/ftfuncs.c
index 10e320b38..941df8bee 100644
--- a/xc/lib/font/FreeType/ftfuncs.c
+++ b/xc/lib/font/FreeType/ftfuncs.c
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.17 2001/02/13 21:15:15 dawes Exp $ */
+/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.18 2001/05/16 08:32:33 alanh Exp $ */
#ifndef FONT_MODULE
#include <string.h>
@@ -739,7 +739,7 @@ FreeTypeAddProperties(TTFFont *font, FontScalablePtr vals, FontInfoPtr info,
int rawAverageWidth)
{
int i, j, maxprops;
- char *sp, *ep, val[256];
+ char *sp, *ep, val[MAXFONTNAMELEN];
TT_Instance_Metrics imetrics;
int upm; /* units per em */
TTFFace *face;
diff --git a/xc/lib/font/fontfile/fontdir.c b/xc/lib/font/fontfile/fontdir.c
index faad6e110..6c9883563 100644
--- a/xc/lib/font/fontfile/fontdir.c
+++ b/xc/lib/font/fontfile/fontdir.c
@@ -21,7 +21,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.14 2001/02/16 13:24:05 eich Exp $ */
+/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.17 2001/05/15 00:05:32 keithp Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
@@ -202,13 +202,52 @@ FontFileAddEntry(FontTablePtr table, FontEntryPtr prototype)
return entry;
}
+/*
+ * Compare two strings just like strcmp, but preserve decimal integer
+ * sorting order, i.e. "2" < "10" or "iso8859-2" < "iso8859-10" <
+ * "iso10646-1". Strings are sorted as if sequences of digits were
+ * prefixed by a length indicator (i.e., does not ignore leading zeroes).
+ *
+ * Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
+ */
+#define Xisdigit(c) ('\060' <= (c) && (c) <= '\071')
+
+static int strcmpn(const char *s1, const char *s2)
+{
+ int digits, predigits = 0;
+ const char *ss1, *ss2;
+
+ while (1) {
+ if (*s1 == 0 && *s2 == 0)
+ return 0;
+ digits = Xisdigit(*s1) && Xisdigit(*s2);
+ if (digits && !predigits) {
+ ss1 = s1;
+ ss2 = s2;
+ while (Xisdigit(*ss1) && Xisdigit(*ss2))
+ ss1++, ss2++;
+ if (!Xisdigit(*ss1) && Xisdigit(*ss2))
+ return -1;
+ if (Xisdigit(*ss1) && !Xisdigit(*ss2))
+ return 1;
+ }
+ if ((unsigned char)*s1 < (unsigned char)*s2)
+ return -1;
+ if ((unsigned char)*s1 > (unsigned char)*s2)
+ return 1;
+ predigits = digits;
+ s1++, s2++;
+ }
+}
+
+
static int
FontFileNameCompare(const void* a, const void* b)
{
FontEntryPtr a_name = (FontEntryPtr) a,
b_name = (FontEntryPtr) b;
- return strcmp(a_name->name.name, b_name->name.name);
+ return strcmpn(a_name->name.name, b_name->name.name);
}
void
@@ -244,6 +283,7 @@ FontFileSortDir(FontDirectoryPtr dir)
*/
#define isWild(c) ((c) == XK_asterisk || (c) == XK_question)
+#define isDigit(c) (XK_0 <= (c) && (c) <= XK_9)
static int
SetupWildMatch(FontTablePtr table, FontNamePtr pat,
@@ -253,6 +293,7 @@ SetupWildMatch(FontTablePtr table, FontNamePtr pat,
char c;
char *t;
char *firstWild;
+ char *firstDigit;
int first;
int center,
left,
@@ -263,12 +304,17 @@ SetupWildMatch(FontTablePtr table, FontNamePtr pat,
name = pat->name;
nDashes = pat->ndashes;
firstWild = 0;
+ firstDigit = 0;
t = name;
while ((c = *t++)) {
if (isWild(c)) {
if (!firstWild)
firstWild = t - 1;
}
+ if (isDigit(c)) {
+ if (!firstDigit)
+ firstDigit = t - 1;
+ }
}
left = 0;
right = table->used;
@@ -281,7 +327,10 @@ SetupWildMatch(FontTablePtr table, FontNamePtr pat,
*rightp = right;
return -1;
} else if (firstWild) {
- first = firstWild - name;
+ if (firstDigit && firstDigit < firstWild)
+ first = firstDigit - name;
+ else
+ first = firstWild - name;
while (left < right) {
center = (left + right) / 2;
result = strncmp(name, table->entries[center].name.name, first);
@@ -298,7 +347,7 @@ SetupWildMatch(FontTablePtr table, FontNamePtr pat,
} else {
while (left < right) {
center = (left + right) / 2;
- result = strcmp(name, table->entries[center].name.name);
+ result = strcmpn(name, table->entries[center].name.name);
if (result == 0)
return center;
if (result < 0)
@@ -574,7 +623,7 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName)
FontRendererPtr renderer;
FontEntryPtr existing;
FontScalableExtraPtr extra;
- FontEntryPtr bitmap, scalable;
+ FontEntryPtr bitmap = 0, scalable;
Bool isscale;
renderer = FontFileMatchRenderer (fileName);
diff --git a/xc/lib/freetype2/Imakefile b/xc/lib/freetype2/Imakefile
index a015d09fd..953afc269 100644
--- a/xc/lib/freetype2/Imakefile
+++ b/xc/lib/freetype2/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/freetype2/Imakefile,v 1.2 2001/02/08 00:55:40 keithp Exp $
+XCOMM $XFree86: xc/lib/freetype2/Imakefile,v 1.4 2001/05/16 03:57:27 keithp Exp $
#define IHaveSubdirs
#define PassCDebugFlags
@@ -19,14 +19,45 @@ FREETYPETOP = $(TOP)/extras/freetype2
FREETYPESRC = $(FREETYPETOP)/src
FREETYPEINC = $(FREETYPETOP)/include/freetype
-INCLUDES = $(FREETYPE2INCLUDES) -I$(FREETYPETOP)/src
+INCLUDES = -I. $(FREETYPE2INCLUDES)\
+ -I$(FREETYPESRC)\
+ -I$(FREETYPESRC)/base\
+ -I$(FREETYPESRC)/autohint\
+ -I$(FREETYPESRC)/sfnt\
+ -I$(FREETYPESRC)/cff\
+ -I$(FREETYPESRC)/psnames\
+ -I$(FREETYPESRC)/psaux\
+ -I$(FREETYPESRC)/truetype\
+ -I$(FREETYPESRC)/type1\
+ -I$(FREETYPESRC)/cid\
+ -I$(FREETYPESRC)/raster\
+ -I$(FREETYPESRC)/smooth\
+ -I$(FREETYPESRC)/winfonts\
+ -I$(FREETYPESRC)/pcf
SUBDIRS=freetype
-
-
-SRCS_BASE = ftsystem.c ftinit.c ftdebug.c ftbase.c ftglyph.c ftbbox.c ftmm.c
-OBJS_BASE = ftsystem.o ftinit.o ftdebug.o ftbase.o ftglyph.o ftbbox.o ftmm.o
+HEADERS=ft2build.h
+
+SRCS_BASE = ftbase.c \
+ ftbbox.c \
+ ftdebug.c \
+ ftextend.c \
+ ftglyph.c \
+ ftinit.c \
+ ftmm.c \
+ ftsynth.c \
+ ftsystem.c
+
+OBJS_BASE = ftbase.o \
+ ftbbox.o \
+ ftdebug.o \
+ ftextend.o \
+ ftglyph.o \
+ ftinit.o \
+ ftmm.o \
+ ftsynth.o \
+ ftsystem.o
SRCS_AUTOHINT = autohint.c
OBJS_AUTOHINT = autohint.o
@@ -61,14 +92,18 @@ OBJS_SMOOTH = smooth.o
SRCS_WINFONTS = winfnt.c
OBJS_WINFONTS = winfnt.o
+SRCS_PCF = pcf.c
+OBJS_PCF = pcf.o
SRCS = $(SRCS_BASE) $(SRCS_AUTOHINT) $(SRCS_SFNT) $(SRCS_CFF) \
$(SRCS_PSNAMES) $(SRCS_PSAUX) $(SRCS_TRUETYPE) $(SRCS_TYPE1) \
- $(SRCS_CID) $(SRCS_RASTER) $(SRCS_SMOOTH) $(SRCS_WINFONTS)
+ $(SRCS_CID) $(SRCS_RASTER) $(SRCS_SMOOTH) $(SRCS_WINFONTS) \
+ $(SRCS_PCF)
OBJS = $(OBJS_BASE) $(OBJS_AUTOHINT) $(OBJS_SFNT) $(OBJS_CFF) \
$(OBJS_PSNAMES) $(OBJS_PSAUX) $(OBJS_TRUETYPE) $(OBJS_TYPE1) \
- $(OBJS_CID) $(OBJS_RASTER) $(OBJS_SMOOTH) $(OBJS_WINFONTS)
+ $(OBJS_CID) $(OBJS_RASTER) $(OBJS_SMOOTH) $(OBJS_WINFONTS) \
+ $(OBJS_PCF)
#include <Library.tmpl>
@@ -81,14 +116,22 @@ MANSUFFIX = $(LIBMANSUFFIX)
InstallManPage(Freetype,$(LIBMANDIR))
#endif
+BuildIncludes($(HEADERS),freetype2,..)
+InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2,$(INSTINCFLAGS))
+
+LinkSourceFile(ft2build.h,$(FREETYPETOP)/include)
-LinkSourceFile(ftsystem.c,$(FREETYPESRC)/base)
-LinkSourceFile(ftinit.c,$(FREETYPESRC)/base)
-LinkSourceFile(ftdebug.c,$(FREETYPESRC)/base)
LinkSourceFile(ftbase.c,$(FREETYPESRC)/base)
-LinkSourceFile(ftglyph.c,$(FREETYPESRC)/base)
LinkSourceFile(ftbbox.c,$(FREETYPESRC)/base)
+LinkSourceFile(ftdebug.c,$(FREETYPESRC)/base)
+LinkSourceFile(ftextend.c,$(FREETYPESRC)/base)
+LinkSourceFile(ftglyph.c,$(FREETYPESRC)/base)
+LinkSourceFile(ftinit.c,$(FREETYPESRC)/base)
+LinkSourceFile(ftlist.c,$(FREETYPESRC)/base)
LinkSourceFile(ftmm.c,$(FREETYPESRC)/base)
+LinkSourceFile(ftsynth.c,$(FREETYPESRC)/base)
+LinkSourceFile(ftsystem.c,$(FREETYPESRC)/base)
+
LinkSourceFile(autohint.c,$(FREETYPESRC)/autohint)
LinkSourceFile(sfnt.c,$(FREETYPESRC)/sfnt)
LinkSourceFile(cff.c,$(FREETYPESRC)/cff)
@@ -100,6 +143,8 @@ LinkSourceFile(type1cid.c,$(FREETYPESRC)/cid)
LinkSourceFile(raster.c,$(FREETYPESRC)/raster)
LinkSourceFile(smooth.c,$(FREETYPESRC)/smooth)
LinkSourceFile(winfnt.c,$(FREETYPESRC)/winfonts)
-
+LinkSourceFile(pcf.c,$(FREETYPESRC)/pcf)
DependTarget()
+
+DependSubdirs($(SUBDIRS))
diff --git a/xc/lib/freetype2/freetype/Imakefile b/xc/lib/freetype2/freetype/Imakefile
index beb44b31e..57bd20c28 100644
--- a/xc/lib/freetype2/freetype/Imakefile
+++ b/xc/lib/freetype2/freetype/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/freetype2/freetype/Imakefile,v 1.2 2001/02/09 00:35:03 keithp Exp $
+XCOMM $XFree86: xc/lib/freetype2/freetype/Imakefile,v 1.4 2001/05/16 03:57:27 keithp Exp $
#define IHaveSubdirs
#define PassCDebugFlags
@@ -20,9 +20,9 @@ HEADERS= \
ftmac.h \
ftmm.h \
ftmodule.h \
- ftnames.h \
ftoutln.h \
ftrender.h \
+ ftsnames.h \
ftsynth.h \
ftsystem.h \
fttypes.h \
@@ -44,9 +44,9 @@ LinkSourceFile(ftlist.h,$(FREETYPEINC))
LinkSourceFile(ftmac.h,$(FREETYPEINC))
LinkSourceFile(ftmm.h,$(FREETYPEINC))
LinkSourceFile(ftmodule.h,$(FREETYPEINC))
-LinkSourceFile(ftnames.h,$(FREETYPEINC))
LinkSourceFile(ftoutln.h,$(FREETYPEINC))
LinkSourceFile(ftrender.h,$(FREETYPEINC))
+LinkSourceFile(ftsnames.h,$(FREETYPEINC))
LinkSourceFile(ftsynth.h,$(FREETYPEINC))
LinkSourceFile(ftsystem.h,$(FREETYPEINC))
LinkSourceFile(fttypes.h,$(FREETYPEINC))
@@ -54,3 +54,5 @@ LinkSourceFile(t1tables.h,$(FREETYPEINC))
LinkSourceFile(ttnameid.h,$(FREETYPEINC))
LinkSourceFile(tttables.h,$(FREETYPEINC))
LinkSourceFile(tttags.h,$(FREETYPEINC))
+
+DependSubdirs($(SUBDIRS))
diff --git a/xc/lib/freetype2/freetype/config/Imakefile b/xc/lib/freetype2/freetype/config/Imakefile
index 2e0a7583e..2bf44b187 100644
--- a/xc/lib/freetype2/freetype/config/Imakefile
+++ b/xc/lib/freetype2/freetype/config/Imakefile
@@ -1,19 +1,19 @@
-XCOMM $XFree86: xc/lib/freetype2/freetype/config/Imakefile,v 1.1 2001/02/08 00:55:41 keithp Exp $
+XCOMM $XFree86: xc/lib/freetype2/freetype/config/Imakefile,v 1.2 2001/05/16 03:57:28 keithp Exp $
FREETYPETOP = $(TOP)/extras/freetype2
FREETYPESRC = $(FREETYPETOP)/src
FREETYPEINC = $(FREETYPETOP)/include/freetype
HEADERS= \
- ftbuild.h \
ftconfig.h \
+ ftheader.h \
ftmodule.h \
ftoption.h
BuildIncludes($(HEADERS),freetype2/freetype/config,../../..)
InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/config,$(INSTINCFLAGS))
-LinkSourceFile(ftbuild.h,$(FREETYPEINC)/config)
LinkSourceFile(ftconfig.h,$(FREETYPEINC)/config)
+LinkSourceFile(ftheader.h,$(FREETYPEINC)/config)
LinkSourceFile(ftmodule.h,$(FREETYPEINC)/config)
LinkSourceFile(ftoption.h,$(FREETYPEINC)/config)
diff --git a/xc/lib/freetype2/freetype/internal/Imakefile b/xc/lib/freetype2/freetype/internal/Imakefile
index 7814a43de..1399554b4 100644
--- a/xc/lib/freetype2/freetype/internal/Imakefile
+++ b/xc/lib/freetype2/freetype/internal/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/lib/freetype2/freetype/internal/Imakefile,v 1.1 2001/02/09 00:35:03 keithp Exp $
+XCOMM $XFree86: xc/lib/freetype2/freetype/internal/Imakefile,v 1.2 2001/05/16 03:57:28 keithp Exp $
FREETYPETOP = $(TOP)/extras/freetype2
FREETYPESRC = $(FREETYPETOP)/src
@@ -6,6 +6,8 @@ FREETYPEINC = $(FREETYPETOP)/include/freetype
HEADERS= \
autohint.h \
+ cfferrs.h \
+ cfftypes.h \
fnttypes.h \
ftcalc.h \
ftdebug.h \
@@ -15,13 +17,12 @@ HEADERS= \
ftobjs.h \
ftstream.h \
internal.h \
+ pcftypes.h \
psaux.h \
psnames.h \
sfnt.h \
t1errors.h \
t1types.h \
- t2errors.h \
- t2types.h \
tterrors.h \
tttypes.h
@@ -29,6 +30,8 @@ BuildIncludes($(HEADERS),freetype2/freetype/internal,../../..)
InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/internal,$(INSTINCFLAGS))
LinkSourceFile(autohint.h,$(FREETYPEINC)/internal)
+LinkSourceFile(cfferrs.h,$(FREETYPEINC)/internal)
+LinkSourceFile(cfftypes.h,$(FREETYPEINC)/internal)
LinkSourceFile(fnttypes.h,$(FREETYPEINC)/internal)
LinkSourceFile(ftcalc.h,$(FREETYPEINC)/internal)
LinkSourceFile(ftdebug.h,$(FREETYPEINC)/internal)
@@ -38,12 +41,11 @@ LinkSourceFile(ftmemory.h,$(FREETYPEINC)/internal)
LinkSourceFile(ftobjs.h,$(FREETYPEINC)/internal)
LinkSourceFile(ftstream.h,$(FREETYPEINC)/internal)
LinkSourceFile(internal.h,$(FREETYPEINC)/internal)
+LinkSourceFile(pcftypes.h,$(FREETYPEINC)/internal)
LinkSourceFile(psaux.h,$(FREETYPEINC)/internal)
LinkSourceFile(psnames.h,$(FREETYPEINC)/internal)
LinkSourceFile(sfnt.h,$(FREETYPEINC)/internal)
LinkSourceFile(t1errors.h,$(FREETYPEINC)/internal)
LinkSourceFile(t1types.h,$(FREETYPEINC)/internal)
-LinkSourceFile(t2errors.h,$(FREETYPEINC)/internal)
-LinkSourceFile(t2types.h,$(FREETYPEINC)/internal)
LinkSourceFile(tterrors.h,$(FREETYPEINC)/internal)
LinkSourceFile(tttypes.h,$(FREETYPEINC)/internal)