From 444469d64e0f42bcf2bba0b7ba19cce667a19542 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 16 May 2022 09:43:34 -0400 Subject: [PATCH] pan/va: Handle 2-src blend in lower_split_src Fixes assertion fail in shaders/dolphin/smg.1.shader_test Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/valhall/va_lower_split_64bit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/valhall/va_lower_split_64bit.c b/src/panfrost/bifrost/valhall/va_lower_split_64bit.c index 0c562c0780e..bc315221f86 100644 --- a/src/panfrost/bifrost/valhall/va_lower_split_64bit.c +++ b/src/panfrost/bifrost/valhall/va_lower_split_64bit.c @@ -36,7 +36,11 @@ lower_split_src(bi_context *ctx, bi_instr *I, unsigned s) { /* Fix up for mismatch between IR and Valhall BLEND */ if (I->op == BI_OPCODE_BLEND) { - assert(s == 1); + /* Only the blend descriptor needs lowering */ + if (s != 1) + return; + + /* But it is in a different place! */ s = 2; }