[Mesa-dev] [Mesa-dev, 2/2] i965: add assert to while_jumps_before_offset()

Kenneth Graunke kenneth at whitecape.org
Sun Jan 29 07:26:03 UTC 2017


On Thu, Jan 26, 2017 at 01:50:42PM +1100, Timothy Arceri wrote:
> jip should always be negative here as its the result of
> do instruction - while instruction.
> ---
>  src/mesa/drivers/dri/i965/brw_eu_emit.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> index 257757f..f4bec33 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> @@ -2714,6 +2714,7 @@ while_jumps_before_offset(const struct gen_device_info *devinfo,
>     int scale = 16 / brw_jump_scale(devinfo);
>     int jip = devinfo->gen == 6 ? brw_inst_gen6_jump_count(devinfo, insn)
>                                 : brw_inst_jip(devinfo, insn);
> +   assert(jip < 0);
>     return while_offset + jip * scale <= start_offset;
>  }
>  

This one is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list