iris: crocus: Use shader_info::is_arb_asm flag

...instead of looking for "ARB" in the name of the shader.  This matches
the behavior of i965.  Using "ARB" was added in a1ebac3750 ("iris:
Implement ALT mode for ARB_{vertex,fragment}_shader"), but there's no
explanation of why that method was used.

v2: Just use shader_info::is_arb_asm everywhere instead of
iris_uncompiled_shader::use_alt_mode.  Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858>
This commit is contained in:
Ian Romanick
2021-08-10 16:46:09 -07:00
parent bf74d58f21
commit e33055874b
4 changed files with 4 additions and 18 deletions

View File

@@ -1279,7 +1279,7 @@ iris_compile_vs(struct iris_screen *screen,
nir_shader_gather_info(nir, impl);
}
prog_data->use_alt_mode = ish->use_alt_mode;
prog_data->use_alt_mode = nir->info.is_arb_asm;
iris_setup_uniforms(compiler, mem_ctx, nir, prog_data, 0, &system_values,
&num_system_values, &num_cbufs);
@@ -1898,7 +1898,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 = ish->use_alt_mode;
prog_data->use_alt_mode = nir->info.is_arb_asm;
iris_setup_uniforms(compiler, mem_ctx, nir, prog_data, 0, &system_values,
&num_system_values, &num_cbufs);
@@ -2408,10 +2408,6 @@ iris_create_uncompiled_shader(struct iris_screen *screen,
update_so_info(&ish->stream_output, nir->info.outputs_written);
}
/* Save this now before potentially dropping nir->info.name */
if (nir->info.name && strncmp(nir->info.name, "ARB", 3) == 0)
ish->use_alt_mode = true;
if (screen->disk_cache) {
/* Serialize the NIR to a binary blob that we can hash for the disk
* cache. Drop unnecessary information (like variable names)