i965: call next_insn() before referencing a instruction by index
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 21 Dec 2011 07:32:02 +0000 (15:32 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Mon, 26 Dec 2011 03:23:12 +0000 (11:23 +0800)
commit8d1b378939768c4054b35b5da592af102345ebed
treec29a258730340e01cc8d8a08e1d5619a21b56bcc
parent328e6a5497e54b0e8aed803cf6d2ae9a2a00b2fe
i965: call next_insn() before referencing a instruction by index

A single next_insn may change the base address of instruction store
memory(p->store), so call it first before referencing the instruction
store pointer from an index.

This the final prepare work to enable the dynamic store size.

v2: comments from Ken, define emit_endif as bool type

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_eu_emit.c