pan/mdg: Avoid fusing ld_vary_16 with non-zero component
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 10 Jun 2020 18:06:43 +0000 (14:06 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 12 Jun 2020 14:45:50 +0000 (14:45 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>

src/panfrost/midgard/nir_fuse_io_16.c

index ddeb4491de495793c892ebd288befe0d8ba0ec29..ed4b7750d043acc666b041de346a6ffda8af90d3 100644 (file)
@@ -67,6 +67,11 @@ nir_fuse_io_16(nir_shader *shader)
             if (nir_dest_bit_size(intr->dest) != 32)
                     continue;
 
+            /* We swizzle at a 32-bit level so need a multiple of 2. We could
+             * do a bit better and handle even components though */
+            if (nir_intrinsic_component(intr))
+               continue;
+
             if (!intr->dest.is_ssa)
                continue;