[Mesa-dev] [PATCH v2 69/73] radeonsi/nir: lower txp instructions
Nicolai Hähnle
nhaehnle at gmail.com
Wed Jul 5 10:48:53 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 83c7ab1..10b3630 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -343,20 +343,25 @@ si_lower_nir(struct si_shader_selector* sel)
* Performance considerations aside, we must:
* - lower certain ALU operations
* - ensure constant offsets for texture instructions are folded
* and copy-propagated
*/
NIR_PASS_V(sel->nir, nir_lower_returns);
NIR_PASS_V(sel->nir, nir_lower_vars_to_ssa);
NIR_PASS_V(sel->nir, nir_lower_alu_to_scalar);
NIR_PASS_V(sel->nir, nir_lower_phis_to_scalar);
+ static const struct nir_lower_tex_options lower_tex_options = {
+ .lower_txp = ~0u,
+ };
+ NIR_PASS_V(sel->nir, nir_lower_tex, &lower_tex_options);
+
bool progress;
do {
progress = false;
/* (Constant) copy propagation is needed for txf with offsets. */
NIR_PASS(progress, sel->nir, nir_copy_prop);
NIR_PASS(progress, sel->nir, nir_opt_remove_phis);
NIR_PASS(progress, sel->nir, nir_opt_dce);
if (nir_opt_trivial_continues(sel->nir)) {
progress = true;
--
2.9.3
More information about the mesa-dev
mailing list