summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-08-30 16:22:52 -0700
committerEric Anholt <[email protected]>2012-09-17 12:32:51 -0700
commit3f98ba9c43eabf6f88d15375cfc80ee35c425077 (patch)
tree4cb48a7bcf2d23f8634a1d4320c954e6a2f8c5ab /src/mesa/drivers/dri
parent99f14bc789c7160fdac70ff3ed770a1a2999f797 (diff)
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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.c2
1 files changed, 2 insertions, 0 deletions
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