nir/opt_move_discards_to_top: use nir_tex_instr_has_implicit_derivative
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 48158636bf ("nir: add is_gather_implicit_lod")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user