From 3aafd22f6aef5ffd63349c3d515b5ce681e828dc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 17 Aug 2009 17:11:54 -0600 Subject: gallium: memset() tgsi_exec_machine to all zeros in tgsi_exec_machine_create() This fixes invalid values for CondStackTop, LoopStackTop, etc. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 5af0a94794..951ecfd552 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -375,15 +375,9 @@ tgsi_exec_machine_create( void ) if (!mach) goto fail; - mach->Addrs = &mach->Temps[TGSI_EXEC_TEMP_ADDR]; + memset(mach, 0, sizeof(*mach)); - mach->Samplers = NULL; - mach->Consts = NULL; - mach->Tokens = NULL; - mach->Primitives = NULL; - mach->InterpCoefs = NULL; - mach->Instructions = NULL; - mach->Declarations = NULL; + mach->Addrs = &mach->Temps[TGSI_EXEC_TEMP_ADDR]; /* Setup constants. */ for( i = 0; i < 4; i++ ) { -- cgit v1.2.3