...instead of looking for "ARB" in the name of the shader. This matches
the behavior of i965. Using "ARB" was added in
a1ebac3750e ("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>
/** Have any shader variants been compiled yet? */
bool compiled_once;
- /** Should we use ALT mode for math? Useful for ARB programs. */
- bool use_alt_mode;
-
bool needs_edge_flag;
/** Constant data scraped from the shader by nir_opt_large_constants */
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;
crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
&num_system_values, &num_cbufs);
nir_shader *nir = nir_shader_clone(mem_ctx, ish->nir);
- prog_data->use_alt_mode = ish->use_alt_mode;
+ prog_data->use_alt_mode = nir->info.is_arb_asm;
crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
&num_system_values, &num_cbufs);
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)
/** Have any shader variants been compiled yet? */
bool compiled_once;
- /** Should we use ALT mode for math? Useful for ARB programs. */
- bool use_alt_mode;
-
bool needs_edge_flag;
/* Whether shader uses atomic operations. */
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);
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);
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)