From: Eric Anholt Date: Sun, 26 Jun 2005 21:02:58 +0000 (+0000) Subject: Zero out the ENGPACKET allocated on the stack, to avoid sending uninitialized X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b817fde8832ac577c307e64959e5049017b475f;p=mesa.git 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 --- diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index ccfa959c9af..e6c398f4e28 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) ;