etnaviv: nir: do not call nir_lower_idiv(..) unconditionally

GPUs without native integers lower idiv in lower_int_to_float and
there is no need to call nir_lower_idiv(..) for such GPUs.

Fixes nir crashes I am seeing with gc2000_gles2 CI job.

Fixes: f532202f2d ("etnaviv: use nir_lower_idiv(..) before opt loop")
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23450>
This commit is contained in:
Christian Gmeiner
2023-06-05 15:32:13 +02:00
committed by Marge Bot
parent c5b6a65f81
commit add14d6cfb
2 changed files with 6 additions and 148 deletions
-144
View File
@@ -139,150 +139,6 @@ dEQP-GLES2.functional.fragment_ops.random.97,Fail
dEQP-GLES2.functional.fragment_ops.random.98,Fail
dEQP-GLES2.functional.fragment_ops.random.9,Fail
dEQP-GLES2.functional.rasterization.limits.points,Fail
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec2_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec2_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec2_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec2_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec3_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec3_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec3_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec3_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec4_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec4_int_fragment,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec4_int_vertex,Crash
dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec4_vertex,Crash
dEQP-GLES2.functional.shaders.random.basic_expression.combined.12,Fail
dEQP-GLES2.functional.shaders.random.basic_expression.combined.30,Fail
dEQP-GLES2.functional.shaders.random.basic_expression.combined.63,Fail
@@ -1139,10 +1139,12 @@ etna_compile_shader(struct etna_shader_variant *v)
v->key.tex_swizzle);
NIR_PASS_V(s, nir_lower_alu_to_scalar, etna_alu_to_scalar_filter_cb, specs);
nir_lower_idiv_options idiv_options = {
.allow_fp16 = true,
};
NIR_PASS_V(s, nir_lower_idiv, &idiv_options);
if (c->specs->halti >= 2) {
nir_lower_idiv_options idiv_options = {
.allow_fp16 = true,
};
NIR_PASS_V(s, nir_lower_idiv, &idiv_options);
}
NIR_PASS_V(s, nir_lower_alu);
etna_optimize_loop(s);