Commit 7c615873 authored by Samuel Pitoiset's avatar Samuel Pitoiset Committed by Dylan Baker

ac: fix exclusive scans on GFX8-GFX9

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*.

Fixes: 227c29a8 "amd/common/gfx10: implement scan & reduce operations"
Signed-off-by: Samuel Pitoiset's avatarSamuel Pitoiset <>
Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <>
(cherry picked from commit 2d9f401a)
parent 6af303f6
......@@ -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;
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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment