etnaviv: Switch to etna_core_has_feature(..) for has_halti2_instructions
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30806>
This commit is contained in:
committed by
Marge Bot
parent
2978d10203
commit
42f5b99a34
@@ -49,7 +49,7 @@
|
||||
static bool
|
||||
etna_alu_to_scalar_filter_cb(const nir_instr *instr, const void *data)
|
||||
{
|
||||
const struct etna_specs *specs = data;
|
||||
const struct etna_core_info *info = data;
|
||||
|
||||
if (instr->type != nir_instr_type_alu)
|
||||
return false;
|
||||
@@ -81,7 +81,7 @@ etna_alu_to_scalar_filter_cb(const nir_instr *instr, const void *data)
|
||||
case nir_op_b32any_inequal4:
|
||||
return true;
|
||||
case nir_op_fdot2:
|
||||
if (!specs->has_halti2_instructions)
|
||||
if (!etna_core_has_feature(info, ETNA_FEATURE_HALTI2))
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
@@ -1175,7 +1175,7 @@ etna_compile_shader(struct etna_shader_variant *v)
|
||||
NIR_PASS_V(s, nir_lower_indirect_derefs, nir_var_all, UINT32_MAX);
|
||||
NIR_PASS_V(s, etna_nir_lower_texture, &v->key);
|
||||
|
||||
NIR_PASS_V(s, nir_lower_alu_to_scalar, etna_alu_to_scalar_filter_cb, specs);
|
||||
NIR_PASS_V(s, nir_lower_alu_to_scalar, etna_alu_to_scalar_filter_cb, c->info);
|
||||
if (c->info->halti >= 2) {
|
||||
nir_lower_idiv_options idiv_options = {
|
||||
.allow_fp16 = true,
|
||||
@@ -1210,7 +1210,7 @@ etna_compile_shader(struct etna_shader_variant *v)
|
||||
}
|
||||
|
||||
while( OPT(s, nir_opt_vectorize, NULL, NULL) );
|
||||
NIR_PASS_V(s, nir_lower_alu_to_scalar, etna_alu_to_scalar_filter_cb, specs);
|
||||
NIR_PASS_V(s, nir_lower_alu_to_scalar, etna_alu_to_scalar_filter_cb, c->info);
|
||||
|
||||
NIR_PASS_V(s, nir_remove_dead_variables, nir_var_function_temp, NULL);
|
||||
NIR_PASS_V(s, nir_opt_algebraic_late);
|
||||
|
||||
@@ -71,8 +71,6 @@ struct etna_specs {
|
||||
unsigned has_shader_range_registers : 1;
|
||||
/* has the new sin/cos/log functions */
|
||||
unsigned has_new_transcendentals : 1;
|
||||
/* has the new dp2/dpX_norm instructions, among others */
|
||||
unsigned has_halti2_instructions : 1;
|
||||
/* has no limit on the number of constant sources per instruction */
|
||||
unsigned has_no_oneconst_limit : 1;
|
||||
/* has V4_COMPRESSION */
|
||||
|
||||
@@ -890,8 +890,6 @@ etna_get_specs(struct etna_screen *screen)
|
||||
screen->info->model >= 0x1000 || screen->info->model == 0x880;
|
||||
screen->specs.has_new_transcendentals =
|
||||
VIV_FEATURE(screen, ETNA_FEATURE_HAS_FAST_TRANSCENDENTALS);
|
||||
screen->specs.has_halti2_instructions =
|
||||
VIV_FEATURE(screen, ETNA_FEATURE_HALTI2);
|
||||
screen->specs.has_no_oneconst_limit =
|
||||
VIV_FEATURE(screen, ETNA_FEATURE_SH_NO_ONECONST_LIMIT);
|
||||
screen->specs.v4_compression =
|
||||
|
||||
Reference in New Issue
Block a user