From 329413992e50551ba1c165ccae32bbd42645f831 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 10 Jul 2025 11:15:39 -0400 Subject: [PATCH] nir/lower_tex: revert "optimize LOD bias lower for txl" This reverts commit f853d285ef3d48ebd0482e765c61fdbb6d0554b5. Failing a GL CTS test https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5866 .. apparently I ran VK CTS but not GL CTS on that MR. Oops. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_lower_tex.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index d55e499621f..cce82c3b754 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -1509,11 +1509,7 @@ lower_sampler_lod_bias(nir_builder *b, nir_tex_instr *tex) nir_def *orig = nir_steal_tex_src(tex, src); if (orig) { - /* If bias is 16-bit but orig is 32-bit, we do a 32-bit add so the - * float conversions can fold away (which could not happen with a - * 16-bit add.) - */ - bias = nir_f2f16(b, nir_fadd(b, nir_f2fN(b, bias, orig->bit_size), orig)); + bias = nir_fadd(b, bias, nir_f2f16(b, orig)); } nir_tex_instr_add_src(tex, src, bias);