use _mesa_alloc_instructions()
authorBrian <brian@yutani.localnet.net>
Thu, 22 Mar 2007 14:51:34 +0000 (08:51 -0600)
committerBrian <brian@yutani.localnet.net>
Thu, 22 Mar 2007 14:51:34 +0000 (08:51 -0600)
src/mesa/tnl/t_vp_build.c

index 2663d993049ffe77f820c27c680f311a4ed4b389..b1c148a1367907db5d9eb422105b2441ab06ba8a 100644 (file)
@@ -1416,9 +1416,8 @@ create_new_program( const struct state_key *key,
    else
       p.temp_reserved = ~((1<<max_temps)-1);
 
-   p.program->Base.Instructions
-      = (struct prog_instruction*) MALLOC(sizeof(struct prog_instruction) * MAX_INSN);
-   p.program->Base.String = 0;
+   p.program->Base.Instructions = _mesa_alloc_instructions(MAX_INSN);
+   p.program->Base.String = NULL;
    p.program->Base.NumInstructions =
    p.program->Base.NumTemporaries =
    p.program->Base.NumParameters =