Mesa (master): pan/bi: Allow passing thorugh 8-bit scalars

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 11 22:43:58 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Tue Jan  5 19:21:26 2021 -0500

pan/bi: Allow passing thorugh 8-bit scalars

Needed for fragment output. Not nearly sufficient for actual 8-bit
types in e.g OpenCL.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

---

 src/panfrost/bifrost/bifrost_compile.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 589ead1e4d4..d29c9fc948b 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -726,7 +726,10 @@ bi_alu_src_index(nir_alu_src src, unsigned comps)
                 unsigned c1 = (comps > 1) ? src.swizzle[1] & 1 : c0;
                 idx.swizzle = BI_SWIZZLE_H00 + c1 + (c0 << 1);
         } else if (bitsize == 8) {
-                unreachable("8-bit handling todo");
+                /* 8-bit vectors not yet supported */
+                assert(comps == 1 && "8-bit vectors not supported");
+                assert(src.swizzle[0] == 0 && "8-bit vectors not supported");
+                idx.swizzle = BI_SWIZZLE_B0000;
         }
 
         return idx;



More information about the mesa-commit mailing list