pan/bi: Derive M0 from pcrel_idx while packing

Assumes the usual M1=4 mode.

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/8354>
This commit is contained in:
Alyssa Rosenzweig 2021-02-05 18:17:06 -05:00 committed by Marge Bot
parent 2096359cf9
commit 66100895ff

View file

@ -821,7 +821,7 @@ bi_pack_clause(bi_context *ctx, bi_clause *clause,
uint64_t header = bi_pack_header(clause, next_1, next_2, tdd);
uint64_t ec0 = (clause->constants[0] >> 4);
unsigned m0 = 0; /* TODO: set me so we don't break branches */
unsigned m0 = (clause->pcrel_idx == 0) ? 4 : 0;
unsigned counts[8] = {
1, 2, 3, 3, 4, 5, 5, 6