From 677d1d07c41050e7474f44c592641b14ffd73e8c Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Thu, 20 Jan 2005 15:18:10 +0000 Subject: * Added options for disabling the fast path (render stage) and vertex DMA * Fixed disabling of the render stage * Added debug output for per-primitive fallbacks * Bumped driver date --- src/mesa/drivers/dri/savage/savagetris.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'src/mesa/drivers/dri/savage/savagetris.c') diff --git a/src/mesa/drivers/dri/savage/savagetris.c b/src/mesa/drivers/dri/savage/savagetris.c index 0092f3ea770..4e0ad469a8b 100644 --- a/src/mesa/drivers/dri/savage/savagetris.c +++ b/src/mesa/drivers/dri/savage/savagetris.c @@ -738,6 +738,10 @@ static void savageChooseRenderState(GLcontext *ctx) if (flags & LINE_FALLBACK) imesa->draw_line = savage_fallback_line; if (flags & TRI_FALLBACK) imesa->draw_tri = savage_fallback_tri; index |= SAVAGE_FALLBACK_BIT; + if (SAVAGE_DEBUG & DEBUG_FALLBACKS) { + fprintf (stderr, "Per-primitive fallback, TriangleCaps=0x%x\n", + ctx->_TriangleCaps); + } } } @@ -1032,17 +1036,19 @@ static __inline__ GLuint savageChooseVertexFormat_s4( GLcontext *ctx ) if (setupIndex == imesa->SetupIndex && imesa->vertex_size != 0) return setupIndex; - mask = SAVAGE_SKIP_W; - size = 10 - (skip & 1) - (skip >> 1 & 1) - - (skip >> 2 & 1) - (skip >> 3 & 1) - (skip >> 4 & 1) - - (skip >> 5 & 1) - (skip >> 6 & 1) - (skip >> 7 & 1); + if (imesa->enable_vdma) { + mask = SAVAGE_SKIP_W; + size = 10 - (skip & 1) - (skip >> 1 & 1) - + (skip >> 2 & 1) - (skip >> 3 & 1) - (skip >> 4 & 1) - + (skip >> 5 & 1) - (skip >> 6 & 1) - (skip >> 7 & 1); - while (size < 8) { - if (skip & mask) { - skip &= ~mask; - size++; + while (size < 8) { + if (skip & mask) { + skip &= ~mask; + size++; + } + mask <<= 1; } - mask <<= 1; } imesa->vertex_attr_count = 0; @@ -1167,7 +1173,7 @@ static void savageRenderStart( GLcontext *ctx ) * discard the DMA buffer, if we were using one. */ savageFlushVertices(imesa); savageFlushCmdBuf(imesa, GL_TRUE); - if (hwVertexSize == 8) { + if (hwVertexSize == 8 && imesa->enable_vdma) { if (SAVAGE_DEBUG & DEBUG_DMA) fprintf (stderr, "Using DMA, skip=0x%02x\n", imesa->skip); /* we can use vertex dma */ -- cgit v1.2.3