pan/compiler: Split bifrost_nir.c from bifrost_compile.c

Before this, everything was in the giant bifrost_compile.c file, now
preprocess, optimize and postproces are in their own "small"
bifrost_nir.c.

I also removed some dead functions and moved the passes closer to their
usage, (ex, passes only used in preprocess are now just before
preprocess). Otherwise it's all the same code we had before.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40717>
This commit is contained in:
Lorenzo Rossi 2026-03-30 18:59:39 +02:00 committed by Marge Bot
parent 7d8b2c4128
commit a45a7bbf44
4 changed files with 1153 additions and 1145 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1529,6 +1529,11 @@ bi_is_terminal_block(bi_block *block)
unsigned bi_pack(bi_context *ctx, struct util_dynarray *emission);
void bi_pack_valhall(bi_context *ctx, struct util_dynarray *emission);
void bi_compile_variant(nir_shader *nir,
const struct pan_compile_inputs *inputs,
struct util_dynarray *binary, struct pan_shader_info *info,
enum bi_idvs_mode idvs);
struct bi_packed_tuple {
uint64_t lo;
uint64_t hi;

View file

@ -34,6 +34,7 @@ libpanfrost_bifrost_files = files(
'bi_debug.c',
'bir.c',
'bifrost_compile.c',
'bifrost_nir.c',
'bifrost/bi_opt_message_preload.c',
'bifrost/bi_pack.c',
'bifrost/bi_schedule.c',