pan/bi: Stub worklist routines

In the near future we'll schedule out-of-order via a dependendency graph
and worklist. For now, emulate in-order operation.

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-01-06 14:23:41 -05:00 committed by Marge Bot
parent 3ddff0fa8b
commit eb7e363688

View file

@ -155,6 +155,38 @@ bi_flatten_block(bi_block *block, unsigned *len)
return instructions;
}
/* The worklist would track instructions without outstanding dependencies. For
* debug, force in-order scheduling (no dependency graph is constructed).
*/
static struct bi_worklist
bi_initialize_worklist(bi_block *block)
{
struct bi_worklist st = { };
st.instructions = bi_flatten_block(block, &st.count);
if (st.count) {
st.worklist = calloc(BITSET_WORDS(st.count), sizeof(BITSET_WORD));
BITSET_SET(st.worklist, st.count - 1);
}
return st;
}
static void
bi_free_worklist(struct bi_worklist st)
{
free(st.instructions);
free(st.worklist);
}
static void
bi_update_worklist(struct bi_worklist st, unsigned idx)
{
if (idx >= 1)
BITSET_SET(st.worklist, idx - 1);
}
/* Determines messsage type by checking the table and a few special cases. Only
* case missing is tilebuffer instructions that access depth/stencil, which
* require a Z_STENCIL message (to implement