From: Eric Anholt Date: Thu, 30 Aug 2012 23:22:52 +0000 (-0700) Subject: i965: Clear brw_compile on setup. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f98ba9c43eabf6f88d15375cfc80ee35c425077;p=mesa.git i965: Clear brw_compile on setup. 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 --- diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c index acbf7c0bf25..89091db6c4a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -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