aboutsummaryrefslogtreecommitdiff
path: root/x11-servers
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2003-03-15 04:28:02 +0000
committerEric Anholt <anholt@FreeBSD.org>2003-03-15 04:28:02 +0000
commitf9deefe2e92fe61d1e67b5cd12809cd059045970 (patch)
treecaa6c688e1c8ff813d34801fd892009da8b0e528 /x11-servers
parent1bf581dbd8de1bebf27d8585392ed7a9c707c689 (diff)
downloadports-f9deefe2e92fe61d1e67b5cd12809cd059045970.tar.gz
ports-f9deefe2e92fe61d1e67b5cd12809cd059045970.zip
Notes
Diffstat (limited to 'x11-servers')
-rw-r--r--x11-servers/XFree86-4-Server-snap/Makefile4
-rw-r--r--x11-servers/XFree86-4-Server-snap/files/patch-mga_driver.c13
-rw-r--r--x11-servers/XFree86-4-Server-snap/files/patch-r128_driver.c30
-rw-r--r--x11-servers/XFree86-4-Server-snap/files/patch-radeondri234
-rw-r--r--x11-servers/XFree86-4-Server/Makefile4
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-mga_driver.c13
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-r128_driver.c30
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-radeondri234
8 files changed, 560 insertions, 2 deletions
diff --git a/x11-servers/XFree86-4-Server-snap/Makefile b/x11-servers/XFree86-4-Server-snap/Makefile
index fa27b5ccc63e..90266d713a12 100644
--- a/x11-servers/XFree86-4-Server-snap/Makefile
+++ b/x11-servers/XFree86-4-Server-snap/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Server
PORTVERSION= 4.3.0
+PORTREVISION= 1
CATEGORIES= x11-servers
MASTER_SITES= ${MASTER_SITE_XFREE:S/$/:x/} \
${MASTER_SITE_LOCAL:S/$/:local/}
@@ -30,7 +31,8 @@ INSTALLS_SHLIB= YES
DIST_SUBDIR= xc
WRKSRC= ${WRKDIR}/xc
PATCHDIR= ${.CURDIR}/../../x11/XFree86-4-libraries/files
-.for pf in patch-savage-pci-id patch-alpha_video.c patch-Pci.h
+.for pf in patch-savage-pci-id patch-alpha_video.c patch-Pci.h patch-radeondri \
+ patch-r128_driver.c patch-mga_driver.c
EXTRA_PATCHES+= ${FILESDIR}/${pf}
.endfor
SCRIPTS_ENV= OSVERSION=${OSVERSION} \
diff --git a/x11-servers/XFree86-4-Server-snap/files/patch-mga_driver.c b/x11-servers/XFree86-4-Server-snap/files/patch-mga_driver.c
new file mode 100644
index 000000000000..13228b270c5b
--- /dev/null
+++ b/x11-servers/XFree86-4-Server-snap/files/patch-mga_driver.c
@@ -0,0 +1,13 @@
+--- programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c.orig Wed Jan 29 11:29:49 2003
++++ programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c Thu Mar 13 00:12:12 2003
+@@ -304,7 +304,10 @@
+ "drmAgpVendorId",
+ "drmCommandNone",
+ "drmCommandWrite",
++ "drmCtlInstHandler",
++ "drmCtlUninstHandler",
+ "drmFreeVersion",
++ "drmGetInterruptFromBusID",
+ "drmGetLibVersion",
+ "drmGetVersion",
+ "drmMap",
diff --git a/x11-servers/XFree86-4-Server-snap/files/patch-r128_driver.c b/x11-servers/XFree86-4-Server-snap/files/patch-r128_driver.c
new file mode 100644
index 000000000000..6274de047f4e
--- /dev/null
+++ b/x11-servers/XFree86-4-Server-snap/files/patch-r128_driver.c
@@ -0,0 +1,30 @@
+--- programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c.orig Tue Feb 18 17:19:41 2003
++++ programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c Thu Mar 13 00:12:12 2003
+@@ -275,6 +275,7 @@
+ "drmAddMap",
+ "drmAgpAcquire",
+ "drmAgpAlloc",
++ "drmAgpBase",
+ "drmAgpBind",
+ "drmAgpDeviceId",
+ "drmAgpEnable",
+@@ -288,8 +289,11 @@
+ "drmCommandRead",
+ "drmCommandWrite",
+ "drmCommandWriteRead",
++ "drmCtlInstHandler",
++ "drmCtlUninstHandler",
+ "drmFreeBufs",
+ "drmFreeVersion",
++ "drmGetInterruptFromBusID",
+ "drmGetLibVersion",
+ "drmGetVersion",
+ "drmMap",
+@@ -307,6 +311,7 @@
+ "DRICreateInfoRec",
+ "DRIDestroyInfoRec",
+ "DRIFinishScreenInit",
++ "DRIGetDeviceInfo",
+ "DRIGetSAREAPrivate",
+ "DRILock",
+ "DRIQueryVersion",
diff --git a/x11-servers/XFree86-4-Server-snap/files/patch-radeondri b/x11-servers/XFree86-4-Server-snap/files/patch-radeondri
new file mode 100644
index 000000000000..33d2bc6562b4
--- /dev/null
+++ b/x11-servers/XFree86-4-Server-snap/files/patch-radeondri
@@ -0,0 +1,234 @@
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_context.c lib/GL/mesa/src/drv/r200/r200_context.c
+--- lib/GL/mesa/src/drv.orig/r200/r200_context.c Tue Mar 11 17:51:23 2003
++++ lib/GL/mesa/src/drv/r200/r200_context.c Tue Mar 11 17:46:57 2003
+@@ -391,6 +391,7 @@
+ */
+ _tnl_destroy_pipeline( ctx );
+ _tnl_install_pipeline( ctx, r200_pipeline );
++ ctx->Driver.FlushVertices = r200FlushVertices;
+
+ /* Try and keep materials and vertices separate:
+ */
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_swtcl.c lib/GL/mesa/src/drv/r200/r200_swtcl.c
+--- lib/GL/mesa/src/drv.orig/r200/r200_swtcl.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/r200/r200_swtcl.c Tue Mar 11 17:46:57 2003
+@@ -44,6 +44,7 @@
+ #include "math/m_translate.h"
+ #include "tnl/tnl.h"
+ #include "tnl/t_context.h"
++#include "tnl/t_imm_exec.h"
+ #include "tnl/t_pipeline.h"
+
+ #include "r200_context.h"
+@@ -1220,6 +1221,14 @@
+ r200ChooseVertexState( ctx );
+ }
+
++
++void r200FlushVertices( GLcontext *ctx, GLuint flags )
++{
++ _tnl_flush_vertices( ctx, flags );
++
++ if (flags & FLUSH_STORED_VERTICES)
++ R200_FIREVERTICES( R200_CONTEXT( ctx ) );
++}
+
+ /**********************************************************************/
+ /* Initialization. */
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_swtcl.h lib/GL/mesa/src/drv/r200/r200_swtcl.h
+--- lib/GL/mesa/src/drv.orig/r200/r200_swtcl.h Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/r200/r200_swtcl.h Tue Mar 11 17:46:57 2003
+@@ -42,6 +42,7 @@
+ extern void r200InitSwtcl( GLcontext *ctx );
+ extern void r200DestroySwtcl( GLcontext *ctx );
+
++extern void r200FlushVertices( GLcontext *ctx, GLuint flags );
+ extern void r200ChooseRenderState( GLcontext *ctx );
+ extern void r200ChooseVertexState( GLcontext *ctx );
+
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_vtxfmt.c lib/GL/mesa/src/drv/r200/r200_vtxfmt.c
+--- lib/GL/mesa/src/drv.orig/r200/r200_vtxfmt.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/r200/r200_vtxfmt.c Tue Mar 11 17:47:00 2003
+@@ -38,6 +38,7 @@
+ #include "r200_ioctl.h"
+ #include "r200_tex.h"
+ #include "r200_tcl.h"
++#include "r200_swtcl.h"
+ #include "r200_vtxfmt.h"
+
+ #include "api_noop.h"
+@@ -59,7 +60,7 @@
+
+ struct r200_vb vb;
+
+-static void r200FlushVertices( GLcontext *, GLuint );
++static void r200VtxFmtFlushVertices( GLcontext *, GLuint );
+
+ static void count_func( const char *name, struct dynfn *l )
+ {
+@@ -357,12 +358,13 @@
+ fprintf(stderr, "%s from %s\n", __FUNCTION__, caller);
+
+ if (ctx->Driver.NeedFlush)
+- r200FlushVertices( ctx, ctx->Driver.NeedFlush );
++ r200VtxFmtFlushVertices( ctx, ctx->Driver.NeedFlush );
+
+ if (ctx->NewState)
+ _mesa_update_state( ctx ); /* clear state so fell_back sticks */
+
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = r200FlushVertices;
+
+ assert( rmesa->dma.flush == 0 );
+ rmesa->vb.fell_back = GL_TRUE;
+@@ -404,6 +406,7 @@
+ prim = rmesa->vb.prim[0];
+ ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = r200FlushVertices;
+
+ assert(rmesa->dma.flush == 0);
+ rmesa->vb.fell_back = GL_TRUE;
+@@ -756,7 +759,7 @@
+ fprintf(stderr, "reinstall (new install)\n");
+
+ _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );
+- ctx->Driver.FlushVertices = r200FlushVertices;
++ ctx->Driver.FlushVertices = r200VtxFmtFlushVertices;
+ ctx->Driver.NewList = r200NewList;
+ rmesa->vb.installed = GL_TRUE;
+ vb.context = ctx;
+@@ -772,6 +775,7 @@
+ if (rmesa->dma.flush)
+ rmesa->dma.flush( rmesa );
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = r200FlushVertices;
+ rmesa->vb.installed = GL_FALSE;
+ vb.context = 0;
+ }
+@@ -931,7 +935,7 @@
+ return GL_TRUE;
+ }
+
+-static void r200FlushVertices( GLcontext *ctx, GLuint flags )
++static void r200VtxFmtFlushVertices( GLcontext *ctx, GLuint flags )
+ {
+ r200ContextPtr rmesa = R200_CONTEXT( ctx );
+
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_context.c lib/GL/mesa/src/drv/radeon/radeon_context.c
+--- lib/GL/mesa/src/drv.orig/radeon/radeon_context.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/radeon/radeon_context.c Tue Mar 11 17:47:00 2003
+@@ -382,6 +382,7 @@
+ */
+ _tnl_destroy_pipeline( ctx );
+ _tnl_install_pipeline( ctx, radeon_pipeline );
++ ctx->Driver.FlushVertices = radeonFlushVertices;
+
+ /* Try and keep materials and vertices separate:
+ */
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.c lib/GL/mesa/src/drv/radeon/radeon_swtcl.c
+--- lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/radeon/radeon_swtcl.c Tue Mar 11 17:47:00 2003
+@@ -45,6 +45,7 @@
+ #include "math/m_translate.h"
+ #include "tnl/tnl.h"
+ #include "tnl/t_context.h"
++#include "tnl/t_imm_exec.h"
+ #include "tnl/t_pipeline.h"
+
+ #include "radeon_context.h"
+@@ -1133,6 +1134,14 @@
+ }
+ }
+
++
++void radeonFlushVertices( GLcontext *ctx, GLuint flags )
++{
++ _tnl_flush_vertices( ctx, flags );
++
++ if (flags & FLUSH_STORED_VERTICES)
++ RADEON_FIREVERTICES( RADEON_CONTEXT( ctx ) );
++}
+
+ /**********************************************************************/
+ /* Initialization. */
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.h lib/GL/mesa/src/drv/radeon/radeon_swtcl.h
+--- lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.h Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/radeon/radeon_swtcl.h Tue Mar 11 17:47:00 2003
+@@ -43,6 +43,7 @@
+ extern void radeonInitSwtcl( GLcontext *ctx );
+ extern void radeonDestroySwtcl( GLcontext *ctx );
+
++extern void radeonFlushVertices( GLcontext *ctx, GLuint flags );
+ extern void radeonChooseRenderState( GLcontext *ctx );
+ extern void radeonChooseVertexState( GLcontext *ctx );
+
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_vtxfmt.c lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c
+--- lib/GL/mesa/src/drv.orig/radeon/radeon_vtxfmt.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c Tue Mar 11 17:47:01 2003
+@@ -38,6 +38,7 @@
+ #include "radeon_ioctl.h"
+ #include "radeon_tex.h"
+ #include "radeon_tcl.h"
++#include "radeon_swtcl.h"
+ #include "radeon_vtxfmt.h"
+
+ #include "api_noop.h"
+@@ -59,7 +60,7 @@
+
+ struct radeon_vb vb;
+
+-static void radeonFlushVertices( GLcontext *, GLuint );
++static void radeonVtxfmtFlushVertices( GLcontext *, GLuint );
+
+ static void count_func( const char *name, struct dynfn *l )
+ {
+@@ -336,12 +337,13 @@
+ fprintf(stderr, "%s from %s\n", __FUNCTION__, caller);
+
+ if (ctx->Driver.NeedFlush)
+- radeonFlushVertices( ctx, ctx->Driver.NeedFlush );
++ radeonVtxfmtFlushVertices( ctx, ctx->Driver.NeedFlush );
+
+ if (ctx->NewState)
+ _mesa_update_state( ctx ); /* clear state so fell_back sticks */
+
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = radeonFlushVertices;
+
+ assert( rmesa->dma.flush == 0 );
+ rmesa->vb.fell_back = GL_TRUE;
+@@ -382,6 +384,7 @@
+ prim = rmesa->vb.prim[0];
+ ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = radeonFlushVertices;
+
+ assert(rmesa->dma.flush == 0);
+ rmesa->vb.fell_back = GL_TRUE;
+@@ -731,7 +734,7 @@
+ fprintf(stderr, "reinstall (new install)\n");
+
+ _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );
+- ctx->Driver.FlushVertices = radeonFlushVertices;
++ ctx->Driver.FlushVertices = radeonVtxfmtFlushVertices;
+ ctx->Driver.NewList = radeonNewList;
+ rmesa->vb.installed = GL_TRUE;
+ vb.context = ctx;
+@@ -747,6 +750,7 @@
+ if (rmesa->dma.flush)
+ rmesa->dma.flush( rmesa );
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = radeonFlushVertices;
+ rmesa->vb.installed = GL_FALSE;
+ vb.context = 0;
+ }
+@@ -905,7 +909,7 @@
+ return GL_TRUE;
+ }
+
+-static void radeonFlushVertices( GLcontext *ctx, GLuint flags )
++static void radeonVtxfmtFlushVertices( GLcontext *ctx, GLuint flags )
+ {
+ radeonContextPtr rmesa = RADEON_CONTEXT( ctx );
+
diff --git a/x11-servers/XFree86-4-Server/Makefile b/x11-servers/XFree86-4-Server/Makefile
index fa27b5ccc63e..90266d713a12 100644
--- a/x11-servers/XFree86-4-Server/Makefile
+++ b/x11-servers/XFree86-4-Server/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Server
PORTVERSION= 4.3.0
+PORTREVISION= 1
CATEGORIES= x11-servers
MASTER_SITES= ${MASTER_SITE_XFREE:S/$/:x/} \
${MASTER_SITE_LOCAL:S/$/:local/}
@@ -30,7 +31,8 @@ INSTALLS_SHLIB= YES
DIST_SUBDIR= xc
WRKSRC= ${WRKDIR}/xc
PATCHDIR= ${.CURDIR}/../../x11/XFree86-4-libraries/files
-.for pf in patch-savage-pci-id patch-alpha_video.c patch-Pci.h
+.for pf in patch-savage-pci-id patch-alpha_video.c patch-Pci.h patch-radeondri \
+ patch-r128_driver.c patch-mga_driver.c
EXTRA_PATCHES+= ${FILESDIR}/${pf}
.endfor
SCRIPTS_ENV= OSVERSION=${OSVERSION} \
diff --git a/x11-servers/XFree86-4-Server/files/patch-mga_driver.c b/x11-servers/XFree86-4-Server/files/patch-mga_driver.c
new file mode 100644
index 000000000000..13228b270c5b
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-mga_driver.c
@@ -0,0 +1,13 @@
+--- programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c.orig Wed Jan 29 11:29:49 2003
++++ programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c Thu Mar 13 00:12:12 2003
+@@ -304,7 +304,10 @@
+ "drmAgpVendorId",
+ "drmCommandNone",
+ "drmCommandWrite",
++ "drmCtlInstHandler",
++ "drmCtlUninstHandler",
+ "drmFreeVersion",
++ "drmGetInterruptFromBusID",
+ "drmGetLibVersion",
+ "drmGetVersion",
+ "drmMap",
diff --git a/x11-servers/XFree86-4-Server/files/patch-r128_driver.c b/x11-servers/XFree86-4-Server/files/patch-r128_driver.c
new file mode 100644
index 000000000000..6274de047f4e
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-r128_driver.c
@@ -0,0 +1,30 @@
+--- programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c.orig Tue Feb 18 17:19:41 2003
++++ programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c Thu Mar 13 00:12:12 2003
+@@ -275,6 +275,7 @@
+ "drmAddMap",
+ "drmAgpAcquire",
+ "drmAgpAlloc",
++ "drmAgpBase",
+ "drmAgpBind",
+ "drmAgpDeviceId",
+ "drmAgpEnable",
+@@ -288,8 +289,11 @@
+ "drmCommandRead",
+ "drmCommandWrite",
+ "drmCommandWriteRead",
++ "drmCtlInstHandler",
++ "drmCtlUninstHandler",
+ "drmFreeBufs",
+ "drmFreeVersion",
++ "drmGetInterruptFromBusID",
+ "drmGetLibVersion",
+ "drmGetVersion",
+ "drmMap",
+@@ -307,6 +311,7 @@
+ "DRICreateInfoRec",
+ "DRIDestroyInfoRec",
+ "DRIFinishScreenInit",
++ "DRIGetDeviceInfo",
+ "DRIGetSAREAPrivate",
+ "DRILock",
+ "DRIQueryVersion",
diff --git a/x11-servers/XFree86-4-Server/files/patch-radeondri b/x11-servers/XFree86-4-Server/files/patch-radeondri
new file mode 100644
index 000000000000..33d2bc6562b4
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-radeondri
@@ -0,0 +1,234 @@
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_context.c lib/GL/mesa/src/drv/r200/r200_context.c
+--- lib/GL/mesa/src/drv.orig/r200/r200_context.c Tue Mar 11 17:51:23 2003
++++ lib/GL/mesa/src/drv/r200/r200_context.c Tue Mar 11 17:46:57 2003
+@@ -391,6 +391,7 @@
+ */
+ _tnl_destroy_pipeline( ctx );
+ _tnl_install_pipeline( ctx, r200_pipeline );
++ ctx->Driver.FlushVertices = r200FlushVertices;
+
+ /* Try and keep materials and vertices separate:
+ */
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_swtcl.c lib/GL/mesa/src/drv/r200/r200_swtcl.c
+--- lib/GL/mesa/src/drv.orig/r200/r200_swtcl.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/r200/r200_swtcl.c Tue Mar 11 17:46:57 2003
+@@ -44,6 +44,7 @@
+ #include "math/m_translate.h"
+ #include "tnl/tnl.h"
+ #include "tnl/t_context.h"
++#include "tnl/t_imm_exec.h"
+ #include "tnl/t_pipeline.h"
+
+ #include "r200_context.h"
+@@ -1220,6 +1221,14 @@
+ r200ChooseVertexState( ctx );
+ }
+
++
++void r200FlushVertices( GLcontext *ctx, GLuint flags )
++{
++ _tnl_flush_vertices( ctx, flags );
++
++ if (flags & FLUSH_STORED_VERTICES)
++ R200_FIREVERTICES( R200_CONTEXT( ctx ) );
++}
+
+ /**********************************************************************/
+ /* Initialization. */
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_swtcl.h lib/GL/mesa/src/drv/r200/r200_swtcl.h
+--- lib/GL/mesa/src/drv.orig/r200/r200_swtcl.h Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/r200/r200_swtcl.h Tue Mar 11 17:46:57 2003
+@@ -42,6 +42,7 @@
+ extern void r200InitSwtcl( GLcontext *ctx );
+ extern void r200DestroySwtcl( GLcontext *ctx );
+
++extern void r200FlushVertices( GLcontext *ctx, GLuint flags );
+ extern void r200ChooseRenderState( GLcontext *ctx );
+ extern void r200ChooseVertexState( GLcontext *ctx );
+
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_vtxfmt.c lib/GL/mesa/src/drv/r200/r200_vtxfmt.c
+--- lib/GL/mesa/src/drv.orig/r200/r200_vtxfmt.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/r200/r200_vtxfmt.c Tue Mar 11 17:47:00 2003
+@@ -38,6 +38,7 @@
+ #include "r200_ioctl.h"
+ #include "r200_tex.h"
+ #include "r200_tcl.h"
++#include "r200_swtcl.h"
+ #include "r200_vtxfmt.h"
+
+ #include "api_noop.h"
+@@ -59,7 +60,7 @@
+
+ struct r200_vb vb;
+
+-static void r200FlushVertices( GLcontext *, GLuint );
++static void r200VtxFmtFlushVertices( GLcontext *, GLuint );
+
+ static void count_func( const char *name, struct dynfn *l )
+ {
+@@ -357,12 +358,13 @@
+ fprintf(stderr, "%s from %s\n", __FUNCTION__, caller);
+
+ if (ctx->Driver.NeedFlush)
+- r200FlushVertices( ctx, ctx->Driver.NeedFlush );
++ r200VtxFmtFlushVertices( ctx, ctx->Driver.NeedFlush );
+
+ if (ctx->NewState)
+ _mesa_update_state( ctx ); /* clear state so fell_back sticks */
+
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = r200FlushVertices;
+
+ assert( rmesa->dma.flush == 0 );
+ rmesa->vb.fell_back = GL_TRUE;
+@@ -404,6 +406,7 @@
+ prim = rmesa->vb.prim[0];
+ ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = r200FlushVertices;
+
+ assert(rmesa->dma.flush == 0);
+ rmesa->vb.fell_back = GL_TRUE;
+@@ -756,7 +759,7 @@
+ fprintf(stderr, "reinstall (new install)\n");
+
+ _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );
+- ctx->Driver.FlushVertices = r200FlushVertices;
++ ctx->Driver.FlushVertices = r200VtxFmtFlushVertices;
+ ctx->Driver.NewList = r200NewList;
+ rmesa->vb.installed = GL_TRUE;
+ vb.context = ctx;
+@@ -772,6 +775,7 @@
+ if (rmesa->dma.flush)
+ rmesa->dma.flush( rmesa );
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = r200FlushVertices;
+ rmesa->vb.installed = GL_FALSE;
+ vb.context = 0;
+ }
+@@ -931,7 +935,7 @@
+ return GL_TRUE;
+ }
+
+-static void r200FlushVertices( GLcontext *ctx, GLuint flags )
++static void r200VtxFmtFlushVertices( GLcontext *ctx, GLuint flags )
+ {
+ r200ContextPtr rmesa = R200_CONTEXT( ctx );
+
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_context.c lib/GL/mesa/src/drv/radeon/radeon_context.c
+--- lib/GL/mesa/src/drv.orig/radeon/radeon_context.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/radeon/radeon_context.c Tue Mar 11 17:47:00 2003
+@@ -382,6 +382,7 @@
+ */
+ _tnl_destroy_pipeline( ctx );
+ _tnl_install_pipeline( ctx, radeon_pipeline );
++ ctx->Driver.FlushVertices = radeonFlushVertices;
+
+ /* Try and keep materials and vertices separate:
+ */
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.c lib/GL/mesa/src/drv/radeon/radeon_swtcl.c
+--- lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/radeon/radeon_swtcl.c Tue Mar 11 17:47:00 2003
+@@ -45,6 +45,7 @@
+ #include "math/m_translate.h"
+ #include "tnl/tnl.h"
+ #include "tnl/t_context.h"
++#include "tnl/t_imm_exec.h"
+ #include "tnl/t_pipeline.h"
+
+ #include "radeon_context.h"
+@@ -1133,6 +1134,14 @@
+ }
+ }
+
++
++void radeonFlushVertices( GLcontext *ctx, GLuint flags )
++{
++ _tnl_flush_vertices( ctx, flags );
++
++ if (flags & FLUSH_STORED_VERTICES)
++ RADEON_FIREVERTICES( RADEON_CONTEXT( ctx ) );
++}
+
+ /**********************************************************************/
+ /* Initialization. */
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.h lib/GL/mesa/src/drv/radeon/radeon_swtcl.h
+--- lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.h Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/radeon/radeon_swtcl.h Tue Mar 11 17:47:00 2003
+@@ -43,6 +43,7 @@
+ extern void radeonInitSwtcl( GLcontext *ctx );
+ extern void radeonDestroySwtcl( GLcontext *ctx );
+
++extern void radeonFlushVertices( GLcontext *ctx, GLuint flags );
+ extern void radeonChooseRenderState( GLcontext *ctx );
+ extern void radeonChooseVertexState( GLcontext *ctx );
+
+diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_vtxfmt.c lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c
+--- lib/GL/mesa/src/drv.orig/radeon/radeon_vtxfmt.c Tue Mar 11 17:51:29 2003
++++ lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c Tue Mar 11 17:47:01 2003
+@@ -38,6 +38,7 @@
+ #include "radeon_ioctl.h"
+ #include "radeon_tex.h"
+ #include "radeon_tcl.h"
++#include "radeon_swtcl.h"
+ #include "radeon_vtxfmt.h"
+
+ #include "api_noop.h"
+@@ -59,7 +60,7 @@
+
+ struct radeon_vb vb;
+
+-static void radeonFlushVertices( GLcontext *, GLuint );
++static void radeonVtxfmtFlushVertices( GLcontext *, GLuint );
+
+ static void count_func( const char *name, struct dynfn *l )
+ {
+@@ -336,12 +337,13 @@
+ fprintf(stderr, "%s from %s\n", __FUNCTION__, caller);
+
+ if (ctx->Driver.NeedFlush)
+- radeonFlushVertices( ctx, ctx->Driver.NeedFlush );
++ radeonVtxfmtFlushVertices( ctx, ctx->Driver.NeedFlush );
+
+ if (ctx->NewState)
+ _mesa_update_state( ctx ); /* clear state so fell_back sticks */
+
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = radeonFlushVertices;
+
+ assert( rmesa->dma.flush == 0 );
+ rmesa->vb.fell_back = GL_TRUE;
+@@ -382,6 +384,7 @@
+ prim = rmesa->vb.prim[0];
+ ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = radeonFlushVertices;
+
+ assert(rmesa->dma.flush == 0);
+ rmesa->vb.fell_back = GL_TRUE;
+@@ -731,7 +734,7 @@
+ fprintf(stderr, "reinstall (new install)\n");
+
+ _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );
+- ctx->Driver.FlushVertices = radeonFlushVertices;
++ ctx->Driver.FlushVertices = radeonVtxfmtFlushVertices;
+ ctx->Driver.NewList = radeonNewList;
+ rmesa->vb.installed = GL_TRUE;
+ vb.context = ctx;
+@@ -747,6 +750,7 @@
+ if (rmesa->dma.flush)
+ rmesa->dma.flush( rmesa );
+ _tnl_wakeup_exec( ctx );
++ ctx->Driver.FlushVertices = radeonFlushVertices;
+ rmesa->vb.installed = GL_FALSE;
+ vb.context = 0;
+ }
+@@ -905,7 +909,7 @@
+ return GL_TRUE;
+ }
+
+-static void radeonFlushVertices( GLcontext *ctx, GLuint flags )
++static void radeonVtxfmtFlushVertices( GLcontext *ctx, GLuint flags )
+ {
+ radeonContextPtr rmesa = RADEON_CONTEXT( ctx );
+