Mesa (main): nir: Export nir_io_add_intrinsic_xfb_info
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Jun 4 15:11:11 UTC 2022
Module: Mesa
Branch: main
Commit: dc2d8a643ff6628dd359b712e85746b4e1ed0d1b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc2d8a643ff6628dd359b712e85746b4e1ed0d1b
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Mon May 30 11:43:03 2022 -0400
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 <alyssa at collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15720>
---
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;
}
More information about the mesa-commit
mailing list