aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-07-18 09:23:23 -0500
committerMarge Bot <[email protected]>2020-06-23 17:43:53 +0000
commit2687ec5ee6869f10276c9c6bf5390e71d63377e3 (patch)
tree1c56c5cf38a07ba4bbcc41326c8b4e7487bc609c /src/intel
parentbfc1fd22cdf80722e47d0804e1a97d251e3a650d (diff)
intel/fs: Expose a couple of NIR lowering helpers
Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5596>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/compiler/brw_fs.cpp12
-rw-r--r--src/intel/compiler/brw_nir.h3
2 files changed, 9 insertions, 6 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index d3dc1f45110..63a724e07b7 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -8402,8 +8402,8 @@ computed_depth_mode(const nir_shader *shader)
*
* This should be replaced by global value numbering someday.
*/
-static bool
-move_interpolation_to_top(nir_shader *nir)
+bool
+brw_nir_move_interpolation_to_top(nir_shader *nir)
{
bool progress = false;
@@ -8468,8 +8468,8 @@ move_interpolation_to_top(nir_shader *nir)
*
* Useful when rendering to a non-multisampled buffer.
*/
-static bool
-demote_sample_qualifiers(nir_shader *nir)
+bool
+brw_nir_demote_sample_qualifiers(nir_shader *nir)
{
bool progress = true;
@@ -8556,8 +8556,8 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
}
if (!key->multisample_fbo)
- NIR_PASS_V(shader, demote_sample_qualifiers);
- NIR_PASS_V(shader, move_interpolation_to_top);
+ NIR_PASS_V(shader, brw_nir_demote_sample_qualifiers);
+ NIR_PASS_V(shader, brw_nir_move_interpolation_to_top);
brw_postprocess_nir(shader, compiler, true);
/* key->alpha_test_func means simulating alpha testing via discards,
diff --git a/src/intel/compiler/brw_nir.h b/src/intel/compiler/brw_nir.h
index 246218375f7..6a3a46384ed 100644
--- a/src/intel/compiler/brw_nir.h
+++ b/src/intel/compiler/brw_nir.h
@@ -192,6 +192,9 @@ nir_shader *brw_nir_create_passthrough_tcs(void *mem_ctx,
#define BRW_NIR_FRAG_OUTPUT_LOCATION_SHIFT 1
#define BRW_NIR_FRAG_OUTPUT_LOCATION_MASK INTEL_MASK(31, 1)
+bool brw_nir_move_interpolation_to_top(nir_shader *nir);
+bool brw_nir_demote_sample_qualifiers(nir_shader *nir);
+
#ifdef __cplusplus
}
#endif