Gfx stack update
[nyanlinux.git] / builders / mesa-gl-amd-sh-ca92a10800bcb09749758ea1664dc0675955ffa0 / contrib / compiler_nir.sh
blobe6af972deeee7a7d4020f7b93e0fecfcc609730c
1 printf "\tbuilding nir compiler sub-components-->\n"
2 mkdir -p $build_dir/src/compiler/nir
4 #===============================================================================
6 libnir_files="\
7 $build_dir/src/compiler/spirv/vtn_gather_types.c \
8 $build_dir/src/compiler/spirv/spirv_info.c \
9 $build_dir/src/compiler/nir/nir_constant_expressions.c \
10 $build_dir/src/compiler/nir/nir_opcodes.c \
11 $build_dir/src/compiler/nir/nir_opt_algebraic.c \
12 $build_dir/src/compiler/nir/nir_intrinsics.c \
13 $build_dir/src/compiler/nir/nir.c \
14 $src_dir/src/compiler/nir/nir_builder.c \
15 $src_dir/src/compiler/nir/nir_builtin_builder.c \
16 $src_dir/src/compiler/nir/nir_clone.c \
17 $src_dir/src/compiler/nir/nir_control_flow.c \
18 $src_dir/src/compiler/nir/nir_deref.c \
19 $src_dir/src/compiler/nir/nir_divergence_analysis.c \
20 $src_dir/src/compiler/nir/nir_dominance.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_atomics_to_ssbo.c \
39 $src_dir/src/compiler/nir/nir_lower_bitmap.c \
40 $src_dir/src/compiler/nir/nir_lower_blend.c \
41 $src_dir/src/compiler/nir/nir_lower_bool_to_bitsize.c \
42 $src_dir/src/compiler/nir/nir_lower_bool_to_float.c \
43 $src_dir/src/compiler/nir/nir_lower_bool_to_int32.c \
44 $src_dir/src/compiler/nir/nir_lower_cl_images.c \
45 $src_dir/src/compiler/nir/nir_lower_clamp_color_outputs.c \
46 $src_dir/src/compiler/nir/nir_lower_clip.c \
47 $src_dir/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c \
48 $src_dir/src/compiler/nir/nir_lower_clip_disable.c \
49 $src_dir/src/compiler/nir/nir_lower_clip_halfz.c \
50 $src_dir/src/compiler/nir/nir_lower_const_arrays_to_uniforms.c \
51 $src_dir/src/compiler/nir/nir_lower_continue_constructs.c \
52 $src_dir/src/compiler/nir/nir_lower_convert_alu_types.c \
53 $src_dir/src/compiler/nir/nir_lower_discard_if.c \
54 $src_dir/src/compiler/nir/nir_lower_discard_or_demote.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_mediump.c \
86 $src_dir/src/compiler/nir/nir_lower_mem_access_bit_sizes.c \
87 $src_dir/src/compiler/nir/nir_lower_memcpy.c \
88 $src_dir/src/compiler/nir/nir_lower_memory_model.c \
89 $src_dir/src/compiler/nir/nir_lower_multiview.c \
90 $src_dir/src/compiler/nir/nir_lower_non_uniform_access.c \
91 $src_dir/src/compiler/nir/nir_lower_packing.c \
92 $src_dir/src/compiler/nir/nir_lower_passthrough_edgeflags.c \
93 $src_dir/src/compiler/nir/nir_lower_patch_vertices.c \
94 $src_dir/src/compiler/nir/nir_lower_phis_to_scalar.c \
95 $src_dir/src/compiler/nir/nir_lower_pntc_ytransform.c \
96 $src_dir/src/compiler/nir/nir_lower_point_size.c \
97 $src_dir/src/compiler/nir/nir_lower_point_size_mov.c \
98 $src_dir/src/compiler/nir/nir_lower_point_smooth.c \
99 $src_dir/src/compiler/nir/nir_lower_poly_line_smooth.c \
100 $src_dir/src/compiler/nir/nir_lower_readonly_images_to_tex.c \
101 $src_dir/src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c \
102 $src_dir/src/compiler/nir/nir_lower_returns.c \
103 $src_dir/src/compiler/nir/nir_lower_robust_access.c \
104 $src_dir/src/compiler/nir/nir_lower_samplers.c \
105 $src_dir/src/compiler/nir/nir_lower_scratch.c \
106 $src_dir/src/compiler/nir/nir_lower_single_sampled.c \
107 $src_dir/src/compiler/nir/nir_lower_subgroups.c \
108 $src_dir/src/compiler/nir/nir_lower_sysvals_to_varyings.c \
109 $src_dir/src/compiler/nir/nir_lower_system_values.c \
110 $src_dir/src/compiler/nir/nir_lower_task_shader.c \
111 $src_dir/src/compiler/nir/nir_lower_tess_coord_z.c \
112 $src_dir/src/compiler/nir/nir_lower_tex.c \
113 $src_dir/src/compiler/nir/nir_lower_tex_shadow.c \
114 $src_dir/src/compiler/nir/nir_lower_texcoord_replace.c \
115 $src_dir/src/compiler/nir/nir_lower_texcoord_replace_late.c \
116 $src_dir/src/compiler/nir/nir_lower_two_sided_color.c \
117 $src_dir/src/compiler/nir/nir_lower_ubo_vec4.c \
118 $src_dir/src/compiler/nir/nir_lower_vars_to_ssa.c \
119 $src_dir/src/compiler/nir/nir_lower_var_copies.c \
120 $src_dir/src/compiler/nir/nir_lower_variable_initializers.c \
121 $src_dir/src/compiler/nir/nir_lower_vec_to_regs.c \
122 $src_dir/src/compiler/nir/nir_lower_vec3_to_vec4.c \
123 $src_dir/src/compiler/nir/nir_lower_viewport_transform.c \
124 $src_dir/src/compiler/nir/nir_lower_wpos_center.c \
125 $src_dir/src/compiler/nir/nir_lower_wpos_ytransform.c \
126 $src_dir/src/compiler/nir/nir_lower_wrmasks.c \
127 $src_dir/src/compiler/nir/nir_lower_bit_size.c \
128 $src_dir/src/compiler/nir/nir_lower_uniforms_to_ubo.c \
129 $src_dir/src/compiler/nir/nir_metadata.c \
130 $src_dir/src/compiler/nir/nir_mod_analysis.c \
131 $src_dir/src/compiler/nir/nir_move_vec_src_uses_to_dest.c \
132 $src_dir/src/compiler/nir/nir_normalize_cubemap_coords.c \
133 $src_dir/src/compiler/nir/nir_opt_access.c \
134 $src_dir/src/compiler/nir/nir_opt_barriers.c \
135 $src_dir/src/compiler/nir/nir_opt_combine_stores.c \
136 $src_dir/src/compiler/nir/nir_opt_comparison_pre.c \
137 $src_dir/src/compiler/nir/nir_opt_conditional_discard.c \
138 $src_dir/src/compiler/nir/nir_opt_constant_folding.c \
139 $src_dir/src/compiler/nir/nir_opt_copy_prop_vars.c \
140 $src_dir/src/compiler/nir/nir_opt_copy_propagate.c \
141 $src_dir/src/compiler/nir/nir_opt_cse.c \
142 $src_dir/src/compiler/nir/nir_opt_dce.c \
143 $src_dir/src/compiler/nir/nir_opt_dead_cf.c \
144 $src_dir/src/compiler/nir/nir_opt_dead_write_vars.c \
145 $src_dir/src/compiler/nir/nir_opt_find_array_copies.c \
146 $src_dir/src/compiler/nir/nir_opt_fragdepth.c \
147 $src_dir/src/compiler/nir/nir_opt_gcm.c \
148 $src_dir/src/compiler/nir/nir_opt_idiv_const.c \
149 $src_dir/src/compiler/nir/nir_opt_if.c \
150 $src_dir/src/compiler/nir/nir_opt_intrinsics.c \
151 $src_dir/src/compiler/nir/nir_opt_large_constants.c \
152 $src_dir/src/compiler/nir/nir_opt_load_store_vectorize.c \
153 $src_dir/src/compiler/nir/nir_opt_loop_unroll.c \
154 $src_dir/src/compiler/nir/nir_opt_memcpy.c \
155 $src_dir/src/compiler/nir/nir_opt_move.c \
156 $src_dir/src/compiler/nir/nir_opt_move_discards_to_top.c \
157 $src_dir/src/compiler/nir/nir_opt_non_uniform_access.c \
158 $src_dir/src/compiler/nir/nir_opt_offsets.c \
159 $src_dir/src/compiler/nir/nir_opt_peephole_select.c \
160 $src_dir/src/compiler/nir/nir_opt_phi_precision.c \
161 $src_dir/src/compiler/nir/nir_opt_preamble.c \
162 $src_dir/src/compiler/nir/nir_opt_ray_queries.c \
163 $src_dir/src/compiler/nir/nir_opt_reassociate_bfi.c \
164 $src_dir/src/compiler/nir/nir_opt_rematerialize_compares.c \
165 $src_dir/src/compiler/nir/nir_opt_remove_phis.c \
166 $src_dir/src/compiler/nir/nir_opt_reuse_constants.c \
167 $src_dir/src/compiler/nir/nir_opt_shrink_stores.c \
168 $src_dir/src/compiler/nir/nir_opt_shrink_vectors.c \
169 $src_dir/src/compiler/nir/nir_opt_sink.c \
170 $src_dir/src/compiler/nir/nir_opt_trivial_continues.c \
171 $src_dir/src/compiler/nir/nir_opt_undef.c \
172 $src_dir/src/compiler/nir/nir_opt_uniform_atomics.c \
173 $src_dir/src/compiler/nir/nir_opt_vectorize.c \
174 $src_dir/src/compiler/nir/nir_passthrough_gs.c \
175 $src_dir/src/compiler/nir/nir_passthrough_tcs.c \
176 $src_dir/src/compiler/nir/nir_phi_builder.c \
177 $src_dir/src/compiler/nir/nir_print.c \
178 $src_dir/src/compiler/nir/nir_propagate_invariant.c \
179 $src_dir/src/compiler/nir/nir_range_analysis.c \
180 $src_dir/src/compiler/nir/nir_remove_dead_variables.c \
181 $src_dir/src/compiler/nir/nir_remove_tex_shadow.c \
182 $src_dir/src/compiler/nir/nir_repair_ssa.c \
183 $src_dir/src/compiler/nir/nir_search.c \
184 $src_dir/src/compiler/nir/nir_scale_fdiv.c \
185 $src_dir/src/compiler/nir/nir_schedule.c \
186 $src_dir/src/compiler/nir/nir_serialize.c \
187 $src_dir/src/compiler/nir/nir_split_64bit_vec3_and_vec4.c \
188 $src_dir/src/compiler/nir/nir_split_per_member_structs.c \
189 $src_dir/src/compiler/nir/nir_split_var_copies.c \
190 $src_dir/src/compiler/nir/nir_split_vars.c \
191 $src_dir/src/compiler/nir/nir_sweep.c \
192 $src_dir/src/compiler/nir/nir_to_lcssa.c \
193 $src_dir/src/compiler/nir/nir_trivialize_registers.c \
194 $src_dir/src/compiler/nir/nir_validate.c \
195 $src_dir/src/compiler/nir/nir_worklist.c \
196 $src_dir/src/compiler/nir/nir_xfb_info.h \
197 $src_dir/src/compiler/spirv/gl_spirv.c \
198 $src_dir/src/compiler/spirv/spirv_to_nir.c \
199 $src_dir/src/compiler/spirv/vtn_alu.c \
200 $src_dir/src/compiler/spirv/vtn_amd.c \
201 $src_dir/src/compiler/spirv/vtn_cfg.c \
202 $src_dir/src/compiler/spirv/vtn_glsl450.c \
203 $src_dir/src/compiler/spirv/vtn_structured_cfg.c \
204 $src_dir/src/compiler/spirv/vtn_subgroup.c \
205 $src_dir/src/compiler/spirv/vtn_variables.c \
206 $src_dir/src/compiler/spirv/vtn_cmat.c \
207 $src_dir/contrib/vtn_opencl.c \
209 #------------------------------------------------------------------------------
211 for f in $libnir_files
213 libnir_obj_dir=$(dirname $f)
214 libnir_obj_dir=$build_dir/${libnir_obj_dir#*/src/}
215 mkdir -p $libnir_obj_dir
217 libnir_obj="$libnir_obj_dir/$(basename $f .c).o"
218 libnir_a="$libnir_a $libnir_obj"
220 $cco_slib -o $libnir_obj $f \
221 -I$src_dir/src/gallium/auxiliary \
222 -I$src_dir/src/gallium/include \
223 -I$build_dir/src/compiler/spirv \
224 -I$src_dir/src/compiler/spirv \
225 -I$build_dir/src/compiler/nir \
226 -I$src_dir/src/compiler/nir \
227 -I$build_dir/src/compiler \
228 -I$src_dir/src/compiler \
229 -I$src_dir/src/mesa \
230 -I$src_dir/src \
231 -I$src_dir/include \
233 $mesa_cppflags \
235 $external_deps_cppflags \
237 $glibc_cppflags \
238 $glibc_linux_cppflags \
239 $linux_cppflags \
240 $gcc_cppflags \
242 $cflags_opt &
243 done
245 wait
247 $ar $build_dir/libnir.a $libnir_a
248 printf "\t<--nir compiler sub-components built\n"