[Mesa-stable] [Mesa-dev] [PATCH] i965: Fix copy propagation type changes.

Jason Ekstrand jason at jlekstrand.net
Thu Sep 3 18:03:13 PDT 2015


Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
On Sep 2, 2015 11:28 PM, "Kenneth Graunke" <kenneth at whitecape.org> wrote:

> commit 472ef9a02f2e5c5d0caa2809cb736a0f4f0d4693 introduced code to
> change the types of SEL and MOV instructions for moves that simply
> "copy bits around".  It didn't account for type conversion moves,
> however.  So it would happily turn this:
>
>    mov(8) vgrf6:D, -vgrf5:D
>    mov(8) vgrf7:F, vgrf6:UD
>
> into this:
>
>    mov(8) vgrf6:D, -vgrf5:D
>    mov(8) vgrf7:D, -vgrf5:D
>
> which erroneously drops the conversion to float.
>
> Cc: "11.0 10.6" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> index 5445ad5..230b0ca 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> @@ -279,6 +279,7 @@ static bool
>  can_change_source_types(fs_inst *inst)
>  {
>     return !inst->src[0].abs && !inst->src[0].negate &&
> +          inst->dst.type == inst->src[0].type &&
>            (inst->opcode == BRW_OPCODE_MOV ||
>             (inst->opcode == BRW_OPCODE_SEL &&
>              inst->predicate != BRW_PREDICATE_NONE &&
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20150903/d32b6cea/attachment.html>


More information about the mesa-stable mailing list