[Mesa-dev] [PATCH] i965/fs: Correct mistake in determining whether a MUL is negated.

Anuj Phogat anuj.phogat at gmail.com
Mon Apr 13 14:23:51 PDT 2015


On Mon, Apr 13, 2015 at 1:11 PM, Matt Turner <mattst88 at gmail.com> wrote:

> a * b is equivalent to -a * -b, and the previous code was failing at
> that.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89961
> ---
>  src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> index f2c4098..c1d0616 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> @@ -145,7 +145,7 @@ operands_match(const fs_inst *a, const fs_inst *b,
> bool *negate)
>        xs[1].fixed_hw_reg.dw1.f = xs1_imm;
>        ys[1].fixed_hw_reg.dw1.f = ys1_imm;
>
> -      *negate = (xs0_negate + xs1_negate) != (ys0_negate + ys1_negate);
> +      *negate = (xs0_negate != xs1_negate) != (ys0_negate != ys1_negate);
>        return ret;
>     } else if (!a->is_commutative()) {
>        bool match = true;
> --
> 2.0.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150413/da329fb2/attachment.html>


More information about the mesa-dev mailing list