Lines Matching full:nir
29 #include "compiler/nir/nir.h"
30 #include "compiler/nir/nir_builder.h"
52 link_libanv(nir_shader *nir, const nir_shader *libanv) in link_libanv() argument
54 nir_link_shader_functions(nir, libanv); in link_libanv()
55 NIR_PASS_V(nir, nir_inline_functions); in link_libanv()
56 NIR_PASS_V(nir, nir_remove_non_entrypoints); in link_libanv()
57 NIR_PASS_V(nir, nir_lower_vars_to_explicit_types, nir_var_function_temp, in link_libanv()
59 NIR_PASS_V(nir, nir_opt_deref); in link_libanv()
60 NIR_PASS_V(nir, nir_lower_vars_to_ssa); in link_libanv()
61 NIR_PASS_V(nir, nir_lower_explicit_io, in link_libanv()
86 nir_shader *nir = b.shader; in compile_shader() local
88 link_libanv(nir, libanv); in compile_shader()
90 NIR_PASS_V(nir, nir_lower_vars_to_ssa); in compile_shader()
91 NIR_PASS_V(nir, nir_opt_cse); in compile_shader()
92 NIR_PASS_V(nir, nir_opt_gcm, true); in compile_shader()
93 NIR_PASS_V(nir, nir_opt_peephole_select, 1, false, false); in compile_shader()
95 NIR_PASS_V(nir, nir_lower_variable_initializers, ~0); in compile_shader()
97 NIR_PASS_V(nir, nir_split_var_copies); in compile_shader()
98 NIR_PASS_V(nir, nir_split_per_member_structs); in compile_shader()
101 nir->info.workgroup_size[0] = 16; in compile_shader()
102 nir->info.workgroup_size[1] = 1; in compile_shader()
103 nir->info.workgroup_size[2] = 1; in compile_shader()
108 brw_preprocess_nir(compiler, nir, &opts); in compile_shader()
110 NIR_PASS_V(nir, nir_propagate_invariant, false); in compile_shader()
113 NIR_PASS_V(nir, nir_lower_input_attachments, in compile_shader()
124 NIR_PASS_V(nir, nir_lower_compute_system_values, &options); in compile_shader()
125 NIR_PASS_V(nir, nir_shader_intrinsics_pass, lower_base_workgroup_id, in compile_shader()
130 nir->global_mem_size = 0; in compile_shader()
131 nir->scratch_size = 0; in compile_shader()
132 nir->info.shared_size = 0; in compile_shader()
133 nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); in compile_shader()
135 NIR_PASS_V(nir, nir_copy_prop); in compile_shader()
136 NIR_PASS_V(nir, nir_opt_constant_folding); in compile_shader()
137 NIR_PASS_V(nir, nir_opt_dce); in compile_shader()
146 NIR_PASS_V(nir, brw_nir_lower_cs_intrinsics, in compile_shader()
158 NIR_PASS_V(nir, nir_opt_load_store_vectorize, &options); in compile_shader()
160 nir->num_uniforms = uniform_size; in compile_shader()
162 prog_data.base.nr_params = nir->num_uniforms / 4; in compile_shader()
164 brw_nir_analyze_ubo_ranges(compiler, nir, prog_data.base.ubo_ranges); in compile_shader()
173 .nir = nir, in compile_shader()
207 .nir = nir, in compile_shader()
228 .stage = nir->info.stage, in compile_shader()
243 ralloc_free(nir); in compile_shader()