1 printf "\tbuilding nir compiler sub-components-->\n"
2 mkdir
-p $build_dir/src
/compiler
/nir
4 #===============================================================================
6 export PYTHONPATH
=$mako
7 $python3 $src_dir/src
/compiler
/nir
/nir_builder_opcodes_h.py \
8 >$build_dir/src
/compiler
/nir
/nir_builder_opcodes.h
&
9 #------------------------------------------------------------------------------
10 $python3 $src_dir/src
/compiler
/nir
/nir_constant_expressions.py \
11 >$build_dir/src
/compiler
/nir
/nir_constant_expressions.c
&
12 #------------------------------------------------------------------------------
13 $python3 $src_dir/src
/compiler
/nir
/nir_opcodes_h.py \
14 >$build_dir/src
/compiler
/nir
/nir_opcodes.h
&
15 #------------------------------------------------------------------------------
16 $python3 $src_dir/src
/compiler
/nir
/nir_opcodes_c.py \
17 >$build_dir/src
/compiler
/nir
/nir_opcodes.c
&
18 #------------------------------------------------------------------------------
19 $python3 $src_dir/src
/compiler
/nir
/nir_opt_algebraic.py \
20 >$build_dir/src
/compiler
/nir
/nir_opt_algebraic.c
&
21 #------------------------------------------------------------------------------
22 $python3 $src_dir/src
/compiler
/nir
/nir_intrinsics_h.py \
23 --outdir $build_dir/src
/compiler
/nir
&
24 #------------------------------------------------------------------------------
25 $python3 $src_dir/src
/compiler
/nir
/nir_intrinsics_c.py \
26 --outdir $build_dir/src
/compiler
/nir
&
27 #------------------------------------------------------------------------------
28 $python3 $src_dir/src
/compiler
/nir
/nir_intrinsics_indices_h.py \
29 --outdir $build_dir/src
/compiler
/nir
&
34 #===============================================================================
37 $build_dir/src/compiler/spirv/vtn_gather_types.c \
38 $build_dir/src/compiler/spirv/spirv_info.c \
39 $build_dir/src/compiler/nir/nir_constant_expressions.c \
40 $build_dir/src/compiler/nir/nir_opcodes.c \
41 $build_dir/src/compiler/nir/nir_opt_algebraic.c \
42 $build_dir/src/compiler/nir/nir_intrinsics.c \
43 $src_dir/src/compiler/nir/nir.c \
44 $src_dir/src/compiler/nir/nir_builder.c \
45 $src_dir/src/compiler/nir/nir_builtin_builder.c \
46 $src_dir/src/compiler/nir/nir_clone.c \
47 $src_dir/src/compiler/nir/nir_control_flow.c \
48 $src_dir/src/compiler/nir/nir_convert_ycbcr.c \
49 $src_dir/src/compiler/nir/nir_deref.c \
50 $src_dir/src/compiler/nir/nir_divergence_analysis.c \
51 $src_dir/src/compiler/nir/nir_dominance.c \
52 $src_dir/src/compiler/nir/nir_from_ssa.c \
53 $src_dir/src/compiler/nir/nir_gather_info.c \
54 $src_dir/src/compiler/nir/nir_gather_ssa_types.c \
55 $src_dir/src/compiler/nir/nir_gather_xfb_info.c \
56 $src_dir/src/compiler/nir/nir_group_loads.c \
57 $src_dir/src/compiler/nir/nir_gs_count_vertices.c \
58 $src_dir/src/compiler/nir/nir_inline_functions.c \
59 $src_dir/src/compiler/nir/nir_inline_uniforms.c \
60 $src_dir/src/compiler/nir/nir_instr_set.c \
61 $src_dir/src/compiler/nir/nir_linking_helpers.c \
62 $src_dir/src/compiler/nir/nir_liveness.c \
63 $src_dir/src/compiler/nir/nir_loop_analyze.c \
64 $src_dir/src/compiler/nir/nir_lower_alu.c \
65 $src_dir/src/compiler/nir/nir_lower_alu_to_scalar.c \
66 $src_dir/src/compiler/nir/nir_lower_alpha_test.c \
67 $src_dir/src/compiler/nir/nir_lower_amul.c \
68 $src_dir/src/compiler/nir/nir_lower_atomics_to_ssbo.c \
69 $src_dir/src/compiler/nir/nir_lower_bitmap.c \
70 $src_dir/src/compiler/nir/nir_lower_blend.c \
71 $src_dir/src/compiler/nir/nir_lower_bool_to_bitsize.c \
72 $src_dir/src/compiler/nir/nir_lower_bool_to_float.c \
73 $src_dir/src/compiler/nir/nir_lower_bool_to_int32.c \
74 $src_dir/src/compiler/nir/nir_lower_clamp_color_outputs.c \
75 $src_dir/src/compiler/nir/nir_lower_clip.c \
76 $src_dir/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c \
77 $src_dir/src/compiler/nir/nir_lower_clip_disable.c \
78 $src_dir/src/compiler/nir/nir_lower_clip_halfz.c \
79 $src_dir/src/compiler/nir/nir_lower_convert_alu_types.c \
80 $src_dir/src/compiler/nir/nir_lower_discard_if.c \
81 $src_dir/src/compiler/nir/nir_lower_discard_or_demote.c \
82 $src_dir/src/compiler/nir/nir_lower_double_ops.c \
83 $src_dir/src/compiler/nir/nir_lower_drawpixels.c \
84 $src_dir/src/compiler/nir/nir_lower_fb_read.c \
85 $src_dir/src/compiler/nir/nir_lower_flatshade.c \
86 $src_dir/src/compiler/nir/nir_lower_flrp.c \
87 $src_dir/src/compiler/nir/nir_lower_fp16_conv.c \
88 $src_dir/src/compiler/nir/nir_lower_fragcolor.c \
89 $src_dir/src/compiler/nir/nir_lower_fragcoord_wtrans.c \
90 $src_dir/src/compiler/nir/nir_lower_frexp.c \
91 $src_dir/src/compiler/nir/nir_lower_global_vars_to_local.c \
92 $src_dir/src/compiler/nir/nir_lower_goto_ifs.c \
93 $src_dir/src/compiler/nir/nir_lower_gs_intrinsics.c \
94 $src_dir/src/compiler/nir/nir_lower_image.c \
95 $src_dir/src/compiler/nir/nir_lower_input_attachments.c \
96 $src_dir/src/compiler/nir/nir_lower_int_to_float.c \
97 $src_dir/src/compiler/nir/nir_lower_interpolation.c \
98 $src_dir/src/compiler/nir/nir_lower_is_helper_invocation.c \
99 $src_dir/src/compiler/nir/nir_lower_load_const_to_scalar.c \
100 $src_dir/src/compiler/nir/nir_lower_locals_to_regs.c \
101 $src_dir/src/compiler/nir/nir_lower_idiv.c \
102 $src_dir/src/compiler/nir/nir_lower_indirect_derefs.c \
103 $src_dir/src/compiler/nir/nir_lower_int64.c \
104 $src_dir/src/compiler/nir/nir_lower_io.c \
105 $src_dir/src/compiler/nir/nir_lower_io_arrays_to_elements.c \
106 $src_dir/src/compiler/nir/nir_lower_io_to_temporaries.c \
107 $src_dir/src/compiler/nir/nir_lower_io_to_scalar.c \
108 $src_dir/src/compiler/nir/nir_lower_io_to_vector.c \
109 $src_dir/src/compiler/nir/nir_lower_mediump.c \
110 $src_dir/src/compiler/nir/nir_lower_memcpy.c \
111 $src_dir/src/compiler/nir/nir_lower_memory_model.c \
112 $src_dir/src/compiler/nir/nir_lower_multiview.c \
113 $src_dir/src/compiler/nir/nir_lower_non_uniform_access.c \
114 $src_dir/src/compiler/nir/nir_lower_packing.c \
115 $src_dir/src/compiler/nir/nir_lower_passthrough_edgeflags.c \
116 $src_dir/src/compiler/nir/nir_lower_patch_vertices.c \
117 $src_dir/src/compiler/nir/nir_lower_phis_to_scalar.c \
118 $src_dir/src/compiler/nir/nir_lower_pntc_ytransform.c \
119 $src_dir/src/compiler/nir/nir_lower_point_size.c \
120 $src_dir/src/compiler/nir/nir_lower_point_size_mov.c \
121 $src_dir/src/compiler/nir/nir_lower_readonly_images_to_tex.c \
122 $src_dir/src/compiler/nir/nir_lower_regs_to_ssa.c \
123 $src_dir/src/compiler/nir/nir_lower_returns.c \
124 $src_dir/src/compiler/nir/nir_lower_samplers.c \
125 $src_dir/src/compiler/nir/nir_lower_scratch.c \
126 $src_dir/src/compiler/nir/nir_lower_subgroups.c \
127 $src_dir/src/compiler/nir/nir_lower_sysvals_to_varyings.c \
128 $src_dir/src/compiler/nir/nir_lower_system_values.c \
129 $src_dir/src/compiler/nir/nir_lower_tex.c \
130 $src_dir/src/compiler/nir/nir_lower_tex_shadow.c \
131 $src_dir/src/compiler/nir/nir_lower_texcoord_replace.c \
132 $src_dir/src/compiler/nir/nir_lower_to_source_mods.c \
133 $src_dir/src/compiler/nir/nir_lower_two_sided_color.c \
134 $src_dir/src/compiler/nir/nir_lower_ubo_vec4.c \
135 $src_dir/src/compiler/nir/nir_lower_vars_to_ssa.c \
136 $src_dir/src/compiler/nir/nir_lower_var_copies.c \
137 $src_dir/src/compiler/nir/nir_lower_variable_initializers.c \
138 $src_dir/src/compiler/nir/nir_lower_vec_to_movs.c \
139 $src_dir/src/compiler/nir/nir_lower_vec3_to_vec4.c \
140 $src_dir/src/compiler/nir/nir_lower_viewport_transform.c \
141 $src_dir/src/compiler/nir/nir_lower_wpos_center.c \
142 $src_dir/src/compiler/nir/nir_lower_wpos_ytransform.c \
143 $src_dir/src/compiler/nir/nir_lower_wrmasks.c \
144 $src_dir/src/compiler/nir/nir_lower_bit_size.c \
145 $src_dir/src/compiler/nir/nir_lower_uniforms_to_ubo.c \
146 $src_dir/src/compiler/nir/nir_metadata.c \
147 $src_dir/src/compiler/nir/nir_move_vec_src_uses_to_dest.c \
148 $src_dir/src/compiler/nir/nir_normalize_cubemap_coords.c \
149 $src_dir/src/compiler/nir/nir_opt_access.c \
150 $src_dir/src/compiler/nir/nir_opt_barriers.c \
151 $src_dir/src/compiler/nir/nir_opt_combine_stores.c \
152 $src_dir/src/compiler/nir/nir_opt_comparison_pre.c \
153 $src_dir/src/compiler/nir/nir_opt_conditional_discard.c \
154 $src_dir/src/compiler/nir/nir_opt_constant_folding.c \
155 $src_dir/src/compiler/nir/nir_opt_copy_prop_vars.c \
156 $src_dir/src/compiler/nir/nir_opt_copy_propagate.c \
157 $src_dir/src/compiler/nir/nir_opt_cse.c \
158 $src_dir/src/compiler/nir/nir_opt_dce.c \
159 $src_dir/src/compiler/nir/nir_opt_dead_cf.c \
160 $src_dir/src/compiler/nir/nir_opt_dead_write_vars.c \
161 $src_dir/src/compiler/nir/nir_opt_find_array_copies.c \
162 $src_dir/src/compiler/nir/nir_opt_fragdepth.c \
163 $src_dir/src/compiler/nir/nir_opt_gcm.c \
164 $src_dir/src/compiler/nir/nir_opt_idiv_const.c \
165 $src_dir/src/compiler/nir/nir_opt_if.c \
166 $src_dir/src/compiler/nir/nir_opt_intrinsics.c \
167 $src_dir/src/compiler/nir/nir_opt_large_constants.c \
168 $src_dir/src/compiler/nir/nir_opt_load_store_vectorize.c \
169 $src_dir/src/compiler/nir/nir_opt_loop_unroll.c \
170 $src_dir/src/compiler/nir/nir_opt_memcpy.c \
171 $src_dir/src/compiler/nir/nir_opt_move.c \
172 $src_dir/src/compiler/nir/nir_opt_move_discards_to_top.c \
173 $src_dir/src/compiler/nir/nir_opt_offsets.c \
174 $src_dir/src/compiler/nir/nir_opt_peephole_select.c \
175 $src_dir/src/compiler/nir/nir_opt_phi_precision.c \
176 $src_dir/src/compiler/nir/nir_opt_preamble.c \
177 $src_dir/src/compiler/nir/nir_opt_ray_queries.c \
178 $src_dir/src/compiler/nir/nir_opt_rematerialize_compares.c \
179 $src_dir/src/compiler/nir/nir_opt_remove_phis.c \
180 $src_dir/src/compiler/nir/nir_opt_shrink_stores.c \
181 $src_dir/src/compiler/nir/nir_opt_shrink_vectors.c \
182 $src_dir/src/compiler/nir/nir_opt_sink.c \
183 $src_dir/src/compiler/nir/nir_opt_trivial_continues.c \
184 $src_dir/src/compiler/nir/nir_opt_undef.c \
185 $src_dir/src/compiler/nir/nir_opt_uniform_atomics.c \
186 $src_dir/src/compiler/nir/nir_opt_vectorize.c \
187 $src_dir/src/compiler/nir/nir_phi_builder.c \
188 $src_dir/src/compiler/nir/nir_print.c \
189 $src_dir/src/compiler/nir/nir_propagate_invariant.c \
190 $src_dir/src/compiler/nir/nir_range_analysis.c \
191 $src_dir/src/compiler/nir/nir_remove_dead_variables.c \
192 $src_dir/src/compiler/nir/nir_repair_ssa.c \
193 $src_dir/src/compiler/nir/nir_search.c \
194 $src_dir/src/compiler/nir/nir_scale_fdiv.c \
195 $src_dir/src/compiler/nir/nir_schedule.c \
196 $src_dir/src/compiler/nir/nir_serialize.c \
197 $src_dir/src/compiler/nir/nir_split_per_member_structs.c \
198 $src_dir/src/compiler/nir/nir_split_var_copies.c \
199 $src_dir/src/compiler/nir/nir_split_vars.c \
200 $src_dir/src/compiler/nir/nir_sweep.c \
201 $src_dir/src/compiler/nir/nir_to_lcssa.c \
202 $src_dir/src/compiler/nir/nir_validate.c \
203 $src_dir/src/compiler/nir/nir_worklist.c \
204 $src_dir/src/compiler/nir/nir_xfb_info.h \
205 $src_dir/src/compiler/spirv/gl_spirv.c \
206 $src_dir/src/compiler/spirv/spirv_to_nir.c \
207 $src_dir/src/compiler/spirv/vtn_alu.c \
208 $src_dir/src/compiler/spirv/vtn_amd.c \
209 $src_dir/src/compiler/spirv/vtn_cfg.c \
210 $src_dir/src/compiler/spirv/vtn_glsl450.c \
211 $src_dir/src/compiler/spirv/vtn_subgroup.c \
212 $src_dir/src/compiler/spirv/vtn_variables.c \
213 $src_dir/contrib/vtn_opencl.c \
215 #------------------------------------------------------------------------------
217 for f
in $libnir_files
219 libnir_obj_dir
=$
(dirname $f)
220 libnir_obj_dir
=$build_dir/${libnir_obj_dir#*/src/}
221 mkdir
-p $libnir_obj_dir
223 libnir_obj
="$libnir_obj_dir/$(basename $f .c).o"
224 libnir_a
="$libnir_a $libnir_obj"
226 $cco_slib -o $libnir_obj $f \
227 -I$build_dir/src
/compiler
/spirv \
228 -I$build_dir/src
/compiler
/nir \
229 -I$src_dir/src
/gallium
/include \
230 -I$src_dir/src
/compiler
/spirv \
231 -I$src_dir/src
/compiler
/nir \
232 -I$src_dir/src
/compiler \
233 -I$src_dir/src
/mesa \
239 $external_deps_cppflags \
242 $glibc_linux_cppflags \
251 $ar $build_dir/libnir.a
$libnir_a
252 printf "\t<--nir compiler sub-components built\n"