From 8bbc8284d940324d8f71fe29bee3d23bd1f0ab6f Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 8 Nov 2024 17:40:02 +0000 Subject: [PATCH] nir/opt_move_discards_to_top: use nir_tex_instr_has_implicit_derivative Signed-off-by: Rhys Perry Reviewed-by: Alyssa Rosenzweig Reviewed-by: Georg Lehmann Fixes: 48158636bf1b ("nir: add is_gather_implicit_lod") Part-of: --- src/compiler/nir/nir_opt_move_discards_to_top.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/compiler/nir/nir_opt_move_discards_to_top.c b/src/compiler/nir/nir_opt_move_discards_to_top.c index 80531d5dc58..b36febbb4ba 100644 --- a/src/compiler/nir/nir_opt_move_discards_to_top.c +++ b/src/compiler/nir/nir_opt_move_discards_to_top.c @@ -26,13 +26,6 @@ #include "nir_control_flow.h" #include "nir_worklist.h" -static bool -nir_texop_implies_derivative(nir_texop op) -{ - return op == nir_texop_tex || - op == nir_texop_txb || - op == nir_texop_lod; -} #define MOVE_INSTR_FLAG 1 #define STOP_PROCESSING_INSTR_FLAG 2 @@ -149,7 +142,7 @@ opt_move_discards_to_top_impl(nir_function_impl *impl) case nir_instr_type_tex: { nir_tex_instr *tex = nir_instr_as_tex(instr); - if (nir_texop_implies_derivative(tex->op)) + if (nir_tex_instr_has_implicit_derivative(tex)) consider_discards = false; continue; }