Mesa (master): pan/bi: Allow vec16 in bi_print_swizzle()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 13 13:48:19 UTC 2020


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

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Fri Nov 13 09:47:54 2020 +0100

pan/bi: Allow vec16 in bi_print_swizzle()

Ideally we should choose "abcd" instead of "xyzw" when accessing a
vector that has more than 4 components, but bi_instruction does not
provide this information, so let's keep things simple for now.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7530>

---

 src/panfrost/bifrost/bi_print.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c
index c00f2180b27..db86fb055f0 100644
--- a/src/panfrost/bifrost/bi_print.c
+++ b/src/panfrost/bifrost/bi_print.c
@@ -165,8 +165,8 @@ bi_print_swizzle(bi_instruction *ins, unsigned src, FILE *fp)
         fprintf(fp, ".");
 
         for (unsigned u = 0; u < bi_get_component_count(ins, src); ++u) {
-                assert(ins->swizzle[src][u] < 4);
-                fputc("xyzw"[ins->swizzle[src][u]], fp);
+                assert(ins->swizzle[src][u] < 16);
+                fputc("xyzwefghijklmnop"[ins->swizzle[src][u]], fp);
         }
 }
 



More information about the mesa-commit mailing list