summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2005-06-26 21:02:58 +0000
committerEric Anholt <anholt@FreeBSD.org>2005-06-26 21:02:58 +0000
commit3b817fde8832ac577c307e64959e5049017b475f (patch)
tree7cb47c1b2a8dd57e224aac4b1a048543138f9c04
parent845f2a73506837e4ec4e0cf8bb99a2d63bdaf1b4 (diff)
Zero out the ENGPACKET allocated on the stack, to avoid sending uninitialized
values to reserved fields on the card, resulting in all-black output and sometimes hangs. Submitted by: Thomas Winischhofer
-rw-r--r--src/mesa/drivers/dri/sis/sis_screen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c
index ccfa959c9a..e6c398f4e2 100644
--- a/src/mesa/drivers/dri/sis/sis_screen.c
+++ b/src/mesa/drivers/dri/sis/sis_screen.c
@@ -316,6 +316,8 @@ static void sisCopyBuffer( __DRIdrawablePrivate *dPriv )
int i;
ENGPACKET stEngPacket;
+ memset(&stEngPacket, 0, sizeof(ENGPACKET));
+
while ((*smesa->FrameCountPtr) - MMIO_READ(0x8a2c) > SIS_MAX_FRAME_LENGTH)
;