From 3b817fde8832ac577c307e64959e5049017b475f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 26 Jun 2005 21:02:58 +0000 Subject: 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 --- src/mesa/drivers/dri/sis/sis_screen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/drivers/dri/sis') 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) ; -- cgit v1.2.3