aco: remove zero offset optimization
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 29 Sep 2023 15:35:20 +0000 (16:35 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 2 Oct 2023 10:11:37 +0000 (10:11 +0000)
This is done in nir_opt_constant_folding now.

No fossil-db changes on navi31.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25477>

src/amd/compiler/aco_instruction_selection.cpp

index 30dea1070f4444a125b1273cb77c453e1fd80394..154553e385d64e3c8680b3cfc0148e955820c8bb 100644 (file)
@@ -9343,10 +9343,8 @@ visit_tex(isel_context* ctx, nir_tex_instr* instr)
          if (pack_const && pack != Temp())
             pack = bld.vop2(aco_opcode::v_or_b32, bld.def(v1), Operand::c32(pack_const), pack);
       }
-      if ((pack_const || has_wqm_coord) && pack == Temp())
+      if (pack == Temp())
          offset = bld.copy(bld.def(v1), Operand::c32(pack_const));
-      else if (pack == Temp())
-         has_offset = false;
       else
          offset = pack;
    }