From 3f98ba9c43eabf6f88d15375cfc80ee35c425077 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 30 Aug 2012 16:22:52 -0700 Subject: 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 --- src/mesa/drivers/dri/i965/brw_eu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 -- cgit v1.2.3