panfrost: Move nir_undef_to_zero to common util/

Will use for Bifrost as well.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
This commit is contained in:
Alyssa Rosenzweig 2020-10-15 08:45:24 -04:00 committed by Marge Bot
parent f0421099ef
commit 86b2b4eb76
5 changed files with 4 additions and 3 deletions

View File

@ -659,8 +659,6 @@ void emit_binary_bundle(
struct util_dynarray *emission,
int next_tag);
bool
nir_undef_to_zero(nir_shader *shader);
bool nir_fuse_io_16(nir_shader *shader);
bool midgard_nir_lod_errata(nir_shader *shader);

View File

@ -38,7 +38,6 @@ libpanfrost_midgard_files = files(
'midgard_opt_dce.c',
'midgard_opt_perspective.c',
'midgard_errata_lod.c',
'nir_undef_to_zero.c',
'nir_fuse_io_16.c',
)

View File

@ -23,6 +23,7 @@ libpanfrost_util_files = files(
'lcra.c',
'lcra.h',
'nir_mod_helpers.c',
'nir_undef_to_zero.c',
'pan_ir.c',
'pan_ir.h',
'pan_liveness.c',

View File

@ -81,6 +81,9 @@ panfrost_nir_assign_sysvals(struct panfrost_sysvals *ctx, void *memctx, nir_shad
int
panfrost_sysval_for_instr(nir_instr *instr, nir_dest *dest);
bool
nir_undef_to_zero(nir_shader *shader);
typedef struct {
int work_register_count;
int uniform_cutoff;