From c2168f845e7475d9a701be91ea761ae793a12636 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Sat, 5 Feb 2022 12:08:27 +0100 Subject: [PATCH] nir/lower_mediump: Treat u2u16 like i2i16. There is a comment in nir_fold_16bit_sampler_conversions saying that these are the same, but the code only checks for i2i16. Signed-off-by: Georg Lehmann Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir_lower_mediump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_mediump.c b/src/compiler/nir/nir_lower_mediump.c index 49319dd..7f3a5f0 100644 --- a/src/compiler/nir/nir_lower_mediump.c +++ b/src/compiler/nir/nir_lower_mediump.c @@ -393,7 +393,8 @@ is_u16_to_u32_conversion(nir_instr *instr) static bool is_i32_to_i16_conversion(nir_instr *instr) { - return is_n_to_m_conversion(instr, 32, nir_op_i2i16); + return is_n_to_m_conversion(instr, 32, nir_op_i2i16) || + is_n_to_m_conversion(instr, 32, nir_op_u2u16); } static void -- 2.7.4