Gfx stack update
[nyanlinux.git] / builders / mesa-gl-amd-sh-ca92a10800bcb09749758ea1664dc0675955ffa0 / contrib / amd.sh
blob30bcf782c20d4f29ca2316ec81a38d77f3afd3a9
1 echo "building AMD GPU related common component-->"
3 #===============================================================================
4 # amd/addrlib
6 libaddrlib_cxx_files="\
7 $src_dir/src/amd/addrlib/src/addrinterface.cpp \
8 $src_dir/src/amd/addrlib/src/core/addrelemlib.cpp \
9 $src_dir/src/amd/addrlib/src/core/addrlib.cpp \
10 $src_dir/src/amd/addrlib/src/core/addrlib1.cpp \
11 $src_dir/src/amd/addrlib/src/core/addrlib2.cpp \
12 $src_dir/src/amd/addrlib/src/core/addrobject.cpp \
13 $src_dir/src/amd/addrlib/src/core/coord.cpp \
14 $src_dir/src/amd/addrlib/src/gfx11/gfx11addrlib.cpp \
15 $src_dir/src/amd/addrlib/src/gfx10/gfx10addrlib.cpp \
16 $src_dir/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp \
17 $src_dir/src/amd/addrlib/src/r800/ciaddrlib.cpp \
18 $src_dir/src/amd/addrlib/src/r800/egbaddrlib.cpp \
19 $src_dir/src/amd/addrlib/src/r800/siaddrlib.cpp \
22 #------------------------------------------------------------------------------
24 for f in $libaddrlib_cxx_files
26 libaddrlib_cxx_obj_dir=$(dirname $f)
27 libaddrlib_cxx_obj_dir=$build_dir/${libaddrlib_cxx_obj_dir#*/src/}
28 mkdir -p $libaddrlib_cxx_obj_dir
30 libaddrlib_cxx_obj=$libaddrlib_cxx_obj_dir/$(basename $f .c).o
31 libaddrlib_a="$libaddrlib_a $libaddrlib_cxx_obj"
33 $cxxo_slib -o $libaddrlib_cxx_obj $f \
34 -DLITTLEENDIAN_CPU \
35 -I$src_dir/src/amd/addrlib/src/chip/r800 \
36 -I$src_dir/src/amd/addrlib/src/chip/gfx9 \
37 -I$src_dir/src/amd/addrlib/src/chip/gfx10 \
38 -I$src_dir/src/amd/addrlib/src/chip/gfx11 \
39 -I$src_dir/src/amd/addrlib/src/core \
40 -I$src_dir/src/amd/addrlib/src \
41 -I$src_dir/src/amd/addrlib/inc \
42 -I$src_dir/src \
43 -I$src_dir/include \
45 $cxxo_slib_common_trailer &
46 done
48 wait
50 $ar $build_dir/libaddrlib.a $libaddrlib_a
52 #===============================================================================
53 # amd/common
55 mkdir -p $build_dir/src/amd
57 libamd_common_c_files="\
58 $src_dir/src/amd/common/amd_family.c \
59 $src_dir/src/amd/common/ac_binary.c \
60 $src_dir/src/amd/common/ac_debug.c \
61 $src_dir/src/amd/common/ac_nir.c \
62 $src_dir/src/amd/common/ac_nir_cull.c \
63 $src_dir/src/amd/common/ac_nir_lower_esgs_io_to_mem.c \
64 $src_dir/src/amd/common/ac_nir_lower_global_access.c \
65 $src_dir/src/amd/common/ac_nir_lower_image_opcodes_cdna.c \
66 $src_dir/src/amd/common/ac_nir_lower_ngg.c \
67 $src_dir/src/amd/common/ac_nir_lower_ps.c \
68 $src_dir/src/amd/common/ac_nir_lower_resinfo.c \
69 $src_dir/src/amd/common/ac_nir_lower_subdword_loads.c \
70 $src_dir/src/amd/common/ac_nir_lower_taskmesh_io_to_mem.c \
71 $src_dir/src/amd/common/ac_nir_lower_tess_io_to_mem.c \
72 $src_dir/src/amd/common/ac_nir_lower_tex.c \
73 $src_dir/src/amd/common/ac_nir_opt_outputs.c \
74 $src_dir/src/amd/common/ac_parse_ib.c \
75 $src_dir/src/amd/common/ac_perfcounter.c \
76 $src_dir/src/amd/common/ac_shader_util.c \
77 $src_dir/src/amd/common/ac_shader_args.c \
78 $src_dir/src/amd/common/ac_shadowed_regs.c \
79 $src_dir/src/amd/common/ac_gpu_info.c \
80 $src_dir/src/amd/common/ac_surface.c \
81 $src_dir/src/amd/common/ac_surface_meta_address_test.c \
82 $src_dir/src/amd/common/ac_msgpack.c \
83 $src_dir/src/amd/common/ac_rtld.c \
84 $src_dir/src/amd/common/ac_rgp.c \
85 $src_dir/src/amd/common/ac_rgp_elf_object_pack.c \
86 $src_dir/src/amd/common/ac_spm.c \
87 $src_dir/src/amd/common/ac_sqtt.c \
88 $src_dir/src/amd/common/ac_surface_modifier_test.c \
91 #-------------------------------------------------------------------------------
93 for f in $libamd_common_c_files
95 libamd_common_c_obj_dir=$(dirname $f)
96 libamd_common_c_obj_dir=$build_dir/${libamd_common_c_obj_dir#*/src/}
97 mkdir -p $libamd_common_c_obj_dir
99 libamd_common_c_obj=$libamd_common_c_obj_dir/$(basename $f .c).o
100 libamd_common_a="$libamd_common_a $libamd_common_c_obj"
102 $cco_slib -o $libamd_common_c_obj $f \
103 -I$src_dir/src/gallium/auxiliary \
104 -I$src_dir/src/gallium/include \
105 -I$src_dir/src/util \
106 -I$src_dir/src/mesa \
107 -I$src_dir/src/amd/llvm \
108 -I$build_dir/src/amd/common \
109 -I$src_dir/src/amd/common \
110 -I$build_dir/src/amd \
111 -I$src_dir/src/amd \
112 -I$build_dir/src/compiler/nir \
113 -I$src_dir/src/compiler/nir \
114 -I$build_dir/src/compiler \
115 -I$src_dir/src/compiler \
116 -I$src_dir/src \
117 -I$src_dir/include \
119 $cco_slib_common_trailer &
120 done
122 wait
124 $ar $build_dir/libamd_common.a $libamd_common_a
126 #===============================================================================
127 # amd/llvm
129 libamd_llvm_c_files="\
130 $src_dir/src/amd/llvm/ac_llvm_build.c \
131 $src_dir/src/amd/llvm/ac_llvm_util.c \
132 $src_dir/src/amd/llvm/ac_nir_to_llvm.c \
135 #-------------------------------------------------------------------------------
137 for f in $libamd_llvm_c_files
139 libamd_llvm_c_obj_dir=$(dirname $f)
140 libamd_llvm_c_obj_dir=$build_dir/${libamd_llvm_c_obj_dir#*/src/}
141 mkdir -p $libamd_llvm_c_obj_dir
143 libamd_llvm_c_obj=$libamd_llvm_c_obj_dir/$(basename $f .c).o
144 libamd_llvm_a="$libamd_llvm_a $libamd_llvm_c_obj"
146 $cco_slib -o $libamd_llvm_c_obj $f \
147 -I$src_dir/src/gallium/auxiliary \
148 -I$src_dir/src/gallium/include \
149 -I$src_dir/src/amd/llvm \
150 -I$build_dir/src/amd/common \
151 -I$src_dir/src/amd/common \
152 -I$build_dir/src/amd \
153 -I$src_dir/src/amd \
154 -I$build_dir/src/compiler/nir \
155 -I$src_dir/src/compiler/nir \
156 -I$build_dir/src/compiler \
157 -I$src_dir/src/compiler \
158 -I$src_dir/src \
159 -I$src_dir/include \
161 $cco_slib_common_trailer &
162 done
164 #-------------------------------------------------------------------------------
166 $cxxo_slib -o $build_dir/amd/llvm/ac_llvm_helper.o $src_dir/src/amd/llvm/ac_llvm_helper.cpp \
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$src_dir/src/amd/llvm \
172 -I$build_dir/src/amd/common \
173 -I$src_dir/src/amd/common \
174 -I$src_dir/src/amd \
175 -I$src_dir/src/gallium/include \
176 -I$src_dir/src/mesa \
177 -I$src_dir/src \
178 -I$src_dir/util \
179 -I$src_dir/include \
181 $cxxo_slib_common_trailer &
183 libamd_llvm_a="$libamd_llvm_a $build_dir/amd/llvm/ac_llvm_helper.o"
185 wait
187 $ar $build_dir/libamd_llvm.a $libamd_llvm_a
189 echo "<--AMD GPU related common components built"