[Mesa-dev] [PATCH v4 19/28] i965/vec4: fix SIMD-width lowering for VEC4_OPCODE_FROM_DOUBLE
Francisco Jerez
currojerez at riseup.net
Wed Mar 22 22:55:42 UTC 2017
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.
> 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: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170322/3217e5ae/attachment.sig>
More information about the mesa-dev
mailing list