mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-c8c354d9c3a2e79230723f1c8b0571b20d034fee / contrib / gallium_drivers.sh
bloba8c63b26991cf705c5a8055616e5f38e123766b1
1 printf "\tbuilding drivers sub-components-->\n"
2 #===============================================================================
3 mkdir -p $build_dir/src/gallium/drivers/radeonsi
4 #-------------------------------------------------------------------------------
5 libradeonsi_c_pathnames="\
6 $build_dir/src/gallium/drivers/radeonsi/gfx10_format_table.c \
7 $src_dir/src/gallium/drivers/radeonsi/gfx11_query.c \
8 $src_dir/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c \
10 $src_dir/src/gallium/drivers/radeonsi/si_barrier.c \
11 $src_dir/src/gallium/drivers/radeonsi/si_blit.c \
12 $src_dir/src/gallium/drivers/radeonsi/si_buffer.c \
13 $src_dir/src/gallium/drivers/radeonsi/si_clear.c \
14 $src_dir/src/gallium/drivers/radeonsi/si_compute.c \
15 $src_dir/src/gallium/drivers/radeonsi/si_compute_blit.c \
16 $src_dir/src/gallium/drivers/radeonsi/si_cp_dma.c \
17 $src_dir/src/gallium/drivers/radeonsi/si_cp_reg_shadowing.c \
18 $src_dir/src/gallium/drivers/radeonsi/si_cp_utils.c \
19 $src_dir/src/gallium/drivers/radeonsi/si_debug.c \
20 $src_dir/src/gallium/drivers/radeonsi/si_descriptors.c \
21 $src_dir/src/gallium/drivers/radeonsi/si_sdma_copy_image.c \
22 $src_dir/src/gallium/drivers/radeonsi/si_fence.c \
23 $src_dir/src/gallium/drivers/radeonsi/si_get.c \
24 $src_dir/src/gallium/drivers/radeonsi/si_gfx_cs.c \
25 $src_dir/src/gallium/drivers/radeonsi/si_gpu_load.c \
26 $src_dir/src/gallium/drivers/radeonsi/si_nir_lower_abi.c \
27 $src_dir/src/gallium/drivers/radeonsi/si_nir_lower_resource.c \
28 $src_dir/src/gallium/drivers/radeonsi/si_nir_lower_vs_inputs.c \
29 $src_dir/src/gallium/drivers/radeonsi/si_nir_optim.c \
30 $src_dir/src/gallium/drivers/radeonsi/si_perfcounter.c \
31 $build_dir/src/gallium/drivers/radeonsi/si_pipe.c \
32 $src_dir/src/gallium/drivers/radeonsi/si_pm4.c \
33 $src_dir/src/gallium/drivers/radeonsi/si_query.c \
34 $src_dir/src/gallium/drivers/radeonsi/si_shader.c \
35 $src_dir/src/gallium/drivers/radeonsi/si_shader_aco.c \
36 $src_dir/src/gallium/drivers/radeonsi/si_shader_info.c \
37 $src_dir/src/gallium/drivers/radeonsi/si_shaderlib_nir.c \
38 $src_dir/src/gallium/drivers/radeonsi/si_shader_nir.c \
39 $src_dir/src/gallium/drivers/radeonsi/si_sqtt.c \
40 $src_dir/src/gallium/drivers/radeonsi/si_state.c \
41 $src_dir/src/gallium/drivers/radeonsi/si_state_binning.c \
42 $src_dir/src/gallium/drivers/radeonsi/si_state_msaa.c \
43 $src_dir/src/gallium/drivers/radeonsi/si_state_streamout.c \
44 $src_dir/src/gallium/drivers/radeonsi/si_state_viewport.c \
45 $src_dir/src/gallium/drivers/radeonsi/si_test_blit_perf.c \
46 $src_dir/src/gallium/drivers/radeonsi/si_test_dma_perf.c \
47 $src_dir/src/gallium/drivers/radeonsi/si_test_image_copy_region.c \
48 $src_dir/src/gallium/drivers/radeonsi/si_texture.c \
49 $build_dir/src/gallium/drivers/radeonsi/si_uvd.c \
51 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd.c \
52 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn.c \
53 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_1_2.c \
54 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_2_0.c \
55 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_3_0.c \
56 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_4_0.c \
57 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_5_0.c \
58 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc.c \
59 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_dec_jpeg.c \
60 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_dec.c \
61 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd_enc_1_1.c \
62 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd_enc.c \
63 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_40_2_2.c \
64 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_50.c \
65 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_52.c \
66 $src_dir/src/gallium/drivers/radeonsi/radeon_vce.c \
67 $src_dir/src/gallium/drivers/radeonsi/radeon_video.c \
69 # some c++ diarrhea did slip in
70 libradeonsi_cxx_pathnames="\
71 $src_dir/src/gallium/drivers/radeonsi/si_state_shaders.cpp \
73 #-------------------------------------------------------------------------------
74 for src_pathname in $libradeonsi_c_pathnames
76 cpp_filename=$(basename $src_pathname .c).cpp.c
77 printf "CPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cpp_filename\n"
78 $cpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cpp_filename \
79 -I$cc_internal_fixed_incdir \
80 -I$cc_internal_incdir \
81 -I$linux_incdir \
82 -I$syslib_incdir \
84 -I$build_dir/src/util \
85 -I$src_dir/src/util \
86 -I$build_dir/src/amd/compiler \
87 -I$src_dir/src/amd/compiler \
88 -I$build_dir/src/amd/common \
89 -I$src_dir/src/amd/common \
90 -I$build_dir/src/amd \
91 -I$src_dir/src/amd \
92 -I$build_dir/src/gallium/drivers/radeonsi \
93 -I$src_dir/src/gallium/drivers/radeonsi \
94 -I$build_dir/src/gallium/drivers \
95 -I$src_dir/src/gallium/drivers \
96 -I$build_dir/src/gallium/auxiliary \
97 -I$src_dir/src/gallium/auxiliary \
98 -I$build_dir/src/gallium/include \
99 -I$src_dir/src/gallium/include \
100 -I$build_dir/src/compiler/nir \
101 -I$src_dir/src/compiler/nir \
102 -I$build_dir/src/compiler \
103 -I$src_dir/src/compiler \
104 -I$build_dir/src \
105 -I$src_dir/src \
106 -I$build_dir/include \
107 -I$src_dir/include \
109 $syslib_cpp_flags_defs \
110 $linux_cpp_flags_defs \
111 $cc_builtins_cpp_flags_defs \
112 $cc_attributes_cpp_flags_defs \
113 $mesa_cpp_flags_defs \
115 $external_deps_cpp_flags &
116 done
117 #-------------------------------------------------------------------------------
118 wait
119 #------------------------------------------------------------------------------
120 for src_pathname in $libradeonsi_c_pathnames
122 cpp_filename=$(basename $src_pathname .c).cpp.c
123 asm_filename=$(basename $src_pathname .c).cpp.c.s
124 printf "CC_S $build_dir/src/gallium/drivers/radeonsi/$cpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
125 $cc_s $build_dir/src/gallium/drivers/radeonsi/$cpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
126 done
127 #------------------------------------------------------------------------------
128 wait
129 #------------------------------------------------------------------------------
131 for src_pathname in $libradeonsi_c_pathnames
133 asm_filename=$(basename $src_pathname .c).cpp.c.s
134 o_filename=$(basename $src_pathname .c).cpp.c.s.o
135 os="$os $build_dir/src/gallium/drivers/radeonsi/$o_filename"
136 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
137 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
138 done
139 #------------------------------------------------------------------------------
140 for src_pathname in $libradeonsi_cxx_pathnames
142 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
143 printf "CXXPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename\n"
144 $cxxpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename \
145 -I$cc_internal_fixed_incdir \
146 -I$cc_internal_incdir \
147 -I$cxx_internal_incdir \
148 -I$linux_incdir \
149 -I$syslib_incdir \
151 -I$build_dir/src/util \
152 -I$src_dir/src/util \
153 -I$build_dir/src/amd/compiler \
154 -I$src_dir/src/amd/compiler \
155 -I$build_dir/src/amd/common \
156 -I$src_dir/src/amd/common \
157 -I$build_dir/src/amd \
158 -I$src_dir/src/amd \
159 -I$build_dir/src/gallium/drivers/radeonsi \
160 -I$src_dir/src/gallium/drivers/radeonsi \
161 -I$build_dir/src/gallium/drivers \
162 -I$src_dir/src/gallium/drivers \
163 -I$build_dir/src/gallium/auxiliary \
164 -I$src_dir/src/gallium/auxiliary \
165 -I$build_dir/src/gallium/include \
166 -I$src_dir/src/gallium/include \
167 -I$build_dir/src/compiler/nir \
168 -I$src_dir/src/compiler/nir \
169 -I$build_dir/src/compiler \
170 -I$src_dir/src/compiler \
171 -I$build_dir/src \
172 -I$src_dir/src \
173 -I$build_dir/include \
174 -I$src_dir/include \
176 $syslib_cpp_flags_defs \
177 $linux_cpp_flags_defs \
178 $cc_builtins_cpp_flags_defs \
179 $cc_attributes_cpp_flags_defs \
180 $mesa_cpp_flags_defs \
182 $external_deps_cpp_flags &
183 done
184 #------------------------------------------------------------------------------
185 wait
186 #------------------------------------------------------------------------------
187 for src_pathname in $libradeonsi_cxx_pathnames
189 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
190 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
191 printf "CXX_S $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
192 $cxx_s $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
193 done
194 #------------------------------------------------------------------------------
195 wait
196 #------------------------------------------------------------------------------
197 # reuse os
198 for src_pathname in $libradeonsi_cxx_pathnames
200 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
201 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
202 os="$os $build_dir/src/gallium/drivers/radeonsi/$o_filename"
203 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
204 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
205 done
206 #------------------------------------------------------------------------------
207 wait
208 #-------------------------------------------------------------------------------
209 printf "AR RCS $build_dir/libradeonsi.a $os\n"
210 $ar_rcs $build_dir/libradeonsi.a $os
211 #===============================================================================
212 # this so much filthy, there is no words for it
213 libradeonsi_gfx_cxx_pathnames="\
214 $src_dir/src/gallium/drivers/radeonsi/si_state_draw.cpp \
216 for g in 6 7 8 9 10 103 11 115 12
218 for src_pathname in $libradeonsi_gfx_cxx_pathnames
220 cxxpp_filename=$(basename $src_pathname .cpp).$g.cpp.cxx
221 printf "CXXPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename\n"
222 $cxxpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename \
223 -DGFX_VER=$g \
225 -I$cc_internal_fixed_incdir \
226 -I$cc_internal_incdir \
227 -I$cxx_internal_incdir \
228 -I$linux_incdir \
229 -I$syslib_incdir \
231 -I$build_dir/src/util \
232 -I$src_dir/src/util \
233 -I$build_dir/src/amd/compiler \
234 -I$src_dir/src/amd/compiler \
235 -I$build_dir/src/amd/common \
236 -I$src_dir/src/amd/common \
237 -I$build_dir/src/amd \
238 -I$src_dir/src/amd \
239 -I$build_dir/src/gallium/drivers/radeonsi \
240 -I$src_dir/src/gallium/drivers/radeonsi \
241 -I$build_dir/src/gallium/drivers \
242 -I$src_dir/src/gallium/drivers \
243 -I$build_dir/src/gallium/auxiliary \
244 -I$src_dir/src/gallium/auxiliary \
245 -I$build_dir/src/gallium/include \
246 -I$src_dir/src/gallium/include \
247 -I$build_dir/src/compiler/nir \
248 -I$src_dir/src/compiler/nir \
249 -I$build_dir/src/compiler \
250 -I$src_dir/src/compiler \
251 -I$build_dir/src \
252 -I$src_dir/src \
253 -I$build_dir/include \
254 -I$src_dir/include \
256 $syslib_cpp_flags_defs \
257 $linux_cpp_flags_defs \
258 $cc_builtins_cpp_flags_defs \
259 $cc_attributes_cpp_flags_defs \
260 $mesa_cpp_flags_defs \
262 $external_deps_cpp_flags &
263 done
264 #-----------------------------------------------------------------------
265 wait
266 #-----------------------------------------------------------------------
267 for src_pathname in $libradeonsi_gfx_cxx_pathnames
269 cxxpp_filename=$(basename $src_pathname .cpp).$g.cpp.cxx
270 asm_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s
271 printf "CXX_S $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
272 $cxx_s $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
273 done
274 #-----------------------------------------------------------------------
275 wait
276 #-----------------------------------------------------------------------
277 libradeonsi_gfx_a=
278 for src_pathname in $libradeonsi_gfx_cxx_pathnames
280 asm_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s
281 o_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s.o
282 libradeonsi_gfx_a="$libradeonsi_gfx_a $build_dir/src/gallium/drivers/radeonsi/$o_filename"
283 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
284 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
285 done
286 #------------------------------------------------------------------------------
287 wait
288 #-------------------------------------------------------------------------------
289 printf "AR RCS $build_dir/libradeonsi_gfx$g.a $libradeonsi_gfx_a\n"
290 $ar_rcs $build_dir/libradeonsi_gfx$g.a $libradeonsi_gfx_a
291 # will use this variable in dri driver linking command later on
292 libradeonsi_gfx_libs="$libradeonsi_gfx_libs $build_dir/libradeonsi_gfx$g.a"
293 done
294 #===============================================================================
295 printf "\t<--drivers sub-components built\n"