From: Eric Anholt Date: Fri, 30 Oct 2009 20:28:44 +0000 (-0700) Subject: i965: Add an index assert on get_fp_inst array like other compiler arrays. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb132406ded760a622513cd1ab86bf83bb945671;p=mesa.git i965: Add an index assert on get_fp_inst array like other compiler arrays. --- diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c index 53fdd06f428..0e86d75deac 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c @@ -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++]; }