From 7590b2b39d04c782d0c00e9cd88ea506b3080884 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 13 Aug 2023 15:53:23 -0400 Subject: [PATCH] agx: Allow loop headers without later preds These happen for loops that break after exactly 1 iteration, unconditionally. Fixes validation splat in dEQP-VK.glsl.switch.conditional_fall_through_2_uniform_vertex Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asahi/compiler/agx_validate.c b/src/asahi/compiler/agx_validate.c index 7cba4ea1283..26c2987cc1a 100644 --- a/src/asahi/compiler/agx_validate.c +++ b/src/asahi/compiler/agx_validate.c @@ -189,7 +189,7 @@ agx_validate_predecessors(agx_block *block) has_later_preds = true; } - if (block->loop_header != has_later_preds) + if (has_later_preds && !block->loop_header) return false; /* Successors and predecessors are found together */