new DRM version 2.4 and command DMA.
- Flush less.
- Bumped the driver date.
{
savageScreenPrivate *savageScreen = (savageScreenPrivate *)sPriv->private;
- drmUnmapBufs(savageScreen->bufs);
+ if (savageScreen->bufs)
+ drmUnmapBufs(savageScreen->bufs);
/* free all option information */
driDestroyOptionInfo (&savageScreen->optionCache);
"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:
*/
/* 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:
*/
GLfloat hw_viewport[16];
/* DRI stuff */
GLuint bufferSize;
- GLuint vertsPending;
GLframebuffer *glBuffer;
#include "utils.h"
-#define DRIVER_DATE "20050120"
+#define DRIVER_DATE "20050305"
/***************************************
* Mesa's Driver Functions
int retcode;
drmBufPtr buf;
+ assert (imesa->savageScreen->bufs);
+
if (SAVAGE_DEBUG & DEBUG_DMA)
fprintf(stderr, "Getting dma buffer\n");
}
-/* 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
/*
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;
- }
}
}
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 );