[Mesa-dev,53/95] i965/disasm: fix subreg for dst in Align16 mode

Submitted by Iago Toral Quiroga on July 19, 2016, 10:40 a.m.

Details

Message ID 1468924892-6910-54-git-send-email-itoral@igalia.com
State New
Headers show
Series "i965 Haswell ARB_gpu_shader_fp64 / OpenGL 4.0" ( rev: 2 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Iago Toral Quiroga July 19, 2016, 10:40 a.m.
There is a single bit for this, so it is a binary 0 or 1 meaning
offset 0B or 16B respectively.
---
 src/mesa/drivers/dri/i965/brw_disasm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index d5e9916..f4f41de 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -748,7 +748,7 @@  dest(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
          if (err == -1)
             return 0;
          if (brw_inst_dst_da16_subreg_nr(devinfo, inst))
-            format(file, ".%"PRIu64, brw_inst_dst_da16_subreg_nr(devinfo, inst) /
+            format(file, ".%"PRIu64, 16 * brw_inst_dst_da16_subreg_nr(devinfo, inst) /
                    reg_type_size[brw_inst_dst_reg_type(devinfo, inst)]);
          string(file, "<1>");
          err |= control(file, "writemask", writemask,

Comments

Iago Toral Quiroga <itoral@igalia.com> writes:

> There is a single bit for this, so it is a binary 0 or 1 meaning
> offset 0B or 16B respectively.
> ---
>  src/mesa/drivers/dri/i965/brw_disasm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
> index d5e9916..f4f41de 100644
> --- a/src/mesa/drivers/dri/i965/brw_disasm.c
> +++ b/src/mesa/drivers/dri/i965/brw_disasm.c
> @@ -748,7 +748,7 @@ dest(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
>           if (err == -1)
>              return 0;
>           if (brw_inst_dst_da16_subreg_nr(devinfo, inst))
> -            format(file, ".%"PRIu64, brw_inst_dst_da16_subreg_nr(devinfo, inst) /
> +            format(file, ".%"PRIu64, 16 * brw_inst_dst_da16_subreg_nr(devinfo, inst) /
>                     reg_type_size[brw_inst_dst_reg_type(devinfo, inst)]);

If brw_inst_dst_da16_subreg_nr(devinfo, inst) is guaranteed to be one,
isn't this equivalent to '16 /
reg_type_size[brw_inst_dst_reg_type(devinfo, inst)]'?

With that fixed:

Reviewed-by: Francisco Jerez <currojerez@riseup.net>

>           string(file, "<1>");
>           err |= control(file, "writemask", writemask,
> -- 
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
On Mon, 2016-09-12 at 14:10 -0700, Francisco Jerez wrote:
> Iago Toral Quiroga <itoral@igalia.com> writes:
> 
> > 
> > There is a single bit for this, so it is a binary 0 or 1 meaning
> > offset 0B or 16B respectively.
> > ---
> >  src/mesa/drivers/dri/i965/brw_disasm.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c
> > b/src/mesa/drivers/dri/i965/brw_disasm.c
> > index d5e9916..f4f41de 100644
> > --- a/src/mesa/drivers/dri/i965/brw_disasm.c
> > +++ b/src/mesa/drivers/dri/i965/brw_disasm.c
> > @@ -748,7 +748,7 @@ dest(FILE *file, const struct brw_device_info
> > *devinfo, brw_inst *inst)
> >           if (err == -1)
> >              return 0;
> >           if (brw_inst_dst_da16_subreg_nr(devinfo, inst))
> > -            format(file, ".%"PRIu64,
> > brw_inst_dst_da16_subreg_nr(devinfo, inst) /
> > +            format(file, ".%"PRIu64, 16 *
> > brw_inst_dst_da16_subreg_nr(devinfo, inst) /
> >                     reg_type_size[brw_inst_dst_reg_type(devinfo,
> > inst)]);
> If brw_inst_dst_da16_subreg_nr(devinfo, inst) is guaranteed to be
> one,
> isn't this equivalent to '16 /
> reg_type_size[brw_inst_dst_reg_type(devinfo, inst)]'?

Right, I'll fix that. Thanks!

> With that fixed:
> 
> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
> 
> > 
> >           string(file, "<1>");
> >           err |= control(file, "writemask", writemask,