From dc2d8a643ff6628dd359b712e85746b4e1ed0d1b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 30 May 2022 11:43:03 -0400 Subject: [PATCH] nir: Export nir_io_add_intrinsic_xfb_info This is useful for drivers which wish to consume XFB information. These hopefully-uncontroversial hunks are extracted from the much more controversial "st,nir,radeons: Move nir_lower_io_passes to si_nir_lower_io" by Jason. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_lower_io.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 8fabefcb62e..ac62fcadafc 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4615,6 +4615,8 @@ bool nir_io_add_const_offset_to_base(nir_shader *nir, nir_variable_mode modes); void nir_lower_io_passes(nir_shader *nir); +bool nir_io_add_intrinsic_xfb_info(nir_shader *nir); + bool nir_lower_vars_to_explicit_types(nir_shader *shader, nir_variable_mode modes, diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 8554bcd407b..4acd8f84ac9 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -2943,8 +2943,8 @@ nir_lower_color_inputs(nir_shader *nir) return progress; } -static bool -nir_add_xfb_info(nir_shader *nir) +bool +nir_io_add_intrinsic_xfb_info(nir_shader *nir) { nir_function_impl *impl = nir_shader_get_entrypoint(nir); bool progress = false; @@ -3071,7 +3071,7 @@ nir_lower_io_passes(nir_shader *nir) nir_var_shader_in | nir_var_shader_out, NULL); if (nir->xfb_info) - NIR_PASS_V(nir, nir_add_xfb_info); + NIR_PASS_V(nir, nir_io_add_intrinsic_xfb_info); nir->info.io_lowered = true; }