• Home
  • Raw
  • Download

Lines Matching full:nir

10 #include "compiler/nir/nir_builder.h"
17 optimize(nir_shader *nir) in optimize() argument
23 NIR_PASS(progress, nir, nir_split_var_copies); in optimize()
24 NIR_PASS(progress, nir, nir_split_struct_vars, nir_var_function_temp); in optimize()
25 NIR_PASS(progress, nir, nir_lower_var_copies); in optimize()
26 NIR_PASS(progress, nir, nir_lower_vars_to_ssa); in optimize()
28 NIR_PASS(progress, nir, nir_copy_prop); in optimize()
29 NIR_PASS(progress, nir, nir_opt_remove_phis); in optimize()
30 NIR_PASS(progress, nir, nir_lower_phis_to_scalar, true); in optimize()
31 NIR_PASS(progress, nir, nir_opt_dce); in optimize()
32 NIR_PASS(progress, nir, nir_opt_dead_cf); in optimize()
33 NIR_PASS(progress, nir, nir_opt_cse); in optimize()
34 NIR_PASS(progress, nir, nir_opt_peephole_select, 64, false, true); in optimize()
35 NIR_PASS(progress, nir, nir_opt_phi_precision); in optimize()
36 NIR_PASS(progress, nir, nir_opt_algebraic); in optimize()
37 NIR_PASS(progress, nir, nir_opt_constant_folding); in optimize()
39 NIR_PASS(progress, nir, nir_opt_deref); in optimize()
40 NIR_PASS(progress, nir, nir_opt_copy_prop_vars); in optimize()
41 NIR_PASS(progress, nir, nir_opt_undef); in optimize()
42 NIR_PASS(progress, nir, nir_lower_undef_to_zero); in optimize()
44 NIR_PASS(progress, nir, nir_opt_shrink_vectors, true); in optimize()
45 NIR_PASS(progress, nir, nir_opt_loop_unroll); in optimize()
95 nir_shader *nir = in brw_nir_from_spirv() local
98 nir_validate_shader(nir, "after spirv_to_nir"); in brw_nir_from_spirv()
99 nir_validate_ssa_dominance(nir, "after spirv_to_nir"); in brw_nir_from_spirv()
100 ralloc_steal(mem_ctx, nir); in brw_nir_from_spirv()
101 nir->info.name = ralloc_strdup(nir, "library"); in brw_nir_from_spirv()
103 nir_fixup_is_exported(nir); in brw_nir_from_spirv()
105 NIR_PASS(_, nir, nir_lower_system_values); in brw_nir_from_spirv()
106 NIR_PASS(_, nir, nir_lower_calls_to_builtins); in brw_nir_from_spirv()
108 NIR_PASS_V(nir, nir_lower_printf, &(const struct nir_lower_printf_options) { in brw_nir_from_spirv()
113 NIR_PASS(_, nir, nir_lower_variable_initializers, nir_var_function_temp); in brw_nir_from_spirv()
114 NIR_PASS(_, nir, nir_lower_returns); in brw_nir_from_spirv()
115 NIR_PASS(_, nir, nir_inline_functions); in brw_nir_from_spirv()
116 //nir_remove_non_exported(nir); in brw_nir_from_spirv()
117 NIR_PASS(_, nir, nir_copy_prop); in brw_nir_from_spirv()
118 NIR_PASS(_, nir, nir_opt_deref); in brw_nir_from_spirv()
121 nir_lower_constant_to_temp(nir); in brw_nir_from_spirv()
127 NIR_PASS(_, nir, nir_lower_variable_initializers, ~0); in brw_nir_from_spirv()
134 NIR_PASS(_, nir, nir_lower_vec3_to_vec4, in brw_nir_from_spirv()
141 NIR_PASS(_, nir, nir_lower_vars_to_explicit_types, in brw_nir_from_spirv()
146 optimize(nir); in brw_nir_from_spirv()
148 NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_all, NULL); in brw_nir_from_spirv()
153 NIR_PASS(_, nir, nir_lower_vars_to_explicit_types, in brw_nir_from_spirv()
157 assert(nir->constant_data_size == 0); in brw_nir_from_spirv()
159 NIR_PASS(_, nir, nir_lower_memcpy); in brw_nir_from_spirv()
161 NIR_PASS(_, nir, nir_lower_explicit_io, nir_var_mem_constant, in brw_nir_from_spirv()
164 NIR_PASS(_, nir, nir_lower_explicit_io, nir_var_uniform, in brw_nir_from_spirv()
171 NIR_PASS(_, nir, nir_lower_convert_alu_types, NULL); in brw_nir_from_spirv()
172 NIR_PASS(_, nir, nir_opt_if, 0); in brw_nir_from_spirv()
173 NIR_PASS(_, nir, nir_opt_idiv_const, 16); in brw_nir_from_spirv()
175 optimize(nir); in brw_nir_from_spirv()
177 return nir; in brw_nir_from_spirv()