nir: set disallow_undef_to_nan for legacy ARB asm programs

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11389
Fixes: 861d274453 ("nir: replace undef only used by ALU opcodes with 0 or NaN")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30419>
(cherry picked from commit 298633e365)
This commit is contained in:
Timothy Arceri 2024-07-30 10:12:51 +10:00 committed by Eric Engestrom
parent 6ffe16a5c4
commit 327e37aad5
2 changed files with 4 additions and 1 deletions

View file

@ -6584,7 +6584,7 @@
"description": "nir: set disallow_undef_to_nan for legacy ARB asm programs",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "861d274453c016e04da0997ee75d1c4ab26e95f0",
"notes": null

View file

@ -319,6 +319,9 @@ nir_opt_undef(nir_shader *shader)
}
}
if (shader->info.use_legacy_math_rules)
options.disallow_undef_to_nan = true;
return nir_shader_instructions_pass(shader,
nir_opt_undef_instr,
nir_metadata_block_index |