pan/bi: Fix vec2/3 handling
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 15 Apr 2020 00:20:16 +0000 (20:20 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 17 Apr 2020 20:25:35 +0000 (16:25 -0400)
Otherwise we get moves from null.

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

src/panfrost/bifrost/bi_lower_combine.c

index 350f4a1cce06042d8a28d284ba24dde2a8c488f2..4a01cfcca5e0175b8f87c2e507e68b3f1738f3cc 100644 (file)
@@ -231,6 +231,10 @@ bi_lower_combine(bi_context *ctx, bi_block *block)
                 unsigned R = bi_make_temp_reg(ctx);
 
                 bi_foreach_src(ins, s) {
+                        /* We're done early for vec2/3 */
+                        if (!ins->src[s])
+                                continue;
+
                         unsigned vec_count = 0;
 
                         if (bi_lower_combine_src(ctx, ins, s, R, &vec_count)) {