i965: Clear brw_compile on setup.
authorEric Anholt <eric@anholt.net>
Thu, 30 Aug 2012 23:22:52 +0000 (16:22 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 17 Sep 2012 19:32:51 +0000 (12:32 -0700)
I noticed in valgrind that p->single_program_flow was used while
uninitialized.  Everything else zeroed out brw_compile, but this is better
API.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_eu.c

index acbf7c0..89091db 100644 (file)
@@ -173,6 +173,8 @@ void brw_pop_insn_state( struct brw_compile *p )
 void
 brw_init_compile(struct brw_context *brw, struct brw_compile *p, void *mem_ctx)
 {
+   memset(p, 0, sizeof(*p));
+
    p->brw = brw;
    /*
     * Set the initial instruction store array size to 1024, if found that