nir: Add pass to optimize intrinsics

Specifically, constant fold intrinsics from ARB_shader_group_vote, but I
suspect it'll be useful for other things in the future.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Matt Turner
2017-06-22 12:13:25 -07:00
parent ba2fbbf1c0
commit d4c9d6a3b2
4 changed files with 99 additions and 0 deletions

View File

@@ -553,6 +553,7 @@ nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
OPT(nir_opt_dce);
OPT(nir_opt_cse);
OPT(nir_opt_peephole_select, 0);
OPT(nir_opt_intrinsics);
OPT(nir_opt_algebraic);
OPT(nir_opt_constant_folding);
OPT(nir_opt_dead_cf);