summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage/savagetris.c
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2005-01-20 15:18:10 +0000
committerFelix Kuehling <[email protected]>2005-01-20 15:18:10 +0000
commit677d1d07c41050e7474f44c592641b14ffd73e8c (patch)
tree1ce84c0492d66c728482c3948b3197852b96f341 /src/mesa/drivers/dri/savage/savagetris.c
parent14dee36fa78dc309919dd81ae37d0e8d13773104 (diff)
* 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
Diffstat (limited to 'src/mesa/drivers/dri/savage/savagetris.c')
-rw-r--r--src/mesa/drivers/dri/savage/savagetris.c26
1 files changed, 16 insertions, 10 deletions
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 */