freedreno: Add afuc regression test
[mesa.git] / src / freedreno / .gitlab-ci / genoutput.sh
1 #!/bin/bash
2
3 # This file contains all of the cmdlines used to generate output
4 # for the test step in the CI pipeline. It can also be used to
5 # regenerate reference output
6
7 set -x
8 set -e
9
10 # input/output directories:
11 base=src/freedreno
12 traces=$base/.gitlab-ci/traces
13 reference=$base/.gitlab-ci/reference
14 output=$base/.gitlab-ci/out
15
16 # use the --update arg to update reference output:
17 if [ "$1" = "--update" ]; then
18 output=$reference
19 fi
20
21 mkdir -p $output
22
23 # binary locations:
24 cffdump=./install/bin/cffdump
25 crashdec=./install/bin/crashdec
26 asm=./install/bin/afuc-asm
27 disasm=./install/bin/afuc-disasm
28
29 # helper to filter out paths that can change depending on
30 # who is building:
31 basepath=`dirname $0`
32 basepath=`dirname $basepath`
33 basepath=`pwd $basepath`
34 filter() {
35 out=$1
36 grep -vF "$basepath" > $out
37 }
38
39 #
40 # The Tests:
41 #
42
43 # dump only a single frame, and single tile pass, to keep the
44 # reference output size managable
45 $cffdump --frame 0 --once $traces/fd-clouds.rd.gz | filter $output/fd-clouds.log
46 $cffdump --frame 0 --once $traces/es2gears-a320.rd.gz | filter $output/es2gears-a320.log
47 $cffdump --frame 1 --once $traces/glxgears-a420.rd.gz | filter $output/glxgears-a420.log
48 $cffdump --once $traces/dEQP-GLES2.functional.texture.specification.basic_teximage2d.rgba16f_2d.rd.gz | filter $output/dEQP-GLES2.functional.texture.specification.basic_teximage2d.rgba16f_2d.log
49 $cffdump --frame 0 --once $traces/dEQP-VK.draw.indirect_draw.indexed.indirect_draw_count.triangle_list.rd.gz | filter $output/dEQP-VK.draw.indirect_draw.indexed.indirect_draw_count.triangle_list.log
50
51 # test a lua script to ensure we don't break scripting API:
52 $cffdump --script $base/decode/scripts/parse-submits.lua $traces/shadow.rd.gz | filter $output/shadow.log
53
54 $crashdec -sf $traces/crash.devcore | filter $output/crash.log
55
56 $asm -g 6 $traces/afuc_test.asm $output/afuc_test.fw
57 $disasm -g 6 $reference/afuc_test.fw | filter $output/afuc_test.asm