summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-01-29 17:19:00 +0100
committerSamuel Pitoiset <[email protected]>2018-02-06 23:08:39 +0100
commite68562b94b79f5ce17f5804f8d7308faf57bd3f0 (patch)
treeb3900a4674aa485ed0605c3ab96093149f2ba5f0 /src/compiler/nir/nir.h
parente2ea9e11910a10ae10d6491d913ab1d57f97a0d4 (diff)
nir: add nir_opt_shrink_load pass
This is a very simple pass that just shrinks load_push_constant intrinsics when some components are unused. For now, it can just shrink vec4 to vec3, vec3 to vec2 and so on. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 9ab2769e067..5ea8c9926b9 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2770,6 +2770,8 @@ bool nir_opt_peephole_select(nir_shader *shader, unsigned limit);
bool nir_opt_remove_phis(nir_shader *shader);
+bool nir_opt_shrink_load(nir_shader *shader);
+
bool nir_opt_trivial_continues(nir_shader *shader);
bool nir_opt_undef(nir_shader *shader);