From 9dc4ee91215cfd5ea6d98c4879abc4e7979b4c64 Mon Sep 17 00:00:00 2001 From: Italo Nicola Date: Fri, 14 Oct 2022 18:12:52 +0000 Subject: [PATCH] etnaviv: lower (un)pack_{2x16,2x32}_split and extract_{byte,word} Signed-off-by: Italo Nicola Reviewed-by: Faith Ekstrand Part-of: --- src/gallium/drivers/etnaviv/etnaviv_compiler.c | 6 ++++++ src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.c b/src/gallium/drivers/etnaviv/etnaviv_compiler.c index a182b2e..0eb4568 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler.c @@ -53,6 +53,8 @@ etna_compiler_create(const char *renderer, const struct etna_specs *specs) .lower_fmod = true, .lower_vector_cmp = true, .lower_fdph = true, + .lower_extract_byte = true, + .lower_extract_word = true, .lower_insert_byte = true, .lower_insert_word = true, .lower_fdiv = true, /* !specs->has_new_transcendentals */ @@ -67,6 +69,10 @@ etna_compiler_create(const char *renderer, const struct etna_specs *specs) .force_indirect_unrolling = nir_var_all, .max_unroll_iterations = 32, .vectorize_io = true, + .lower_pack_32_2x16_split = true, + .lower_pack_64_2x32_split = true, + .lower_unpack_32_2x16_split = true, + .lower_unpack_64_2x32_split = true, }; compiler->regs = etna_ra_setup(compiler); diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c index 8204f83..70f152c 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c @@ -1148,6 +1148,8 @@ etna_compile_shader(struct etna_shader_variant *v) etna_optimize_loop(s); NIR_PASS_V(s, etna_lower_io, v); + NIR_PASS_V(s, nir_lower_pack); + etna_optimize_loop(s); if (v->shader->specs->vs_need_z_div) NIR_PASS_V(s, nir_lower_clip_halfz); -- 2.7.4