summaryrefslogtreecommitdiff
path: root/README
blob: 4e099370963dc020a202c64ac1154513b7c2b956 (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
=== 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 driver only.

=== 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/*

=== 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

=== 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