pan/va: Handle 2-src blend in lower_split_src
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 16 May 2022 13:43:34 +0000 (09:43 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 19 May 2022 16:08:26 +0000 (16:08 +0000)
Fixes assertion fail in shaders/dolphin/smg.1.shader_test

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16585>

src/panfrost/bifrost/valhall/va_lower_split_64bit.c

index 0c562c0..bc31522 100644 (file)
@@ -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;
    }