i965: get the jmp distance by instruction index
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 21 Dec 2011 07:10:40 +0000 (15:10 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Mon, 26 Dec 2011 03:21:56 +0000 (11:21 +0800)
commit328e6a5497e54b0e8aed803cf6d2ae9a2a00b2fe
tree0e135ff0a6667b16657efcc99089343547a4bcf0
parent0a17093eaf84696b05d04a45d6d51281f7b2786b
i965: get the jmp distance by instruction index

If dynamic instruction store size is enabled, while after the brw_JMPI()
and before the brw_land_fwd_jump() function, the eu instruction store
base address(p->store) may change. Thus, the safe way to reference the
jmp instruction is by index instead of by the instruction address.

v2: comments from Eric, don't change the prototype of brw_JMPI

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.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_sf_emit.c
src/mesa/drivers/dri/i965/brw_wm_emit.c