pan/midgard: csel_swizzle with mir get swizzle
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 30 Aug 2019 17:44:42 +0000 (10:44 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 30 Aug 2019 22:50:25 +0000 (15:50 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/mir.c

index 2e0a9af93c4dcee812cba1f1fd9f1b4552490aba..ff552397bf8c3cc51a48d2712300c12e1ed25849 100644 (file)
@@ -42,6 +42,9 @@ unsigned
 mir_get_swizzle(midgard_instruction *ins, unsigned idx)
 {
         if (ins->type == TAG_ALU_4) {
+                if (idx == 2)
+                        return ins->csel_swizzle;
+
                 unsigned b = (idx == 0) ? ins->alu.src1 : ins->alu.src2;
 
                 midgard_vector_alu_src s =