From e1be7213e418f5c0ed4b10b4e3be2ad60f41aee8 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 22 Jul 2025 18:17:25 +0200 Subject: [PATCH] nir/schedule: return progress and fix metadata Tracking if we changed the shader is somewhat complicated, so assume we always do. Reviewed-by: Emma Anholt Reviewed-by: Konstantin Seurer Part-of: --- src/compiler/nir/nir_schedule.c | 7 ++++++- src/compiler/nir/nir_schedule.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_schedule.c b/src/compiler/nir/nir_schedule.c index 1afd8acc478..b8c815879a1 100644 --- a/src/compiler/nir/nir_schedule.c +++ b/src/compiler/nir/nir_schedule.c @@ -1270,7 +1270,7 @@ nir_schedule_validate_uses(nir_schedule_scoreboard *scoreboard) * free a register immediately. The amount below the limit is up to you to * tune. */ -void +bool nir_schedule(nir_shader *shader, const nir_schedule_options *options) { @@ -1286,9 +1286,14 @@ nir_schedule(nir_shader *shader, nir_foreach_block(block, impl) { nir_schedule_block(scoreboard, block); } + + nir_progress(true, impl, nir_metadata_control_flow | + nir_metadata_divergence | + nir_metadata_live_defs); } nir_schedule_validate_uses(scoreboard); ralloc_free(scoreboard); + return true; } diff --git a/src/compiler/nir/nir_schedule.h b/src/compiler/nir/nir_schedule.h index e50fdcae3c5..9f884f8691a 100644 --- a/src/compiler/nir/nir_schedule.h +++ b/src/compiler/nir/nir_schedule.h @@ -83,7 +83,7 @@ typedef struct nir_schedule_options { } nir_schedule_options; -void nir_schedule(nir_shader *shader, const nir_schedule_options *options); +bool nir_schedule(nir_shader *shader, const nir_schedule_options *options); #ifdef __cplusplus } /* extern "C" */