[Mesa-dev] [PATCH] r600g: Check for reduction instructions when merging instruction groups

Alex Deucher alexdeucher at gmail.com
Wed Oct 5 09:46:49 PDT 2011


On Wed, Oct 5, 2011 at 10:57 AM, Tom Stellard <tstellar at gmail.com> wrote:
> Reduction instructions can't share an instruction group with other
> instructions, so we need to check for them when trying to merge
> instruction groups.

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/gallium/drivers/r600/r600_asm.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
> index af0351b..0ba0a47 100644
> --- a/src/gallium/drivers/r600/r600_asm.c
> +++ b/src/gallium/drivers/r600/r600_asm.c
> @@ -964,8 +964,14 @@ static int merge_inst_groups(struct r600_bytecode *bc, struct r600_bytecode_alu
>                                        return 0;
>                                have_mova = 1;
>                        }
> +                       /* check for reduction instructions in the previous group*/
> +                       if (is_alu_reduction_inst(bc, prev[i]))
> +                               return 0;
>                        num_once_inst += is_alu_once_inst(bc, prev[i]);
>                }
> +               /* check for reduction instructions in this group */
> +               if (slots[i] && is_alu_reduction_inst(bc, slots[i]))
> +                       return 0;
>                if (slots[i] && r600_bytecode_alu_nliterals(bc, slots[i], literal, &nliteral))
>                        return 0;
>
> --
> 1.7.6.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>


More information about the mesa-dev mailing list