mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
- Fixed two bugs related to DMA buffer handling that showed up with the
new DRM version 2.4 and command DMA. - Flush less. - Bumped the driver date.
This commit is contained in:
parent
a30402b56a
commit
e6aa21156a
5 changed files with 14 additions and 29 deletions
|
|
@ -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:
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#include "utils.h"
|
||||
|
||||
|
||||
#define DRIVER_DATE "20050120"
|
||||
#define DRIVER_DATE "20050305"
|
||||
|
||||
/***************************************
|
||||
* Mesa's Driver Functions
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue