mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-c8c354d9c3a2e79230723f1c8b0571b20d034fee / contrib / compiler_nir.sh
blobf861d9edbfc1772dce385fe997a8f05558302adb
1 printf "\tbuilding nir compiler sub-components-->\n"
2 #===============================================================================
3 mkdir -p $build_dir/src/compiler/nir
4 #------------------------------------------------------------------------------
5 libnir_c_pathnames="\
6 $build_dir/src/compiler/spirv/vtn_gather_types.c \
7 $build_dir/src/compiler/spirv/spirv_info.c \
8 $build_dir/src/compiler/nir/nir_constant_expressions.c \
9 $build_dir/src/compiler/nir/nir_opcodes.c \
10 $build_dir/src/compiler/nir/nir_opt_algebraic.c \
11 $build_dir/src/compiler/nir/nir_intrinsics.c \
12 $build_dir/src/compiler/nir/nir.c \
13 $src_dir/src/compiler/nir/nir_builder.c \
14 $src_dir/src/compiler/nir/nir_builtin_builder.c \
15 $src_dir/src/compiler/nir/nir_clone.c \
16 $src_dir/src/compiler/nir/nir_control_flow.c \
17 $src_dir/src/compiler/nir/nir_deref.c \
18 $src_dir/src/compiler/nir/nir_divergence_analysis.c \
19 $src_dir/src/compiler/nir/nir_dominance.c \
20 $src_dir/src/compiler/nir/nir_format_convert.c \
21 $src_dir/src/compiler/nir/nir_from_ssa.c \
22 $src_dir/src/compiler/nir/nir_gather_info.c \
23 $src_dir/src/compiler/nir/nir_gather_types.c \
24 $src_dir/src/compiler/nir/nir_gather_xfb_info.c \
25 $src_dir/src/compiler/nir/nir_group_loads.c \
26 $src_dir/src/compiler/nir/nir_gs_count_vertices.c \
27 $src_dir/src/compiler/nir/nir_functions.c \
28 $src_dir/src/compiler/nir/nir_inline_uniforms.c \
29 $src_dir/src/compiler/nir/nir_instr_set.c \
30 $src_dir/src/compiler/nir/nir_legacy.c \
31 $src_dir/src/compiler/nir/nir_linking_helpers.c \
32 $src_dir/src/compiler/nir/nir_liveness.c \
33 $src_dir/src/compiler/nir/nir_loop_analyze.c \
34 $src_dir/src/compiler/nir/nir_lower_alu.c \
35 $src_dir/src/compiler/nir/nir_lower_alu_width.c \
36 $src_dir/src/compiler/nir/nir_lower_alpha_test.c \
37 $src_dir/src/compiler/nir/nir_lower_amul.c \
38 $src_dir/src/compiler/nir/nir_lower_array_deref_of_vec.c \
39 $src_dir/src/compiler/nir/nir_lower_atomics_to_ssbo.c \
40 $src_dir/src/compiler/nir/nir_lower_bitmap.c \
41 $src_dir/src/compiler/nir/nir_lower_blend.c \
42 $src_dir/src/compiler/nir/nir_lower_bool_to_bitsize.c \
43 $src_dir/src/compiler/nir/nir_lower_bool_to_float.c \
44 $src_dir/src/compiler/nir/nir_lower_bool_to_int32.c \
45 $src_dir/src/compiler/nir/nir_lower_cl_images.c \
46 $src_dir/src/compiler/nir/nir_lower_clamp_color_outputs.c \
47 $src_dir/src/compiler/nir/nir_lower_clip.c \
48 $src_dir/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c \
49 $src_dir/src/compiler/nir/nir_lower_clip_disable.c \
50 $src_dir/src/compiler/nir/nir_lower_clip_halfz.c \
51 $src_dir/src/compiler/nir/nir_lower_const_arrays_to_uniforms.c \
52 $src_dir/src/compiler/nir/nir_lower_continue_constructs.c \
53 $src_dir/src/compiler/nir/nir_lower_convert_alu_types.c \
54 $src_dir/src/compiler/nir/nir_lower_discard_if.c \
55 $src_dir/src/compiler/nir/nir_lower_double_ops.c \
56 $src_dir/src/compiler/nir/nir_lower_drawpixels.c \
57 $src_dir/src/compiler/nir/nir_lower_fb_read.c \
58 $src_dir/src/compiler/nir/nir_lower_flatshade.c \
59 $src_dir/src/compiler/nir/nir_lower_flrp.c \
60 $src_dir/src/compiler/nir/nir_lower_fp16_conv.c \
61 $src_dir/src/compiler/nir/nir_lower_frag_coord_to_pixel_coord.c \
62 $src_dir/src/compiler/nir/nir_lower_fragcolor.c \
63 $src_dir/src/compiler/nir/nir_lower_fragcoord_wtrans.c \
64 $src_dir/src/compiler/nir/nir_lower_frexp.c \
65 $src_dir/src/compiler/nir/nir_lower_global_vars_to_local.c \
66 $src_dir/src/compiler/nir/nir_lower_goto_ifs.c \
67 $src_dir/src/compiler/nir/nir_lower_gs_intrinsics.c \
68 $src_dir/src/compiler/nir/nir_lower_helper_writes.c \
69 $src_dir/src/compiler/nir/nir_lower_image.c \
70 $src_dir/src/compiler/nir/nir_lower_image_atomics_to_global.c \
71 $src_dir/src/compiler/nir/nir_lower_input_attachments.c \
72 $src_dir/src/compiler/nir/nir_lower_int_to_float.c \
73 $src_dir/src/compiler/nir/nir_lower_interpolation.c \
74 $src_dir/src/compiler/nir/nir_lower_is_helper_invocation.c \
75 $src_dir/src/compiler/nir/nir_lower_load_const_to_scalar.c \
76 $src_dir/src/compiler/nir/nir_lower_locals_to_regs.c \
77 $src_dir/src/compiler/nir/nir_lower_idiv.c \
78 $src_dir/src/compiler/nir/nir_lower_indirect_derefs.c \
79 $src_dir/src/compiler/nir/nir_lower_int64.c \
80 $src_dir/src/compiler/nir/nir_lower_io.c \
81 $src_dir/src/compiler/nir/nir_lower_io_arrays_to_elements.c \
82 $src_dir/src/compiler/nir/nir_lower_io_to_temporaries.c \
83 $src_dir/src/compiler/nir/nir_lower_io_to_scalar.c \
84 $src_dir/src/compiler/nir/nir_lower_io_to_vector.c \
85 $src_dir/src/compiler/nir/nir_lower_terminate_to_demote.c \
86 $src_dir/src/compiler/nir/nir_lower_mediump.c \
87 $src_dir/src/compiler/nir/nir_lower_mem_access_bit_sizes.c \
88 $src_dir/src/compiler/nir/nir_lower_memcpy.c \
89 $src_dir/src/compiler/nir/nir_lower_memory_model.c \
90 $src_dir/src/compiler/nir/nir_lower_multiview.c \
91 $src_dir/src/compiler/nir/nir_lower_non_uniform_access.c \
92 $src_dir/src/compiler/nir/nir_lower_packing.c \
93 $src_dir/src/compiler/nir/nir_lower_passthrough_edgeflags.c \
94 $src_dir/src/compiler/nir/nir_lower_patch_vertices.c \
95 $src_dir/src/compiler/nir/nir_lower_phis_to_scalar.c \
96 $src_dir/src/compiler/nir/nir_lower_pntc_ytransform.c \
97 $src_dir/src/compiler/nir/nir_lower_point_size.c \
98 $src_dir/src/compiler/nir/nir_lower_point_size_mov.c \
99 $src_dir/src/compiler/nir/nir_lower_point_smooth.c \
100 $src_dir/src/compiler/nir/nir_lower_poly_line_smooth.c \
101 $src_dir/src/compiler/nir/nir_lower_readonly_images_to_tex.c \
102 $src_dir/src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c \
103 $src_dir/src/compiler/nir/nir_lower_returns.c \
104 $src_dir/src/compiler/nir/nir_lower_robust_access.c \
105 $src_dir/src/compiler/nir/nir_lower_samplers.c \
106 $src_dir/src/compiler/nir/nir_lower_scratch.c \
107 $src_dir/src/compiler/nir/nir_lower_single_sampled.c \
108 $src_dir/src/compiler/nir/nir_lower_subgroups.c \
109 $src_dir/src/compiler/nir/nir_lower_sysvals_to_varyings.c \
110 $src_dir/src/compiler/nir/nir_lower_system_values.c \
111 $src_dir/src/compiler/nir/nir_lower_task_shader.c \
112 $src_dir/src/compiler/nir/nir_lower_tess_coord_z.c \
113 $src_dir/src/compiler/nir/nir_lower_tex.c \
114 $src_dir/src/compiler/nir/nir_lower_tex_shadow.c \
115 $src_dir/src/compiler/nir/nir_lower_texcoord_replace.c \
116 $src_dir/src/compiler/nir/nir_lower_texcoord_replace_late.c \
117 $src_dir/src/compiler/nir/nir_lower_two_sided_color.c \
118 $src_dir/src/compiler/nir/nir_lower_ubo_vec4.c \
119 $src_dir/src/compiler/nir/nir_lower_vars_to_ssa.c \
120 $src_dir/src/compiler/nir/nir_lower_var_copies.c \
121 $src_dir/src/compiler/nir/nir_lower_variable_initializers.c \
122 $src_dir/src/compiler/nir/nir_lower_vec_to_regs.c \
123 $src_dir/src/compiler/nir/nir_lower_vec3_to_vec4.c \
124 $src_dir/src/compiler/nir/nir_lower_view_index_to_device_index.c \
125 $src_dir/src/compiler/nir/nir_lower_viewport_transform.c \
126 $src_dir/src/compiler/nir/nir_lower_wpos_center.c \
127 $src_dir/src/compiler/nir/nir_lower_wpos_ytransform.c \
128 $src_dir/src/compiler/nir/nir_lower_wrmasks.c \
129 $src_dir/src/compiler/nir/nir_lower_bit_size.c \
130 $src_dir/src/compiler/nir/nir_lower_uniforms_to_ubo.c \
131 $src_dir/src/compiler/nir/nir_metadata.c \
132 $src_dir/src/compiler/nir/nir_mod_analysis.c \
133 $src_dir/src/compiler/nir/nir_move_vec_src_uses_to_dest.c \
134 $src_dir/src/compiler/nir/nir_normalize_cubemap_coords.c \
135 $src_dir/src/compiler/nir/nir_opt_access.c \
136 $src_dir/src/compiler/nir/nir_opt_barriers.c \
137 $src_dir/src/compiler/nir/nir_opt_combine_stores.c \
138 $src_dir/src/compiler/nir/nir_opt_comparison_pre.c \
139 $src_dir/src/compiler/nir/nir_opt_conditional_discard.c \
140 $src_dir/src/compiler/nir/nir_opt_constant_folding.c \
141 $src_dir/src/compiler/nir/nir_opt_copy_prop_vars.c \
142 $src_dir/src/compiler/nir/nir_opt_copy_propagate.c \
143 $src_dir/src/compiler/nir/nir_opt_cse.c \
144 $src_dir/src/compiler/nir/nir_opt_dce.c \
145 $src_dir/src/compiler/nir/nir_opt_dead_cf.c \
146 $src_dir/src/compiler/nir/nir_opt_dead_write_vars.c \
147 $src_dir/src/compiler/nir/nir_opt_find_array_copies.c \
148 $src_dir/src/compiler/nir/nir_opt_fragdepth.c \
149 $src_dir/src/compiler/nir/nir_opt_gcm.c \
150 $src_dir/src/compiler/nir/nir_opt_generate_bfi.c \
151 $src_dir/src/compiler/nir/nir_opt_idiv_const.c \
152 $src_dir/src/compiler/nir/nir_opt_if.c \
153 $src_dir/src/compiler/nir/nir_opt_intrinsics.c \
154 $src_dir/src/compiler/nir/nir_opt_large_constants.c \
155 $src_dir/src/compiler/nir/nir_opt_licm.c \
156 $src_dir/src/compiler/nir/nir_opt_load_store_vectorize.c \
157 $src_dir/src/compiler/nir/nir_opt_loop.c \
158 $src_dir/src/compiler/nir/nir_opt_loop_unroll.c \
159 $src_dir/src/compiler/nir/nir_opt_memcpy.c \
160 $src_dir/src/compiler/nir/nir_opt_move.c \
161 $src_dir/src/compiler/nir/nir_opt_move_discards_to_top.c \
162 $src_dir/src/compiler/nir/nir_opt_mqsad.c \
163 $src_dir/src/compiler/nir/nir_opt_non_uniform_access.c \
164 $src_dir/src/compiler/nir/nir_opt_offsets.c \
165 $src_dir/src/compiler/nir/nir_opt_peephole_select.c \
166 $src_dir/src/compiler/nir/nir_opt_phi_precision.c \
167 $src_dir/src/compiler/nir/nir_opt_preamble.c \
168 $src_dir/src/compiler/nir/nir_opt_ray_queries.c \
169 $src_dir/src/compiler/nir/nir_opt_reassociate_bfi.c \
170 $src_dir/src/compiler/nir/nir_opt_rematerialize_compares.c \
171 $src_dir/src/compiler/nir/nir_opt_remove_phis.c \
172 $src_dir/src/compiler/nir/nir_opt_shrink_stores.c \
173 $src_dir/src/compiler/nir/nir_opt_shrink_vectors.c \
174 $src_dir/src/compiler/nir/nir_opt_sink.c \
175 $src_dir/src/compiler/nir/nir_opt_undef.c \
176 $src_dir/src/compiler/nir/nir_opt_uniform_atomics.c \
177 $src_dir/src/compiler/nir/nir_opt_varyings.c \
178 $src_dir/src/compiler/nir/nir_opt_vectorize.c \
179 $src_dir/src/compiler/nir/nir_opt_vectorize_io.c \
180 $src_dir/src/compiler/nir/nir_passthrough_gs.c \
181 $src_dir/src/compiler/nir/nir_passthrough_tcs.c \
182 $src_dir/src/compiler/nir/nir_phi_builder.c \
183 $src_dir/src/compiler/nir/nir_print.c \
184 $src_dir/src/compiler/nir/nir_propagate_invariant.c \
185 $src_dir/src/compiler/nir/nir_range_analysis.c \
186 $src_dir/src/compiler/nir/nir_remove_dead_variables.c \
187 $src_dir/src/compiler/nir/nir_remove_tex_shadow.c \
188 $src_dir/src/compiler/nir/nir_repair_ssa.c \
189 $src_dir/src/compiler/nir/nir_search.c \
190 $src_dir/src/compiler/nir/nir_scale_fdiv.c \
191 $src_dir/src/compiler/nir/nir_schedule.c \
192 $src_dir/src/compiler/nir/nir_serialize.c \
193 $src_dir/src/compiler/nir/nir_split_64bit_vec3_and_vec4.c \
194 $src_dir/src/compiler/nir/nir_split_per_member_structs.c \
195 $src_dir/src/compiler/nir/nir_split_var_copies.c \
196 $src_dir/src/compiler/nir/nir_split_vars.c \
197 $src_dir/src/compiler/nir/nir_sweep.c \
198 $src_dir/src/compiler/nir/nir_to_lcssa.c \
199 $src_dir/src/compiler/nir/nir_trivialize_registers.c \
200 $src_dir/src/compiler/nir/nir_use_dominance.c \
201 $src_dir/src/compiler/nir/nir_validate.c \
202 $src_dir/src/compiler/nir/nir_worklist.c \
203 $src_dir/src/compiler/nir/nir_xfb_info.h \
204 $src_dir/src/compiler/spirv/gl_spirv.c \
205 $src_dir/src/compiler/spirv/spirv_to_nir.c \
206 $src_dir/src/compiler/spirv/vtn_alu.c \
207 $src_dir/src/compiler/spirv/vtn_amd.c \
208 $src_dir/src/compiler/spirv/vtn_cfg.c \
209 $src_dir/src/compiler/spirv/vtn_debug.c \
210 $src_dir/src/compiler/spirv/vtn_glsl450.c \
211 $src_dir/src/compiler/spirv/vtn_structured_cfg.c \
212 $src_dir/src/compiler/spirv/vtn_subgroup.c \
213 $src_dir/src/compiler/spirv/vtn_variables.c \
214 $src_dir/src/compiler/spirv/vtn_cmat.c \
215 $src_dir/contrib/vtn_opencl.c \
217 #-------------------------------------------------------------------------------
218 for src_pathname in $libnir_c_pathnames
220 cpp_filename=$(basename $src_pathname .c).cpp.c
221 printf "CPP $src_pathname --> $build_dir/src/compiler/nir/$cpp_filename\n"
222 $cpp $src_pathname -o $build_dir/src/compiler/nir/$cpp_filename \
223 -I$cc_internal_fixed_incdir \
224 -I$cc_internal_incdir \
225 -I$linux_incdir \
226 -I$syslib_incdir \
228 -I$build_dir/src/gallium/auxiliary \
229 -I$src_dir/src/gallium/auxiliary \
230 -I$build_dir/src/gallium/include \
231 -I$src_dir/src/gallium/include \
232 -I$build_dir/src/compiler/spirv \
233 -I$src_dir/src/compiler/spirv \
234 -I$build_dir/src/compiler/nir \
235 -I$src_dir/src/compiler/nir \
236 -I$build_dir/src/compiler \
237 -I$src_dir/src/compiler \
238 -I$build_dir/src/mesa \
239 -I$src_dir/src/mesa \
240 -I$build_dir/src \
241 -I$src_dir/src \
242 -I$build_dir/include \
243 -I$src_dir/include \
245 $syslib_cpp_flags_defs \
246 $linux_cpp_flags_defs \
247 $cc_builtins_cpp_flags_defs \
248 $cc_attributes_cpp_flags_defs \
249 $mesa_cpp_flags_defs \
251 $external_deps_cpp_flags &
252 done
253 #-------------------------------------------------------------------------------
254 wait
255 #------------------------------------------------------------------------------
256 for src_pathname in $libnir_c_pathnames
258 cpp_filename=$(basename $src_pathname .c).cpp.c
259 asm_filename=$(basename $src_pathname .c).cpp.c.s
260 printf "CC_S $build_dir/src/compiler/nir/$cpp_filename --> $build_dir/src/compiler/nir/$asm_filename\n"
261 $cc_s $build_dir/src/compiler/nir/$cpp_filename -o $build_dir/src/compiler/nir/$asm_filename &
262 done
263 #------------------------------------------------------------------------------
264 wait
265 #------------------------------------------------------------------------------
267 for src_pathname in $libnir_c_pathnames
269 asm_filename=$(basename $src_pathname .c).cpp.c.s
270 o_filename=$(basename $src_pathname .c).cpp.c.s.o
271 os="$os $build_dir/src/compiler/nir/$o_filename"
272 printf "AS $build_dir/src/compiler/nir/$asm_filename --> $build_dir/src/compiler/nir/$o_filename\n"
273 $as $build_dir/src/compiler/nir/$asm_filename -o $build_dir/src/compiler/nir/$o_filename &
274 done
275 #------------------------------------------------------------------------------
276 wait
277 #------------------------------------------------------------------------------
278 printf "AR RCS $build_dir/libnir.a $os\n"
279 $ar_rcs $build_dir/libnir.a $os &
280 #===============================================================================
281 printf "\t<--nir compiler sub-components built\n"