summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c16
-rw-r--r--src/mesa/drivers/dri/savage/savagecontext.h2
-rw-r--r--src/mesa/drivers/dri/savage/savagedd.c2
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.c16
-rw-r--r--src/mesa/drivers/dri/savage/savagetris.c7
5 files changed, 14 insertions, 29 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index 8d274866371..8e11ef24995 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -247,7 +247,8 @@ savageDestroyScreen(__DRIscreenPrivate *sPriv)
{
savageScreenPrivate *savageScreen = (savageScreenPrivate *)sPriv->private;
- drmUnmapBufs(savageScreen->bufs);
+ if (savageScreen->bufs)
+ drmUnmapBufs(savageScreen->bufs);
/* free all option information */
driDestroyOptionInfo (&savageScreen->optionCache);
@@ -492,16 +493,11 @@ savageCreateContext( const __GLcontextModes *mesaVis,
"version 2.2.\n");
imesa->enable_fastpath = GL_FALSE;
}
-
- imesa->enable_vdma = driQueryOptionb(&imesa->optionCache, "enable_vdma");
- if (imesa->enable_vdma && savageScreen->chipset == S3_SUPERSAVAGE) {
- fprintf (stderr,
- "*** Disabling vertex DMA on SuperSavage. Someone has to "
- "find out, how to make\n*** it work without locking up. "
- "To disable this message set option enable_vdma\n"
- "*** to \"false\" in DRIConf.\n");
+
+ if (!savageScreen->bufs || savageScreen->chipset == S3_SUPERSAVAGE)
imesa->enable_vdma = GL_FALSE;
- }
+ else
+ imesa->enable_vdma = driQueryOptionb(&imesa->optionCache, "enable_vdma");
/* Configure swrast to match hardware characteristics:
*/
diff --git a/src/mesa/drivers/dri/savage/savagecontext.h b/src/mesa/drivers/dri/savage/savagecontext.h
index 2e9671afd91..3bf688ce10c 100644
--- a/src/mesa/drivers/dri/savage/savagecontext.h
+++ b/src/mesa/drivers/dri/savage/savagecontext.h
@@ -86,7 +86,6 @@ typedef struct savage_texture_object_t *savageTextureObjectPtr;
/* Don't make it too big. We don't want to buffer up a whole frame
* that would force the application to wait later. */
#define SAVAGE_CMDBUF_SIZE 1024
-#define SAVAGE_MAX_VERTS_PENDING 1024
/* Use the templated vertex formats:
*/
@@ -226,7 +225,6 @@ struct savage_context_t {
GLfloat hw_viewport[16];
/* DRI stuff */
GLuint bufferSize;
- GLuint vertsPending;
GLframebuffer *glBuffer;
diff --git a/src/mesa/drivers/dri/savage/savagedd.c b/src/mesa/drivers/dri/savage/savagedd.c
index b0478169a9c..b1fb3955dee 100644
--- a/src/mesa/drivers/dri/savage/savagedd.c
+++ b/src/mesa/drivers/dri/savage/savagedd.c
@@ -41,7 +41,7 @@
#include "utils.h"
-#define DRIVER_DATE "20050120"
+#define DRIVER_DATE "20050305"
/***************************************
* Mesa's Driver Functions
diff --git a/src/mesa/drivers/dri/savage/savageioctl.c b/src/mesa/drivers/dri/savage/savageioctl.c
index 3c932553613..5399963cb97 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.c
+++ b/src/mesa/drivers/dri/savage/savageioctl.c
@@ -57,6 +57,8 @@ void savageGetDMABuffer( savageContextPtr imesa )
int retcode;
drmBufPtr buf;
+ assert (imesa->savageScreen->bufs);
+
if (SAVAGE_DEBUG & DEBUG_DMA)
fprintf(stderr, "Getting dma buffer\n");
@@ -422,10 +424,9 @@ static void savageDDClear( GLcontext *ctx, GLbitfield mask, GLboolean all,
}
-/* This is necessary as to prevent annyoing stuttering effects with
- * some games, though it does reduce the frame rate (glxgears)
- * slightly. I believe this is due to texture uploads which do not go
- * through the Savage command pipeline yet. */
+/* This is necessary to avoid very jerky animation on my ProSavageDDR.
+ * Seems to work fine on other Savages though. Make this configurable!
+ */
#define SYNC_FRAMES 1
/*
@@ -530,13 +531,6 @@ void savageFlushVertices( savageContextPtr imesa )
cmd->prim.start = buffer->flushed / imesa->HwVertexSize;
cmd->prim.count = buffer->used / imesa->HwVertexSize - cmd->prim.start;
buffer->flushed = buffer->used;
- /* Make sure we don't buffer too many vertices without
- * telling the hardware. */
- imesa->vertsPending += cmd->prim.count;
- if (imesa->vertsPending > SAVAGE_MAX_VERTS_PENDING) {
- savageFlushCmdBuf(imesa, GL_FALSE);
- imesa->vertsPending = 0;
- }
}
}
diff --git a/src/mesa/drivers/dri/savage/savagetris.c b/src/mesa/drivers/dri/savage/savagetris.c
index 405a58977b6..18470401372 100644
--- a/src/mesa/drivers/dri/savage/savagetris.c
+++ b/src/mesa/drivers/dri/savage/savagetris.c
@@ -1192,11 +1192,8 @@ static void savageRenderStart( GLcontext *ctx )
static void savageRenderFinish( GLcontext *ctx )
{
- /* Flush the last primitive now, before any state is changed.
- * Alternatively state could be emitted in all state-changing
- * functions in savagestate.c and when changing the vertex format
- * above. */
- FLUSH_BATCH(SAVAGE_CONTEXT(ctx));
+ /* Flush the last primitive now, before any state is changed. */
+ savageFlushVertices(SAVAGE_CONTEXT(ctx));
if (SAVAGE_CONTEXT(ctx)->RenderIndex & SAVAGE_FALLBACK_BIT)
_swrast_flush( ctx );