Mesa (master): pan/bi: Force BI_SELECT arguments scalar

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 27 15:06:57 UTC 2020


Module: Mesa
Branch: master
Commit: a5bfe591963e2c814cd59bee52e2c1fddbe9686d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a5bfe591963e2c814cd59bee52e2c1fddbe9686d

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Fri Apr 24 20:52:28 2020 -0400

pan/bi: Force BI_SELECT arguments scalar

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

---

 src/panfrost/bifrost/bir.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c
index 3c5ad9bf71b..a40b33800f8 100644
--- a/src/panfrost/bifrost/bir.c
+++ b/src/panfrost/bifrost/bir.c
@@ -100,6 +100,10 @@ bi_get_component_count(bi_instruction *ins, signed src)
                 return (src <= 0) ? ins->vector_channels : 1;
         } else {
                 unsigned bytes = nir_alu_type_get_type_size(src < 0 ? ins->dest_type : ins->src_types[src]);
+                
+                if (ins->type == BI_ATEST || ins->type == BI_SELECT)
+                        return 1;
+
                 return MAX2(32 / bytes, 1);
         }
 }



More information about the mesa-commit mailing list