[Mesa-dev] [PATCH v4 19/28] i965/vec4: fix SIMD-width lowering for VEC4_OPCODE_FROM_DOUBLE
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Thu Mar 23 08:10:48 UTC 2017
On Wed, 2017-03-22 at 15:55 -0700, Francisco Jerez wrote:
> Samuel Iglesias Gonsálvez <siglesias at igalia.com> writes:
>
> > Now the VEC4_OPCODE_FROM_DOUBLE's destination data is written with
> > stride 2. We need to take into account this when doing the split
> > so we don't overwrite data.
> >
>
> You should probably fix the destination type of your
> VEC4_OPCODE_FROM_DOUBLE instructions in PATCH 17 instead so you don't
> need to special-case VEC4_OPCODE_FROM_DOUBLE in this lowering pass.
>
I don't think this would work. Do you mean to set the destination type
to double, so horiz_offset() works fine here without any change?
Then in the generator's code for VEC4_OPCODE_FROM_DOUBLE, I would need
to retype the destination to... I don't know to which type because it
was lost.
Sam
> > Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> > ---
> > src/intel/compiler/brw_vec4.cpp | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/intel/compiler/brw_vec4.cpp
> > b/src/intel/compiler/brw_vec4.cpp
> > index b26f8035811..f4eea954404 100644
> > --- a/src/intel/compiler/brw_vec4.cpp
> > +++ b/src/intel/compiler/brw_vec4.cpp
> > @@ -2198,6 +2198,7 @@ vec4_visitor::lower_simd_width()
> > linst->group = channel_offset;
> > linst->size_written = size_written;
> >
> > + bool d2f_pass = (inst->opcode == VEC4_OPCODE_FROM_DOUBLE
> > && n > 0);
> > /* Compute split dst region */
> > dst_reg dst;
> > if (needs_temp) {
> > @@ -2212,7 +2213,11 @@ vec4_visitor::lower_simd_width()
> > inst->insert_before(block, copy);
> > }
> > } else {
> > - dst = horiz_offset(inst->dst, channel_offset);
> > + /* d2x conversion is done with a destination's stride
> > of 2. We need
> > + * to take into account when splitting it.
> > + */
> > + unsigned stride = d2f_pass ? 2 : 1;
> > + dst = horiz_offset(inst->dst, stride *
> > channel_offset);
> > }
> > linst->dst = dst;
> >
> > --
> > 2.11.0
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170323/38f2fae4/attachment.sig>
More information about the mesa-dev
mailing list