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