mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-9ab59574ef162393f89c36980a366eeb8ecccb64 / contrib / gallium_drivers.sh
blobff9a4945ee057aae37029289cd7f8bf4089ce67c
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_shaderlib_tgsi.c \
38 $src_dir/src/gallium/drivers/radeonsi/si_sqtt.c \
39 $src_dir/src/gallium/drivers/radeonsi/si_state.c \
40 $src_dir/src/gallium/drivers/radeonsi/si_state_binning.c \
41 $src_dir/src/gallium/drivers/radeonsi/si_state_msaa.c \
42 $src_dir/src/gallium/drivers/radeonsi/si_state_streamout.c \
43 $src_dir/src/gallium/drivers/radeonsi/si_state_viewport.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.c \
56 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_dec_jpeg.c \
57 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_dec.c \
58 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd_enc_1_1.c \
59 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd_enc.c \
60 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_40_2_2.c \
61 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_50.c \
62 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_52.c \
63 $src_dir/src/gallium/drivers/radeonsi/radeon_vce.c \
64 $src_dir/src/gallium/drivers/radeonsi/radeon_video.c \
66 # some c++ diarrhea did slip in
67 libradeonsi_cxx_pathnames="\
68 $src_dir/src/gallium/drivers/radeonsi/si_state_shaders.cpp \
70 #-------------------------------------------------------------------------------
71 for src_pathname in $libradeonsi_c_pathnames
73 cpp_filename=$(basename $src_pathname .c).cpp.c
74 printf "CPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cpp_filename\n"
75 $cpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cpp_filename \
76 -I$cc_internal_fixed_incdir \
77 -I$cc_internal_incdir \
78 -I$linux_incdir \
79 -I$syslib_incdir \
81 -I$build_dir/src/util \
82 -I$src_dir/src/util \
83 -I$build_dir/src/amd/compiler \
84 -I$src_dir/src/amd/compiler \
85 -I$build_dir/src/amd/common \
86 -I$src_dir/src/amd/common \
87 -I$build_dir/src/amd \
88 -I$src_dir/src/amd \
89 -I$build_dir/src/gallium/drivers/radeonsi \
90 -I$src_dir/src/gallium/drivers/radeonsi \
91 -I$build_dir/src/gallium/drivers \
92 -I$src_dir/src/gallium/drivers \
93 -I$build_dir/src/gallium/auxiliary \
94 -I$src_dir/src/gallium/auxiliary \
95 -I$build_dir/src/gallium/include \
96 -I$src_dir/src/gallium/include \
97 -I$build_dir/src/compiler/nir \
98 -I$src_dir/src/compiler/nir \
99 -I$build_dir/src/compiler \
100 -I$src_dir/src/compiler \
101 -I$build_dir/src \
102 -I$src_dir/src \
103 -I$build_dir/include \
104 -I$src_dir/include \
106 $syslib_cpp_flags_defs \
107 $linux_cpp_flags_defs \
108 $cc_builtins_cpp_flags_defs \
109 $cc_attributes_cpp_flags_defs \
110 $mesa_cpp_flags_defs \
112 $external_deps_cpp_flags &
113 done
114 #-------------------------------------------------------------------------------
115 wait
116 #------------------------------------------------------------------------------
117 for src_pathname in $libradeonsi_c_pathnames
119 cpp_filename=$(basename $src_pathname .c).cpp.c
120 asm_filename=$(basename $src_pathname .c).cpp.c.s
121 printf "CC_S $build_dir/src/gallium/drivers/radeonsi/$cpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
122 $cc_s $build_dir/src/gallium/drivers/radeonsi/$cpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
123 done
124 #------------------------------------------------------------------------------
125 wait
126 #------------------------------------------------------------------------------
128 for src_pathname in $libradeonsi_c_pathnames
130 asm_filename=$(basename $src_pathname .c).cpp.c.s
131 o_filename=$(basename $src_pathname .c).cpp.c.s.o
132 os="$os $build_dir/src/gallium/drivers/radeonsi/$o_filename"
133 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
134 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
135 done
136 #------------------------------------------------------------------------------
137 for src_pathname in $libradeonsi_cxx_pathnames
139 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
140 printf "CXXPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename\n"
141 $cxxpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename \
142 -I$cc_internal_fixed_incdir \
143 -I$cc_internal_incdir \
144 -I$cxx_internal_incdir \
145 -I$linux_incdir \
146 -I$syslib_incdir \
148 -I$build_dir/src/util \
149 -I$src_dir/src/util \
150 -I$build_dir/src/amd/compiler \
151 -I$src_dir/src/amd/compiler \
152 -I$build_dir/src/amd/common \
153 -I$src_dir/src/amd/common \
154 -I$build_dir/src/amd \
155 -I$src_dir/src/amd \
156 -I$build_dir/src/gallium/drivers/radeonsi \
157 -I$src_dir/src/gallium/drivers/radeonsi \
158 -I$build_dir/src/gallium/drivers \
159 -I$src_dir/src/gallium/drivers \
160 -I$build_dir/src/gallium/auxiliary \
161 -I$src_dir/src/gallium/auxiliary \
162 -I$build_dir/src/gallium/include \
163 -I$src_dir/src/gallium/include \
164 -I$build_dir/src/compiler/nir \
165 -I$src_dir/src/compiler/nir \
166 -I$build_dir/src/compiler \
167 -I$src_dir/src/compiler \
168 -I$build_dir/src \
169 -I$src_dir/src \
170 -I$build_dir/include \
171 -I$src_dir/include \
173 $syslib_cpp_flags_defs \
174 $linux_cpp_flags_defs \
175 $cc_builtins_cpp_flags_defs \
176 $cc_attributes_cpp_flags_defs \
177 $mesa_cpp_flags_defs \
179 $external_deps_cpp_flags &
180 done
181 #------------------------------------------------------------------------------
182 wait
183 #------------------------------------------------------------------------------
184 for src_pathname in $libradeonsi_cxx_pathnames
186 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
187 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
188 printf "CXX_S $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
189 $cxx_s $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
190 done
191 #------------------------------------------------------------------------------
192 wait
193 #------------------------------------------------------------------------------
194 # reuse os
195 for src_pathname in $libradeonsi_cxx_pathnames
197 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
198 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
199 os="$os $build_dir/src/gallium/drivers/radeonsi/$o_filename"
200 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
201 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
202 done
203 #------------------------------------------------------------------------------
204 wait
205 #-------------------------------------------------------------------------------
206 printf "AR RCS $build_dir/libradeonsi.a $os\n"
207 $ar_rcs $build_dir/libradeonsi.a $os
208 #===============================================================================
209 # this so much filthy, there is no words for it
210 libradeonsi_gfx_cxx_pathnames="\
211 $src_dir/src/gallium/drivers/radeonsi/si_state_draw.cpp \
213 for g in 6 7 8 9 10 103 11 115
215 for src_pathname in $libradeonsi_gfx_cxx_pathnames
217 cxxpp_filename=$(basename $src_pathname .cpp).$g.cpp.cxx
218 printf "CXXPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename\n"
219 $cxxpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename \
220 -DGFX_VER=$g \
222 -I$cc_internal_fixed_incdir \
223 -I$cc_internal_incdir \
224 -I$cxx_internal_incdir \
225 -I$linux_incdir \
226 -I$syslib_incdir \
228 -I$build_dir/src/util \
229 -I$src_dir/src/util \
230 -I$build_dir/src/amd/compiler \
231 -I$src_dir/src/amd/compiler \
232 -I$build_dir/src/amd/common \
233 -I$src_dir/src/amd/common \
234 -I$build_dir/src/amd \
235 -I$src_dir/src/amd \
236 -I$build_dir/src/gallium/drivers/radeonsi \
237 -I$src_dir/src/gallium/drivers/radeonsi \
238 -I$build_dir/src/gallium/drivers \
239 -I$src_dir/src/gallium/drivers \
240 -I$build_dir/src/gallium/auxiliary \
241 -I$src_dir/src/gallium/auxiliary \
242 -I$build_dir/src/gallium/include \
243 -I$src_dir/src/gallium/include \
244 -I$build_dir/src/compiler/nir \
245 -I$src_dir/src/compiler/nir \
246 -I$build_dir/src/compiler \
247 -I$src_dir/src/compiler \
248 -I$build_dir/src \
249 -I$src_dir/src \
250 -I$build_dir/include \
251 -I$src_dir/include \
253 $syslib_cpp_flags_defs \
254 $linux_cpp_flags_defs \
255 $cc_builtins_cpp_flags_defs \
256 $cc_attributes_cpp_flags_defs \
257 $mesa_cpp_flags_defs \
259 $external_deps_cpp_flags &
260 done
261 #-----------------------------------------------------------------------
262 wait
263 #-----------------------------------------------------------------------
264 for src_pathname in $libradeonsi_gfx_cxx_pathnames
266 cxxpp_filename=$(basename $src_pathname .cpp).$g.cpp.cxx
267 asm_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s
268 printf "CXX_S $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
269 $cxx_s $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
270 done
271 #-----------------------------------------------------------------------
272 wait
273 #-----------------------------------------------------------------------
274 libradeonsi_gfx_a=
275 for src_pathname in $libradeonsi_gfx_cxx_pathnames
277 asm_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s
278 o_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s.o
279 libradeonsi_gfx_a="$libradeonsi_gfx_a $build_dir/src/gallium/drivers/radeonsi/$o_filename"
280 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
281 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
282 done
283 #------------------------------------------------------------------------------
284 wait
285 #-------------------------------------------------------------------------------
286 printf "AR RCS $build_dir/libradeonsi_gfx$g.a $libradeonsi_gfx_a\n"
287 $ar_rcs $build_dir/libradeonsi_gfx$g.a $libradeonsi_gfx_a
288 # will use this variable in dri driver linking command later on
289 libradeonsi_gfx_libs="$libradeonsi_gfx_libs $build_dir/libradeonsi_gfx$g.a"
290 done
291 #===============================================================================
292 printf "\t<--drivers sub-components built\n"