DRI_CONF_DESC(en,"Use fast path for unclipped primitives") \
DRI_CONF_DESC(de,"Schneller Codepfad für ungeschnittene Polygone") \
DRI_CONF_OPT_END
+#define SAVAGE_SYNC_FRAMES(def) \
+DRI_CONF_OPT_BEGIN(sync_frames,bool,def) \
+ DRI_CONF_DESC(en,"Synchronize with graphics hardware after each frame") \
+ DRI_CONF_DESC(de,"Synchronisiere nach jedem Frame mit Grafikhardware") \
+DRI_CONF_OPT_END
/* Configuration
*/
DRI_CONF_FLOAT_DEPTH(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_PERFORMANCE
- DRI_CONF_MAX_TEXTURE_UNITS(2,1,2)
SAVAGE_ENABLE_VDMA(true)
SAVAGE_ENABLE_FASTPATH(true)
+ SAVAGE_SYNC_FRAMES(false)
+ DRI_CONF_MAX_TEXTURE_UNITS(2,1,2)
DRI_CONF_TEXTURE_HEAPS(DRI_CONF_TEXTURE_HEAPS_ALL)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
DRI_CONF_NO_RAST(false)
DRI_CONF_SECTION_END
DRI_CONF_END;
-static const GLuint __driNConfigOptions = 8;
+static const GLuint __driNConfigOptions = 9;
#ifdef USE_NEW_INTERFACE
static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
else
imesa->enable_vdma = driQueryOptionb(&imesa->optionCache, "enable_vdma");
+ imesa->sync_frames = driQueryOptionb(&imesa->optionCache, "sync_frames");
+
/* Configure swrast to match hardware characteristics:
*/
_tnl_allow_pixel_fog( ctx, GL_FALSE );
_swrast_Clear( ctx, mask, all, cx, cy, cw, ch );
}
-
-/* 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
-
/*
* Copy the back buffer to the front buffer.
*/
FLUSH_BATCH(imesa);
-#if SYNC_FRAMES
- imesa->lastSwap = savageEmitEvent( imesa, 0 );
-#endif
+ if (imesa->sync_frames)
+ imesa->lastSwap = savageEmitEvent( imesa, 0 );
+
if (imesa->lastSwap != 0)
savageWaitEvent( imesa, imesa->lastSwap );
imesa->inSwap = GL_FALSE;
}
-#if !SYNC_FRAMES
- imesa->lastSwap = savageEmitEvent( imesa, 0 );
-#endif
+ if (!imesa->sync_frames)
+ /* don't sync, but limit the lag to one frame. */
+ imesa->lastSwap = savageEmitEvent( imesa, 0 );
}
unsigned int savageEmitEventLocked( savageContextPtr imesa, unsigned int flags )