From 81b2008af914882f35be0799555991cd4fbee09b Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Thu, 24 Feb 2022 21:43:28 +0100 Subject: [PATCH] nir/legalize_16bit_sampler_srcs: Don't guess source type. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Georg Lehmann Reviewed-by: Daniel Schürmann Part-of: --- src/compiler/nir/nir_lower_mediump.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/compiler/nir/nir_lower_mediump.c b/src/compiler/nir/nir_lower_mediump.c index 802661d9766..edf6bd155ef 100644 --- a/src/compiler/nir/nir_lower_mediump.c +++ b/src/compiler/nir/nir_lower_mediump.c @@ -609,12 +609,8 @@ nir_legalize_16bit_sampler_srcs(nir_shader *nir, continue; /* Fix the bit size. */ - bool is_sint = i == nir_tex_src_offset; - bool is_uint = !is_sint && - (tex->op == nir_texop_txf || - tex->op == nir_texop_txf_ms || - tex->op == nir_texop_txs || - tex->op == nir_texop_samples_identical); + bool is_sint = nir_tex_instr_src_type(tex, i) == nir_type_int; + bool is_uint = nir_tex_instr_src_type(tex, i) == nir_type_uint; nir_ssa_def *(*convert)(nir_builder *, nir_ssa_def *); switch (bit_size) {