etnaviv: nir: use lower_fround_even
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Sat, 14 Jan 2023 20:26:18 +0000 (21:26 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 15 Jan 2023 10:19:05 +0000 (11:19 +0100)
The generated asm is not as good as the one from the binary blob but
does its job.

Passes: dEQP-GLES3.functional.shaders.operator.common_functions.round*.*

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20709>

src/gallium/drivers/etnaviv/etnaviv_compiler.c

index f8eb5d4..0e26795 100644 (file)
@@ -37,6 +37,7 @@ etna_compiler_create(const char *renderer, const struct etna_specs *specs)
 
    compiler->options = (nir_shader_compiler_options) {
       .lower_fpow = true,
+      .lower_fround_even = true,
       .lower_ftrunc = true,
       .fuse_ffma16 = true,
       .fuse_ffma32 = true,