[Mesa-dev] [PATCH] i965: Fix JIP/UIP calculations.

Kenneth Graunke kenneth at whitecape.org
Fri Aug 22 10:06:10 PDT 2014


On Thursday, August 21, 2014 11:10:26 PM Matt Turner wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82846
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82929
> ---
> Planning to commit this to master as well as to 10.3 directly,
> since BDW is just broken without it.
> 
>  src/mesa/drivers/dri/i965/brw_eu_compact.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
> index 3680c55..4f509dd 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
> @@ -1029,19 +1029,17 @@ update_uip_jip(struct brw_context *brw, brw_inst *insn,
>  {
>     int scale = brw->gen >= 8 ? sizeof(brw_compact_inst) : 1;
>  
> -   int32_t jip = brw_inst_jip(brw, insn);
> -   jip -= scale *
> -      compacted_between(this_old_ip, this_old_ip + jip, compacted_counts);
> -   brw_inst_set_jip(brw, insn, jip);
> +   int32_t jip = brw_inst_jip(brw, insn) / scale;
> +   jip -= compacted_between(this_old_ip, this_old_ip + jip, compacted_counts);
> +   brw_inst_set_jip(brw, insn, jip * scale);
>  
>     if (brw_inst_opcode(brw, insn) == BRW_OPCODE_ENDIF ||
>         brw_inst_opcode(brw, insn) == BRW_OPCODE_WHILE)
>        return;
>  
> -   int32_t uip = brw_inst_uip(brw, insn);
> -   uip -= scale *
> -      compacted_between(this_old_ip, this_old_ip + uip, compacted_counts);
> -   brw_inst_set_uip(brw, insn, uip);
> +   int32_t uip = brw_inst_uip(brw, insn) / scale;
> +   uip -= compacted_between(this_old_ip, this_old_ip + uip, compacted_counts);
> +   brw_inst_set_uip(brw, insn, uip * scale);
>  }
>  
>  void
> 

Seems okay to me.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140822/07b9053f/attachment.sig>


More information about the mesa-dev mailing list