We already collect this information. We may as well make use of it.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14154>
/* Analyze after scheduling since we depend on instruction order. */
bi_analyze_helper_terminate(ctx);
+ /* A register is preloaded <==> it is live before the first block */
+ bi_block *first_block = list_first_entry(&ctx->blocks, bi_block, link);
+ info->preload = first_block->reg_live_in;
+
if (bifrost_debug & BIFROST_DBG_SHADERS && !skip_internal)
bi_print_shader(ctx, stdout);
unsigned tls_size;
unsigned wls_size;
+ /* Bit mask of preloaded registers */
+ uint64_t preload;
+
union {
struct {
bool reads_frag_coord;