[Mesa-dev] [PATCH 1/8] i965: Clear brw_compile on setup.
Eric Anholt
eric at anholt.net
Fri Aug 31 11:32:34 PDT 2012
I noticed in valgrind that p->single_program_flow was used while
uninitialized. Everything else zeroed out brw_compile, but this is better
API.
---
src/mesa/drivers/dri/i965/brw_eu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c
index acbf7c0..89091db 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
--
1.7.10.4
More information about the mesa-dev
mailing list