mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-aeba937762a0238ef22abb38adc31ce3aad4ab83 / contrib / generators_amd.sh
blob9b4fee652b505ffb4c946d77f1a64877e8afde96
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:$yaml
65 $python3 $src_dir/src/amd/common/gfx10_format_table.py \
66 $src_dir/src/util/format/u_format.yaml \
67 $src_dir/src/amd/registers/gfx10-rsrc.json \
68 $src_dir/src/amd/registers/gfx11-rsrc.json \
69 >$build_dir/src/gallium/drivers/radeonsi/gfx10_format_table.c &
70 unset PYTHONPATH
71 #-------------------------------------------------------------------------------
72 # do remove the radeonsi pipe loader fallback from (amdgpu/drm winsys) to
73 # (radeon/drm winsys)
74 mkdir -p $build_dir/src/gallium/drivers/radeonsi
75 cp -f $src_dir/src/gallium/drivers/radeonsi/si_pipe.c $build_dir/src/gallium/drivers/radeonsi/
76 patch -i $script_dir/si_pipe.c.patch $build_dir/src/gallium/drivers/radeonsi/si_pipe.c
78 # uvd block is crap, avoid any non-critical code related to it
79 cp -f $script_dir/si_uvd.c $build_dir/src/gallium/drivers/radeonsi/si_uvd.c
81 # not [generation&compile]-able out, trash work, again
82 cp -f $script_dir/si_tracepoints.h $build_dir/src/gallium/drivers/radeonsi
83 cp -f $script_dir/si_utrace.h $build_dir/src/gallium/drivers/radeonsi
84 #===============================================================================
85 echo "<--AMD GPU code generation done"