summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/savage/savage_xmesa.c
diff options
context:
space:
mode:
authorFelix Kuehling <fxkuehl@gmx.de>2005-01-20 13:59:49 +0000
committerFelix Kuehling <fxkuehl@gmx.de>2005-01-20 13:59:49 +0000
commitedb9a165c14bd90938340a74a636ac5f65ac4c35 (patch)
tree990529c998c91f37a9bfb92b6611cb90d6d575c0 /src/mesa/drivers/dri/savage/savage_xmesa.c
parentddfa61ee194b9d4ec88d499c71cd6810e7f6a022 (diff)
Added support for ELTS to the _savage_render_stage. Requires at least
Savage DRM version 2.2.0. Otherwise the render stage is disabled.
Diffstat (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c')
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index 9a8e090ab5..742c6e89a9 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -109,8 +109,8 @@ static const char *const card_extensions[] =
NULL
};
-extern const struct tnl_pipeline_stage _savage_texnorm_stage;
-extern const struct tnl_pipeline_stage _savage_render_stage;
+extern struct tnl_pipeline_stage _savage_texnorm_stage;
+extern struct tnl_pipeline_stage _savage_render_stage;
static const struct tnl_pipeline_stage *savage_pipeline[] = {
@@ -435,6 +435,8 @@ savageCreateContext( const __GLcontextModes *mesaVis,
imesa->vtxBuf = &imesa->clientVtxBuf;
+ imesa->firstElt = -1;
+
/* Uninitialized vertex format. Force setting the vertex state in
* savageRenderStart.
*/
@@ -463,10 +465,18 @@ savageCreateContext( const __GLcontextModes *mesaVis,
/* Install the customized pipeline:
*/
-#if 1
_tnl_destroy_pipeline( ctx );
_tnl_install_pipeline( ctx, savage_pipeline );
-#endif
+ /* DRM versions before 2.1.3 would only render triangle lists. ELTS
+ * support was added in 2.2.0. */
+ if (sPriv->drmMinor < 2) {
+ _savage_render_stage.active = GL_FALSE;
+ fprintf (stderr,
+ "*** Disabling fast path because your DRM version is buggy "
+ "or doesn't\n*** support ELTS. You need at least Savage DRM "
+ "version 2.2.\n");
+ }
+
/* Configure swrast to match hardware characteristics:
*/
@@ -508,6 +518,7 @@ savageDestroyContext(__DRIcontextPrivate *driContextPriv)
savageTextureObjectPtr next_t, t;
savageFlushVertices(imesa);
+ savageReleaseIndexedVerts(imesa);
savageFlushCmdBuf(imesa, GL_TRUE); /* release DMA buffer */
/* update for multi-tex*/