mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 02:40:11 +01:00
nir/lower_bool_to_int32: add support for lowering functions.
Change the function parameters to 32-bit. Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19291>
This commit is contained in:
parent
117b32a594
commit
6a29cb2654
1 changed files with 7 additions and 0 deletions
|
|
@ -172,6 +172,13 @@ nir_lower_bool_to_int32_instr(UNUSED nir_builder *b,
|
|||
bool
|
||||
nir_lower_bool_to_int32(nir_shader *shader)
|
||||
{
|
||||
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)
|
||||
param->bit_size = 32;
|
||||
}
|
||||
}
|
||||
return nir_shader_instructions_pass(shader, nir_lower_bool_to_int32_instr,
|
||||
nir_metadata_block_index |
|
||||
nir_metadata_dominance,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue