mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-89742437efa7099bc7664e7646d57927caabcb53 / contrib / generators_amd.sh
blob8053102c1639588b2f37191f81135bee548938a8
1 echo "Running AMD GPU code generators-->"
2 #===============================================================================
3 # common
4 mkdir -p $build_dir/src/amd/common
6 $python3 \
7 $src_dir/src/amd/common/sid_tables.py \
8 $src_dir/src/amd/common/sid.h \
9 $src_dir/src/amd/registers/gfx6.json \
10 $src_dir/src/amd/registers/gfx7.json \
11 $src_dir/src/amd/registers/gfx8.json \
12 $src_dir/src/amd/registers/gfx81.json \
13 $src_dir/src/amd/registers/gfx9.json \
14 $src_dir/src/amd/registers/gfx940.json \
15 $src_dir/src/amd/registers/gfx10.json \
16 $src_dir/src/amd/registers/gfx10-rsrc.json \
17 $src_dir/src/amd/registers/gfx11.json \
18 $src_dir/src/amd/registers/gfx115.json \
19 $src_dir/src/amd/registers/gfx11-rsrc.json \
20 $src_dir/src/amd/registers/gfx12.json \
21 $src_dir/src/amd/registers/gfx12-rsrc.json \
22 $src_dir/src/amd/registers/gfx103.json \
23 $src_dir/src/amd/registers/pkt3.json \
24 $src_dir/src/amd/registers/registers-manually-defined.json \
25 >$build_dir/src/amd/common/sid_tables.h &
27 $python3 \
28 $src_dir/src/amd/registers/makeregheader.py \
29 $src_dir/src/amd/registers/gfx6.json \
30 $src_dir/src/amd/registers/gfx7.json \
31 $src_dir/src/amd/registers/gfx8.json \
32 $src_dir/src/amd/registers/gfx81.json \
33 $src_dir/src/amd/registers/gfx9.json \
34 $src_dir/src/amd/registers/gfx940.json \
35 $src_dir/src/amd/registers/gfx10.json \
36 $src_dir/src/amd/registers/gfx10-rsrc.json \
37 $src_dir/src/amd/registers/gfx103.json \
38 $src_dir/src/amd/registers/gfx11.json \
39 $src_dir/src/amd/registers/gfx115.json \
40 $src_dir/src/amd/registers/gfx11-rsrc.json \
41 $src_dir/src/amd/registers/gfx12.json \
42 $src_dir/src/amd/registers/gfx12-rsrc.json \
43 $src_dir/src/amd/registers/pkt3.json \
44 $src_dir/src/amd/registers/registers-manually-defined.json \
45 --sort address \
46 --guard AMDGFXREGS_H \
47 >$build_dir/src/amd/common/amdgfxregs.h &
48 #===============================================================================
49 # aco
50 mkdir -p $build_dir/src/amd/compiler
52 export PYTHONPATH=$mako
53 $python3 $src_dir/src/amd/compiler/aco_opcodes_h.py \
54 >$build_dir/src/amd/compiler/aco_opcodes.h &
55 $python3 $src_dir/src/amd/compiler/aco_opcodes_cpp.py \
56 >$build_dir/src/amd/compiler/aco_opcodes.cpp &
57 $python3 $src_dir/src/amd/compiler/aco_builder_h.py \
58 >$build_dir/src/amd/compiler/aco_builder.h &
59 unset PYTHONPATH
60 #===============================================================================
61 # gallium driver
62 mkdir -p $build_dir/src/gallium/drivers/radeonsi
64 export PYTHONPATH=$mako
65 $python3 $src_dir/src/amd/common/gfx10_format_table.py \
66 $src_dir/src/util/format/u_format.csv \
67 $src_dir/src/amd/registers/gfx10-rsrc.json \
68 $src_dir/src/amd/registers/gfx11-rsrc.json \
69 $src_dir/src/amd/registers/gfx12-rsrc.json \
70 >$build_dir/src/gallium/drivers/radeonsi/gfx10_format_table.c &
71 unset PYTHONPATH
72 #-------------------------------------------------------------------------------
73 # do remove the radeonsi pipe loader fallback from (amdgpu/drm winsys) to
74 # (radeon/drm winsys)
75 mkdir -p $build_dir/src/gallium/drivers/radeonsi
76 cp -f $src_dir/src/gallium/drivers/radeonsi/si_pipe.c $build_dir/src/gallium/drivers/radeonsi/
77 patch -i $script_dir/si_pipe.c.patch $build_dir/src/gallium/drivers/radeonsi/si_pipe.c
79 # uvd block is crap, avoid any non-critical code related to it
80 cp -f $script_dir/si_uvd.c $build_dir/src/gallium/drivers/radeonsi/si_uvd.c
82 # not [generation&compile]-able out, trash work, again
83 cp -f $script_dir/si_tracepoints.h $build_dir/src/gallium/drivers/radeonsi
84 cp -f $script_dir/si_utrace.h $build_dir/src/gallium/drivers/radeonsi
85 #===============================================================================
86 echo "<--AMD GPU code generation done"