[Mesa-dev] [PATCH v3 14/24] i965/vec4: keep original type when dealing with null registers

Francisco Jerez currojerez at riseup.net
Fri Mar 3 23:39:58 UTC 2017


Samuel Iglesias Gonsálvez <siglesias at igalia.com> writes:

> From: "Juan A. Suarez Romero" <jasuarez at igalia.com>
>
> Keep the original type when dealing with null registers. Specially

s/specially/especially/ here and below.

> because we do no want to introduce an implicit conversion between
> types that could affect the conditional flags.
>
> This affects specially when the original type is DF, and we are working
> on Ivybridge/Baytrail.
> ---
>  src/mesa/drivers/dri/i965/brw_vec4.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> index 7080c93e550..64b435f3ec4 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> @@ -1983,6 +1983,7 @@ vec4_visitor::convert_to_hw_regs()
>           case BAD_FILE:
>              /* Probably unused. */
>              reg = brw_null_reg();
> +            reg.type = src.type;

You could use retype() here and below.

>              break;
>  
>           case MRF:
> @@ -2033,6 +2034,7 @@ vec4_visitor::convert_to_hw_regs()
>  
>        case BAD_FILE:
>           reg = brw_null_reg();
> +         reg.type = dst.type;
>           break;
>  
>        case IMM:
> @@ -2205,6 +2207,8 @@ vec4_visitor::lower_simd_width()
>           } else {
>              if (inst->dst.file != ARF)
>                 dst = horiz_offset(inst->dst, channel_offset);
> +            else
> +               dst.type = inst->dst.type;

This shouldn't be necessary if you take into account my feedback to
PATCH 13.  With that fixed:

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

>           }
>           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/20170303/7a05fe16/attachment.sig>


More information about the mesa-dev mailing list