pan/bi: Fix writes_component for VECTOR
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 31 Mar 2020 16:55:31 +0000 (12:55 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 1 Apr 2020 02:25:05 +0000 (02:25 +0000)
I'm not convinced this is the best way and it's sort of a hack, but it
fixes RA for st_vary.

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

src/panfrost/bifrost/bir.c

index 8256c45a7806169d93e528db29daf04b83d29cf2..b42db852ce4b7ad15ad76bf4f4a70dce4c58e031 100644 (file)
@@ -148,6 +148,10 @@ bi_get_immediate(bi_instruction *ins, unsigned index)
 bool
 bi_writes_component(bi_instruction *ins, unsigned comp)
 {
+        /* TODO: Do we want something less coarse? */
+        if (bi_class_props[ins->type] & BI_VECTOR)
+                return true;
+
         nir_alu_type T = ins->dest_type;
         unsigned size = nir_alu_type_get_type_size(T);
         return ins->writemask & (0xF << (comp * (size / 8)));