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 <stereotype441@gmail.com>
This commit is contained in:
Eric Anholt 2012-08-30 16:22:52 -07:00
parent 99f14bc789
commit 3f98ba9c43

View 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