pan/bi: Handle SEL with vec3 16-bit
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 2 Jun 2020 23:27:47 +0000 (19:27 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 17:35:10 +0000 (17:35 +0000)
Otherwise we end up with a missing argument.

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

src/panfrost/bifrost/bi_lower_combine.c

index c2d9c51ffef6fa646e07c75a17b28a00385d9068..6eb6da7699bdc572346872c44c8e17022ebf0cef 100644 (file)
@@ -77,6 +77,10 @@ bi_combine_sel16(bi_context *ctx, bi_instruction *parent, unsigned comp, unsigne
                 } }
         };
 
+        /* In case we have a combine from a vec3 */
+        if (!sel.src[1])
+                sel.src[1] = BIR_INDEX_ZERO;
+
         bi_emit_before(ctx, parent, sel);
 }