[Mesa-dev] [PATCH 01/14] i965: Set JumpCount, not JIP, on ENDIF on Gen 6.

Kenneth Graunke kenneth at whitecape.org
Fri Aug 29 00:10:04 PDT 2014


On Thursday, August 28, 2014 08:10:31 PM Matt Turner wrote:
> Despite what the Sandybridge PRM says, ENDIF has Jump Count in <dst>,
> not JIP in <src1>. (The same mistake appears about WHILE as well).
> ---
>  src/mesa/drivers/dri/i965/brw_eu_emit.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> index 39f94e9..937257b 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> @@ -2557,12 +2557,15 @@ brw_set_uip_jip(struct brw_compile *p)
>           assert(brw_inst_jip(brw, insn) != 0);
>  	 break;
>  
> -      case BRW_OPCODE_ENDIF:
> -         if (block_end_offset == 0)
> -            brw_inst_set_jip(brw, insn, 1 * br);
> +      case BRW_OPCODE_ENDIF: {
> +         int32_t jump = (block_end_offset == 0) ?
> +                        1 * br : (block_end_offset - offset) / scale;
> +         if (brw->gen >= 7)
> +            brw_inst_set_jip(brw, insn, jump);
>           else
> -            brw_inst_set_jip(brw, insn, (block_end_offset - offset) / scale);
> +            brw_inst_set_gen6_jump_count(brw, insn, jump);
>  	 break;
> +      }
>  
>        case BRW_OPCODE_HALT:
>  	 /* From the Sandy Bridge PRM (volume 4, part 2, section 8.3.19):
> 

Cc: "10.3" <mesa-stable at lists.freedesktop.org>
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/20140829/7436a761/attachment.sig>


More information about the mesa-dev mailing list