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 <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
This commit is contained in:
Georg Lehmann
2025-07-22 18:17:25 +02:00
committed by Marge Bot
parent ee0f2ed241
commit e1be7213e4
2 changed files with 7 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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" */