pan/bi: Add bi_pack_literal

Identifies formats.

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>
This commit is contained in:
Alyssa Rosenzweig 2021-01-06 13:37:11 -05:00 committed by Marge Bot
parent 576a94b7b8
commit 62696e5ff5
1 changed files with 9 additions and 0 deletions

View File

@ -598,6 +598,15 @@ bi_pack_constants(bi_context *ctx, bi_clause *clause,
return 2;
}
static inline uint8_t
bi_pack_literal(enum bi_clause_subword literal)
{
assert(literal >= BI_CLAUSE_SUBWORD_LITERAL_0);
assert(literal <= BI_CLAUSE_SUBWORD_LITERAL_7);
return (literal - BI_CLAUSE_SUBWORD_LITERAL_0);
}
static void
bi_pack_clause(bi_context *ctx, bi_clause *clause,
bi_clause *next_1, bi_clause *next_2,