From d472c45810c15d744981f68ca375fcbc47f29b42 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 12 Jul 2022 20:27:12 +0200 Subject: [PATCH] nir_to_tgsi: Lower uadd_sat/usub_sat. Signed-off-by: Georg Lehmann Reviewed-by: Emma Anholt Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/auxiliary/nir/nir_to_tgsi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index 390a532b546..9532b81e197 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -3540,6 +3540,7 @@ ntt_fix_nir_options(struct pipe_screen *screen, struct nir_shader *s, !options->lower_flrp64 || !options->lower_fmod || !options->lower_rotate || + !options->lower_uadd_sat || !options->lower_uniforms_to_ubo || !options->lower_vector_cmp || options->lower_fsqrt != lower_fsqrt || @@ -3556,7 +3557,8 @@ ntt_fix_nir_options(struct pipe_screen *screen, struct nir_shader *s, new_options->lower_flrp64 = true; new_options->lower_fmod = true; new_options->lower_rotate = true; - new_options->lower_uniforms_to_ubo = true, + new_options->lower_uadd_sat = true; + new_options->lower_uniforms_to_ubo = true; new_options->lower_vector_cmp = true; new_options->lower_fsqrt = lower_fsqrt; new_options->force_indirect_unrolling = no_indirects_mask; @@ -3907,6 +3909,7 @@ static const nir_shader_compiler_options nir_to_tgsi_compiler_options = { .lower_fmod = true, .lower_rotate = true, .lower_uniforms_to_ubo = true, + .lower_uadd_sat = true, .lower_vector_cmp = true, .lower_int64_options = nir_lower_imul_2x32_64, .use_interpolated_input_intrinsics = true,