summaryrefslogtreecommitdiff
path: root/README
blob: e301d0eaa1d649993e906a8407e8fa045f36b9aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
=== What ===

A giant pile of shaders from various apps, for whatever purpose.  In
particular, we use it to capture assembly output of the shader
compiler for analysis of regressions in compiler behavior.

Currently it supports Mesa's i965 and radeonsi drivers.

=== Capturing shaders ===
env MESA_GLSL=dump appname |& tee log
./split-to-files.py appname log
# clean up resulting files, as the parsing is just an assist, not actually
# complete.
$EDITOR shaders/appname/*

=== i965 Usage ===

=== Running shaders ===
./run shaders 2> err | tee new-run

# To run just a subset:
./run shaders/supertuxkart 2> err | tee new-run

Make sure to check the contents of 'err' after your run.

To compile shaders for an i965 PCI ID different from your system, pass

	-p {i965,g4x,ilk,snb,ivb,hsw,byt,bdw}

to run.

=== Analysis ===
./report.py old-run new-run


=== radeonsi Usage ===

=== Running shaders ===

ST_DEBUG=precompile R600_DEBUG=ps,vs,gs,precompile ./run shaders -1 2> new-run

-1 option for disabling multi-threading is required to avoid garbled shader dumps.

=== Analysis ===
./si-report.py old-run new-run


=== Dependencies ===
run requires some GNU C extensions, render nodes (/dev/dri/renderD128),
libepoxy, OpenMP, and Mesa configured with --with-egl-platforms=x11,drm

=== jemalloc ===
Since run compiles shaders in different threads, malloc/free locking overhead
from inside Mesa can be expensive. Preloading jemalloc can cut significant
amounts of time:

LD_PRELOAD=/usr/lib64/libjemalloc.so.1 ./run shaders 2> err | tee new-run