summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/sis/sis_tris.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2004-09-25 19:01:18 +0000
committerEric Anholt <[email protected]>2004-09-25 19:01:18 +0000
commit7b363b0dd492e7222e8503e24f35c651de0a0bfc (patch)
tree1a24e93bd143194b6d8c0b012292faa430f2aeee /src/mesa/drivers/dri/sis/sis_tris.c
parentd166f2bffdb9cd8ab22825a2901baa513c4bc1eb (diff)
Fix SiS AGP vertex dispatch by not trying to emit 0 vertices, which would hang
the hardware. Re-enable AGP by default.
Diffstat (limited to 'src/mesa/drivers/dri/sis/sis_tris.c')
-rw-r--r--src/mesa/drivers/dri/sis/sis_tris.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c
index da23df5fe73..048ff848f4c 100644
--- a/src/mesa/drivers/dri/sis/sis_tris.c
+++ b/src/mesa/drivers/dri/sis/sis_tris.c
@@ -889,7 +889,8 @@ static void sisRenderFinish( GLcontext *ctx )
void
sisFlushPrimsLocked(sisContextPtr smesa)
{
- GLuint *start;
+ if (smesa->vb_cur == smesa->vb_last)
+ return;
sisUpdateHWState(smesa->glCtx);
@@ -898,7 +899,7 @@ sisFlushPrimsLocked(sisContextPtr smesa)
mEndPrimitive();
MMIO(REG_3D_AGPCmBase, (smesa->vb_last - smesa->vb) +
smesa->vb_agp_offset);
- MMIO(REG_3D_AGPTtDwNum, (smesa->vb_cur - smesa->vb_last) / 4 |
+ MMIO(REG_3D_AGPTtDwNum, ((smesa->vb_cur - smesa->vb_last) / 4) |
0x50000000);
MMIO(REG_3D_ParsingSet, smesa->AGPParseSet);
MMIO(REG_3D_AGPCmFire, (GLint)(-1));