nir: Rename is_arb_asm to use_legacy_math_rules and document its meaning.

On iris and crocus, this flag is used to set "alt mode" math on the shader
as a whole.  Some other drivers have a similar mode for DX9/ARB-program
behavior, so document what it does so we can start using it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16176>
This commit is contained in:
Emma Anholt
2022-04-26 11:58:14 -07:00
committed by Marge Bot
parent 0d90b168d8
commit cf265c6606
7 changed files with 30 additions and 11 deletions

View File

@@ -1335,7 +1335,7 @@ iris_compile_vs(struct iris_screen *screen,
nir_shader_gather_info(nir, impl);
}
prog_data->use_alt_mode = nir->info.is_arb_asm;
prog_data->use_alt_mode = nir->info.use_legacy_math_rules;
iris_setup_uniforms(compiler, mem_ctx, nir, prog_data, 0, &system_values,
&num_system_values, &num_cbufs);
@@ -1967,7 +1967,7 @@ iris_compile_fs(struct iris_screen *screen,
nir_shader *nir = nir_shader_clone(mem_ctx, ish->nir);
const struct iris_fs_prog_key *const key = &shader->key.fs;
prog_data->use_alt_mode = nir->info.is_arb_asm;
prog_data->use_alt_mode = nir->info.use_legacy_math_rules;
iris_setup_uniforms(compiler, mem_ctx, nir, prog_data, 0, &system_values,
&num_system_values, &num_cbufs);