1 printf "\tbuilding drivers sub-components-->\n"
2 mkdir
-p $build_dir/src
/gallium
/drivers
/radeonsi
4 export PYTHONPATH
=$mako
5 $python3 $src_dir/src
/amd
/common
/gfx10_format_table.py \
6 $src_dir/src
/util
/format
/u_format.csv \
7 $src_dir/src
/amd
/registers
/gfx10-rsrc.json \
8 $src_dir/src
/amd
/registers
/gfx11-rsrc.json \
9 >$build_dir/src
/gallium
/drivers
/radeonsi
/gfx10_format_table.c
12 #-------------------------------------------------------------------------------
14 # do remove the radeonsi pipe loader fallback from (amdgpu/drm winsys) to
16 mkdir
-p $build_dir/src
/gallium
/drivers
/radeonsi
17 cp -f $src_dir/src
/gallium
/drivers
/radeonsi
/si_pipe.c
$build_dir/src
/gallium
/drivers
/radeonsi
/
18 patch -i $script_dir/si_pipe.c.
patch $build_dir/src
/gallium
/drivers
/radeonsi
/si_pipe.c
20 # uvd block is crap, avoid any non-critical code related to it
21 cp -f $script_dir/si_uvd.c
$build_dir/src
/gallium
/drivers
/radeonsi
/si_uvd.c
23 libradeonsi_files_c
="\
24 $build_dir/src/gallium/drivers/radeonsi/gfx10_format_table.c \
25 $src_dir/src/gallium/drivers/radeonsi/gfx10_query.c \
26 $src_dir/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c \
28 $src_dir/src/gallium/drivers/radeonsi/si_blit.c \
29 $src_dir/src/gallium/drivers/radeonsi/si_buffer.c \
30 $src_dir/src/gallium/drivers/radeonsi/si_clear.c \
31 $src_dir/src/gallium/drivers/radeonsi/si_compute.c \
32 $src_dir/src/gallium/drivers/radeonsi/si_compute_blit.c \
33 $src_dir/src/gallium/drivers/radeonsi/si_cp_dma.c \
34 $src_dir/src/gallium/drivers/radeonsi/si_cp_reg_shadowing.c \
35 $src_dir/src/gallium/drivers/radeonsi/si_debug.c \
36 $src_dir/src/gallium/drivers/radeonsi/si_descriptors.c \
37 $src_dir/src/gallium/drivers/radeonsi/si_sdma_copy_image.c \
38 $src_dir/src/gallium/drivers/radeonsi/si_fence.c \
39 $src_dir/src/gallium/drivers/radeonsi/si_get.c \
40 $src_dir/src/gallium/drivers/radeonsi/si_gfx_cs.c \
41 $src_dir/src/gallium/drivers/radeonsi/si_gpu_load.c \
42 $src_dir/src/gallium/drivers/radeonsi/si_nir_optim.c \
43 $src_dir/src/gallium/drivers/radeonsi/si_perfcounter.c \
44 $build_dir/src/gallium/drivers/radeonsi/si_pipe.c \
45 $src_dir/src/gallium/drivers/radeonsi/si_pm4.c \
46 $src_dir/src/gallium/drivers/radeonsi/si_query.c \
47 $src_dir/src/gallium/drivers/radeonsi/si_shader.c \
48 $src_dir/src/gallium/drivers/radeonsi/si_shader_info.c \
49 $src_dir/src/gallium/drivers/radeonsi/si_shaderlib_nir.c \
50 $src_dir/src/gallium/drivers/radeonsi/si_shader_llvm.c \
51 $src_dir/src/gallium/drivers/radeonsi/si_shader_llvm_vs.c \
52 $src_dir/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c \
53 $src_dir/src/gallium/drivers/radeonsi/si_shader_llvm_ps.c \
54 $src_dir/src/gallium/drivers/radeonsi/si_shader_llvm_resources.c \
55 $src_dir/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c \
56 $src_dir/src/gallium/drivers/radeonsi/si_shader_nir.c \
57 $src_dir/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c \
58 $src_dir/src/gallium/drivers/radeonsi/si_sqtt.c \
59 $src_dir/src/gallium/drivers/radeonsi/si_state.c \
60 $src_dir/src/gallium/drivers/radeonsi/si_state_binning.c \
61 $src_dir/src/gallium/drivers/radeonsi/si_state_msaa.c \
62 $src_dir/src/gallium/drivers/radeonsi/si_state_streamout.c \
63 $src_dir/src/gallium/drivers/radeonsi/si_state_viewport.c \
64 $src_dir/src/gallium/drivers/radeonsi/si_test_dma_perf.c \
65 $src_dir/src/gallium/drivers/radeonsi/si_test_image_copy_region.c \
66 $src_dir/src/gallium/drivers/radeonsi/si_texture.c \
67 $build_dir/src/gallium/drivers/radeonsi/si_uvd.c \
69 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd.c \
70 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn.c \
71 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_1_2.c \
72 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_2_0.c \
73 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_3_0.c \
74 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc_4_0.c \
75 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_enc.c \
76 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_dec_jpeg.c \
77 $src_dir/src/gallium/drivers/radeonsi/radeon_vcn_dec.c \
78 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd_enc_1_1.c \
79 $src_dir/src/gallium/drivers/radeonsi/radeon_uvd_enc.c \
80 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_40_2_2.c \
81 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_50.c \
82 $src_dir/src/gallium/drivers/radeonsi/radeon_vce_52.c \
83 $src_dir/src/gallium/drivers/radeonsi/radeon_vce.c \
84 $src_dir/src/gallium/drivers/radeonsi/radeon_video.c \
86 #-------------------------------------------------------------------------------
88 for f
in $libradeonsi_files_c
90 libradeonsi_obj_dir
=$
(dirname $f)
91 libradeonsi_obj_dir
=$build_dir/${libradeonsi_obj_dir#*/src/}
92 mkdir
-p $libradeonsi_obj_dir
94 libradeonsi_obj
=$libradeonsi_obj_dir/$
(basename $f .c
).o
95 libradeonsi_a
="$libradeonsi_a $libradeonsi_obj"
97 $cco_slib -o $libradeonsi_obj $f \
98 -I$build_dir/src
/gallium
/drivers
/radeonsi \
99 -I$build_dir/src
/amd \
100 -I$build_dir/src
/compiler
/nir \
101 -I$src_dir/src
/util \
102 -I$src_dir/src
/amd
/llvm \
103 -I$src_dir/src
/amd
/common \
105 -I$src_dir/src
/gallium
/drivers
/radeonsi \
106 -I$src_dir/src
/gallium
/drivers \
107 -I$src_dir/src
/gallium
/auxiliary \
108 -I$src_dir/src
/gallium
/include \
109 -I$src_dir/src
/compiler
/nir \
112 $cco_slib_common_trailer &
115 # don't mind cpp here, GL is massive cr*p like c++ anyway
116 libradeonsi_files_cpp
="\
117 $src_dir/src/gallium/drivers/radeonsi/si_state_shaders.cpp \
120 for f
in $libradeonsi_files_cpp
122 libradeonsi_obj_dir
=$
(dirname $f)
123 libradeonsi_obj_dir
=$build_dir/${libradeonsi_obj_dir#*/src/}
124 mkdir
-p $libradeonsi_obj_dir
126 libradeonsi_obj
=$libradeonsi_obj_dir/$
(basename $f .cpp
).o
127 libradeonsi_a
="$libradeonsi_a $libradeonsi_obj"
129 $cxxo_slib -o $libradeonsi_obj $f \
130 -I$build_dir/src
/gallium
/drivers
/radeonsi \
131 -I$build_dir/src
/amd \
132 -I$build_dir/src
/compiler
/nir \
133 -I$src_dir/src
/util \
134 -I$src_dir/src
/amd
/llvm \
135 -I$src_dir/src
/amd
/common \
137 -I$src_dir/src
/gallium
/drivers
/radeonsi \
138 -I$src_dir/src
/gallium
/drivers \
139 -I$src_dir/src
/gallium
/auxiliary \
140 -I$src_dir/src
/gallium
/include \
141 -I$src_dir/src
/compiler
/nir \
144 $cco_slib_common_trailer &
148 $ar $build_dir/libradeonsi.a
$libradeonsi_a
150 libradeonsi_gfx_files_cpp
="\
151 $src_dir/src/gallium/drivers/radeonsi/si_state_draw.cpp \
153 for g
in 6 7 8 9 10 103 11
156 for f
in $libradeonsi_gfx_files_cpp
158 libradeonsi_gfx_obj_dir
=$
(dirname $f)
159 libradeonsi_gfx_obj_dir
=$build_dir/${libradeonsi_gfx_obj_dir#*/src/}
160 mkdir
-p $libradeonsi_gfx_obj_dir
162 libradeonsi_gfx_obj
=$libradeonsi_gfx_obj_dir/$
(basename $f .c
).
$g.o
163 libradeonsi_gfx_a
="$libradeonsi_gfx_a $libradeonsi_gfx_obj"
165 $cxxo_slib -o $libradeonsi_gfx_obj $f \
167 -I$build_dir/src
/gallium
/drivers
/radeonsi \
168 -I$build_dir/src
/amd \
169 -I$build_dir/src
/compiler
/nir \
170 -I$src_dir/src
/util \
171 -I$src_dir/src
/amd
/llvm \
172 -I$src_dir/src
/amd
/common \
174 -I$src_dir/src
/gallium
/drivers
/radeonsi \
175 -I$src_dir/src
/gallium
/drivers \
176 -I$src_dir/src
/gallium
/auxiliary \
177 -I$src_dir/src
/gallium
/include \
178 -I$src_dir/src
/compiler
/nir \
181 $cco_slib_common_trailer &
184 $ar $build_dir/libradeonsi_gfx
$g.a
$libradeonsi_gfx_a
185 libradeonsi_gfx_libs
="$libradeonsi_gfx_libs $build_dir/libradeonsi_gfx$g.a"
187 printf "\t<--drivers sub-components built\n"