aco: remove useless check for nir_tex_src_bias
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 11 May 2020 13:23:52 +0000 (15:23 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 14 May 2020 10:05:44 +0000 (10:05 +0000)
I think only nir_texop_txb can have a bias operand anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4989>

src/amd/compiler/aco_instruction_selection.cpp

index fd018622a4b171a4110205de698f6160396129fd..60a4a7e0fb3e38b6722fdb136300d6213af4f316 100644 (file)
@@ -8194,10 +8194,8 @@ void visit_tex(isel_context *ctx, nir_tex_instr *instr)
          break;
       }
       case nir_tex_src_bias:
-         if (instr->op == nir_texop_txb) {
-            bias = get_ssa_temp(ctx, instr->src[i].src.ssa);
-            has_bias = true;
-         }
+         bias = get_ssa_temp(ctx, instr->src[i].src.ssa);
+         has_bias = true;
          break;
       case nir_tex_src_lod: {
          nir_const_value *val = nir_src_as_const_value(instr->src[i].src);