[Mesa-dev] [PATCH v2] ac: fix exclusive scans on GFX8-GFX9

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed Aug 21 14:32:04 UTC 2019


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Wed, Aug 21, 2019 at 4:26 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> This fixes a regression introduced with scan&reduce operations
> on GFX10. Note that some subgroups CTS still fail on GFX10 but
> I assume it's a different issue.
>
> This fixes dEQP-VK.subgroups.arithmetic.*.subgroupexclusive*.
>
> v2: - move the logic back to ac_build_scan()
>
> Fixes: 227c29a80de "amd/common/gfx10: implement scan & reduce operations"
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/common/ac_llvm_build.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
> index 05871f5ea98..5abae00d8f6 100644
> --- a/src/amd/common/ac_llvm_build.c
> +++ b/src/amd/common/ac_llvm_build.c
> @@ -4221,10 +4221,9 @@ ac_build_scan(struct ac_llvm_context *ctx, nir_op op, LLVMValueRef src, LLVMValu
>         if (ctx->chip_class >= GFX10) {
>                 result = inclusive ? src : identity;
>         } else {
> -               if (inclusive)
> -                       result = src;
> -               else
> -                       result = ac_build_dpp(ctx, identity, src, dpp_wf_sr1, 0xf, 0xf, false);
> +               if (!inclusive)
> +                       src = ac_build_dpp(ctx, identity, src, dpp_wf_sr1, 0xf, 0xf, false);
> +               result = src;
>         }
>         if (maxprefix <= 1)
>                 return result;
> --
> 2.22.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list