summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2020-12-29 10:56:08 -0500
committerMarge Bot <eric+marge@anholt.net>2021-01-29 16:55:44 +0000
commite383af639a9bc72e2f203c00c2e07806746bbe66 (patch)
tree3626501b68a8b3397452d778f51d3af0f3691bd9
parent80157fac68b478d2d5f0e66b4ae56babda125e15 (diff)
pan/bi: Test pack_literal
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
-rw-r--r--src/panfrost/bifrost/bi_pack.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c
index fcbbf52dd68..4e8af2ff43d 100644
--- a/src/panfrost/bifrost/bi_pack.c
+++ b/src/panfrost/bifrost/bi_pack.c
@@ -942,8 +942,17 @@ bi_pack(bi_context *ctx, struct util_dynarray *emission)
#ifndef NDEBUG
+static void
+bi_test_pack_literal(void)
+{
+ for (unsigned x = 0; x <= 7; ++x)
+ assert(bi_pack_literal(BI_CLAUSE_SUBWORD_LITERAL_0 + x) == x);
+}
+
int bi_test_packing(void)
{
+ bi_test_pack_literal();
+
return 0;
}
#endif