From: Christian Gmeiner Date: Sun, 7 Mar 2021 10:05:52 +0000 (+0100) Subject: etnaviv: use nir_lower_idiv(..) before opt loop X-Git-Tag: upstream/21.2.3~6853 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f532202f2d55b9ac475b7e3f8c96a4dd23489299;p=platform%2Fupstream%2Fmesa.git etnaviv: use nir_lower_idiv(..) before opt loop nir_lower_idiv(..) creates during its lowering isub instructions. Move nir_lower_idiv(..) before the opt loop to have a chance to optimize/lower isub away. Also drop the drop the halti dependency to make it easier to follow. This fixes the following assert on GC3000: Unhandled ALU op: isub Signed-off-by: Christian Gmeiner Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c index 4a87590..684b609 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c @@ -1104,6 +1104,7 @@ etna_compile_shader_nir(struct etna_shader_variant *v) NIR_PASS_V(s, nir_lower_indirect_derefs, nir_var_all, UINT32_MAX); NIR_PASS_V(s, nir_lower_tex, &(struct nir_lower_tex_options) { .lower_txp = ~0u }); NIR_PASS_V(s, nir_lower_alu_to_scalar, etna_alu_to_scalar_filter_cb, specs); + NIR_PASS_V(s, nir_lower_idiv, nir_lower_idiv_fast); etna_optimize_loop(s); @@ -1125,7 +1126,6 @@ etna_compile_shader_nir(struct etna_shader_variant *v) NIR_PASS_V(s, nir_opt_algebraic); NIR_PASS_V(s, nir_lower_bool_to_float); } else { - NIR_PASS_V(s, nir_lower_idiv, nir_lower_idiv_fast); NIR_PASS_V(s, nir_lower_bool_to_int32); }