mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-1b8cf06fc76b7baf78dab80bd8023377f8fb410e / contrib / gallium_drivers.sh
blobeb0d1e7605ca83f51a0fa362af39ef345833209f
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_dma_perf.c \
44 $src_dir/src/gallium/drivers/radeonsi/si_test_image_copy_region.c \
45 $src_dir/src/gallium/drivers/radeonsi/si_texture.c \
46 $build_dir/src/gallium/drivers/radeonsi/si_uvd.c \
48 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd.c \
49 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn.c \
50 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_1_2.c \
51 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_2_0.c \
52 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_3_0.c \
53 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_4_0.c \
54 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc.c \
55 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_dec_jpeg.c \
56 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_dec.c \
57 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd_enc_1_1.c \
58 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd_enc.c \
59 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_40_2_2.c \
60 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_50.c \
61 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_52.c \
62 $src_dir/src/gallium/drivers/radeonsi/radeon_vce.c \
63 $src_dir/src/gallium/drivers/radeonsi/radeon_video.c \
65 # some c++ diarrhea did slip in
66 libradeonsi_cxx_pathnames="\
67 $src_dir/src/gallium/drivers/radeonsi/si_state_shaders.cpp \
69 #-------------------------------------------------------------------------------
70 for src_pathname in $libradeonsi_c_pathnames
72 cpp_filename=$(basename $src_pathname .c).cpp.c
73 printf "CPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cpp_filename\n"
74 $cpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cpp_filename \
75 -I$cc_internal_fixed_incdir \
76 -I$cc_internal_incdir \
77 -I$linux_incdir \
78 -I$syslib_incdir \
80 -I$build_dir/src/util \
81 -I$src_dir/src/util \
82 -I$build_dir/src/amd/compiler \
83 -I$src_dir/src/amd/compiler \
84 -I$build_dir/src/amd/common \
85 -I$src_dir/src/amd/common \
86 -I$build_dir/src/amd \
87 -I$src_dir/src/amd \
88 -I$build_dir/src/gallium/drivers/radeonsi \
89 -I$src_dir/src/gallium/drivers/radeonsi \
90 -I$build_dir/src/gallium/drivers \
91 -I$src_dir/src/gallium/drivers \
92 -I$build_dir/src/gallium/auxiliary \
93 -I$src_dir/src/gallium/auxiliary \
94 -I$build_dir/src/gallium/include \
95 -I$src_dir/src/gallium/include \
96 -I$build_dir/src/compiler/nir \
97 -I$src_dir/src/compiler/nir \
98 -I$build_dir/src/compiler \
99 -I$src_dir/src/compiler \
100 -I$build_dir/src \
101 -I$src_dir/src \
102 -I$build_dir/include \
103 -I$src_dir/include \
105 $syslib_cpp_flags_defs \
106 $linux_cpp_flags_defs \
107 $cc_builtins_cpp_flags_defs \
108 $cc_attributes_cpp_flags_defs \
109 $mesa_cpp_flags_defs \
111 $external_deps_cpp_flags &
112 done
113 #-------------------------------------------------------------------------------
114 wait
115 #------------------------------------------------------------------------------
116 for src_pathname in $libradeonsi_c_pathnames
118 cpp_filename=$(basename $src_pathname .c).cpp.c
119 asm_filename=$(basename $src_pathname .c).cpp.c.s
120 printf "CC_S $build_dir/src/gallium/drivers/radeonsi/$cpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
121 $cc_s $build_dir/src/gallium/drivers/radeonsi/$cpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
122 done
123 #------------------------------------------------------------------------------
124 wait
125 #------------------------------------------------------------------------------
127 for src_pathname in $libradeonsi_c_pathnames
129 asm_filename=$(basename $src_pathname .c).cpp.c.s
130 o_filename=$(basename $src_pathname .c).cpp.c.s.o
131 os="$os $build_dir/src/gallium/drivers/radeonsi/$o_filename"
132 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
133 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
134 done
135 #------------------------------------------------------------------------------
136 for src_pathname in $libradeonsi_cxx_pathnames
138 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
139 printf "CXXPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename\n"
140 $cxxpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename \
141 -I$cc_internal_fixed_incdir \
142 -I$cc_internal_incdir \
143 -I$cxx_internal_incdir \
144 -I$linux_incdir \
145 -I$syslib_incdir \
147 -I$build_dir/src/util \
148 -I$src_dir/src/util \
149 -I$build_dir/src/amd/compiler \
150 -I$src_dir/src/amd/compiler \
151 -I$build_dir/src/amd/common \
152 -I$src_dir/src/amd/common \
153 -I$build_dir/src/amd \
154 -I$src_dir/src/amd \
155 -I$build_dir/src/gallium/drivers/radeonsi \
156 -I$src_dir/src/gallium/drivers/radeonsi \
157 -I$build_dir/src/gallium/drivers \
158 -I$src_dir/src/gallium/drivers \
159 -I$build_dir/src/gallium/auxiliary \
160 -I$src_dir/src/gallium/auxiliary \
161 -I$build_dir/src/gallium/include \
162 -I$src_dir/src/gallium/include \
163 -I$build_dir/src/compiler/nir \
164 -I$src_dir/src/compiler/nir \
165 -I$build_dir/src/compiler \
166 -I$src_dir/src/compiler \
167 -I$build_dir/src \
168 -I$src_dir/src \
169 -I$build_dir/include \
170 -I$src_dir/include \
172 $syslib_cpp_flags_defs \
173 $linux_cpp_flags_defs \
174 $cc_builtins_cpp_flags_defs \
175 $cc_attributes_cpp_flags_defs \
176 $mesa_cpp_flags_defs \
178 $external_deps_cpp_flags &
179 done
180 #------------------------------------------------------------------------------
181 wait
182 #------------------------------------------------------------------------------
183 for src_pathname in $libradeonsi_cxx_pathnames
185 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
186 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
187 printf "CXX_S $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
188 $cxx_s $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
189 done
190 #------------------------------------------------------------------------------
191 wait
192 #------------------------------------------------------------------------------
193 # reuse os
194 for src_pathname in $libradeonsi_cxx_pathnames
196 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
197 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
198 os="$os $build_dir/src/gallium/drivers/radeonsi/$o_filename"
199 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
200 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
201 done
202 #------------------------------------------------------------------------------
203 wait
204 #-------------------------------------------------------------------------------
205 printf "AR RCS $build_dir/libradeonsi.a $os\n"
206 $ar_rcs $build_dir/libradeonsi.a $os
207 #===============================================================================
208 # this so much filthy, there is no words for it
209 libradeonsi_gfx_cxx_pathnames="\
210 $src_dir/src/gallium/drivers/radeonsi/si_state_draw.cpp \
212 for g in 6 7 8 9 10 103 11 115
214 for src_pathname in $libradeonsi_gfx_cxx_pathnames
216 cxxpp_filename=$(basename $src_pathname .cpp).$g.cpp.cxx
217 printf "CXXPP $src_pathname --> $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename\n"
218 $cxxpp $src_pathname -o $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename \
219 -DGFX_VER=$g \
221 -I$cc_internal_fixed_incdir \
222 -I$cc_internal_incdir \
223 -I$cxx_internal_incdir \
224 -I$linux_incdir \
225 -I$syslib_incdir \
227 -I$build_dir/src/util \
228 -I$src_dir/src/util \
229 -I$build_dir/src/amd/compiler \
230 -I$src_dir/src/amd/compiler \
231 -I$build_dir/src/amd/common \
232 -I$src_dir/src/amd/common \
233 -I$build_dir/src/amd \
234 -I$src_dir/src/amd \
235 -I$build_dir/src/gallium/drivers/radeonsi \
236 -I$src_dir/src/gallium/drivers/radeonsi \
237 -I$build_dir/src/gallium/drivers \
238 -I$src_dir/src/gallium/drivers \
239 -I$build_dir/src/gallium/auxiliary \
240 -I$src_dir/src/gallium/auxiliary \
241 -I$build_dir/src/gallium/include \
242 -I$src_dir/src/gallium/include \
243 -I$build_dir/src/compiler/nir \
244 -I$src_dir/src/compiler/nir \
245 -I$build_dir/src/compiler \
246 -I$src_dir/src/compiler \
247 -I$build_dir/src \
248 -I$src_dir/src \
249 -I$build_dir/include \
250 -I$src_dir/include \
252 $syslib_cpp_flags_defs \
253 $linux_cpp_flags_defs \
254 $cc_builtins_cpp_flags_defs \
255 $cc_attributes_cpp_flags_defs \
256 $mesa_cpp_flags_defs \
258 $external_deps_cpp_flags &
259 done
260 #-----------------------------------------------------------------------
261 wait
262 #-----------------------------------------------------------------------
263 for src_pathname in $libradeonsi_gfx_cxx_pathnames
265 cxxpp_filename=$(basename $src_pathname .cpp).$g.cpp.cxx
266 asm_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s
267 printf "CXX_S $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename --> $build_dir/src/gallium/drivers/radeonsi/$asm_filename\n"
268 $cxx_s $build_dir/src/gallium/drivers/radeonsi/$cxxpp_filename -o $build_dir/src/gallium/drivers/radeonsi/$asm_filename &
269 done
270 #-----------------------------------------------------------------------
271 wait
272 #-----------------------------------------------------------------------
273 libradeonsi_gfx_a=
274 for src_pathname in $libradeonsi_gfx_cxx_pathnames
276 asm_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s
277 o_filename=$(basename $src_pathname .cpp).$g.cpp.cxx.s.o
278 libradeonsi_gfx_a="$libradeonsi_gfx_a $build_dir/src/gallium/drivers/radeonsi/$o_filename"
279 printf "AS $build_dir/src/gallium/drivers/radeonsi/$asm_filename --> $build_dir/src/gallium/drivers/radeonsi/$o_filename\n"
280 $as $build_dir/src/gallium/drivers/radeonsi/$asm_filename -o $build_dir/src/gallium/drivers/radeonsi/$o_filename &
281 done
282 #------------------------------------------------------------------------------
283 wait
284 #-------------------------------------------------------------------------------
285 printf "AR RCS $build_dir/libradeonsi_gfx$g.a $libradeonsi_gfx_a\n"
286 $ar_rcs $build_dir/libradeonsi_gfx$g.a $libradeonsi_gfx_a
287 # will use this variable in dri driver linking command later on
288 libradeonsi_gfx_libs="$libradeonsi_gfx_libs $build_dir/libradeonsi_gfx$g.a"
289 done
290 #===============================================================================
291 printf "\t<--drivers sub-components built\n"