i965: Add an index assert on get_fp_inst array like other compiler arrays.
authorEric Anholt <eric@anholt.net>
Fri, 30 Oct 2009 20:28:44 +0000 (13:28 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 30 Oct 2009 20:28:44 +0000 (13:28 -0700)
src/mesa/drivers/dri/i965/brw_wm_fp.c

index 53fdd06f428667f7fa7b982245c085d797cc1349..0e86d75deac650e152f5220e746419854fcbc30f 100644 (file)
@@ -181,6 +181,7 @@ static void release_temp( struct brw_wm_compile *c, struct prog_dst_register tem
 
 static struct prog_instruction *get_fp_inst(struct brw_wm_compile *c)
 {
+   assert(c->nr_fp_insns < BRW_WM_MAX_INSN);
    return &c->prog_instructions[c->nr_fp_insns++];
 }