mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
nir/lower_bool_to_int32: Fix progress reporting
If we only lower parameters, that's still progress. Technically. Fixes:6a29cb2654("nir/lower_bool_to_int32: add support for lowering functions.") Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23804> (cherry picked from commit5c8f21412f)
This commit is contained in:
parent
1e149d37df
commit
5300cff16c
2 changed files with 11 additions and 6 deletions
|
|
@ -238,7 +238,7 @@
|
|||
"description": "nir/lower_bool_to_int32: Fix progress reporting",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "6a29cb2654ff059dcb59e3fcaa0bcc982656609d"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -169,15 +169,20 @@ nir_lower_bool_to_int32_instr(UNUSED nir_builder *b,
|
|||
bool
|
||||
nir_lower_bool_to_int32(nir_shader *shader)
|
||||
{
|
||||
bool progress = false;
|
||||
nir_foreach_function(func, shader) {
|
||||
for (unsigned idx = 0; idx < func->num_params; idx++) {
|
||||
nir_parameter *param = &func->params[idx];
|
||||
if (param->bit_size == 1)
|
||||
if (param->bit_size == 1) {
|
||||
param->bit_size = 32;
|
||||
progress = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nir_shader_instructions_pass(shader, nir_lower_bool_to_int32_instr,
|
||||
nir_metadata_block_index |
|
||||
nir_metadata_dominance,
|
||||
NULL);
|
||||
|
||||
progress |=
|
||||
nir_shader_instructions_pass(shader, nir_lower_bool_to_int32_instr,
|
||||
nir_metadata_block_index |
|
||||
nir_metadata_dominance, NULL);
|
||||
return progress;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue