Commit b83f1c26 authored by Jason Ekstrand's avatar Jason Ekstrand

markdownify the README

Reviewed-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
parent cf466df6
=== What ===
Shader-db: A collection of shaders for offline analysis
=======================================================
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.
Shader-db is 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 ===
# create the directory for shader files
mkdir dirpath
## Capturing shaders
# write all shaders that are loaded by "executable" to the directory
MESA_SHADER_CAPTURE_PATH=dirpath executable
Create the directory for shader files
# "fdupes" can be used to remove duplicates
$ mkdir dirpath
=== Compiling ===
Write all shaders that are loaded by "executable" to the directory
$ MESA_SHADER_CAPTURE_PATH=<dirpath> <executable>
Use `fdupes` can be used to remove duplicates
$ fdupes -d <dirpath>
## Compiling
Some libraries are required when building. See section "Dependencies" below.
To build the binary, do:
make
=== i965 Usage ===
## i965 Usage
### Running shaders
=== Running shaders ===
$ ./run shaders 2> err | tee new-run
./run shaders 2> err | tee new-run
### To run just a subset:
# To run just a subset:
./run shaders/supertuxkart 2> err | tee new-run
$ ./run shaders/supertuxkart 2> err | tee new-run
Make sure to check the contents of 'err' after your run.
......@@ -37,51 +45,59 @@ To compile shaders for an i965 PCI ID different from your system, pass
-p {i965,g4x,ilk,snb,ivb,hsw,byt,bdw}
to run.
to `run`.
=== Analysis ===
### Analysis
./report.py old-run new-run
$ ./report.py old-run new-run
=== radeonsi Usage ===
=== Running shaders ===
## radeonsi Usage
./run shaders > new-run 2> /dev/null
### Running shaders
Note that a debug mesa build required (ie. --enable-debug)
$ ./run shaders > new-run 2> /dev/null
=== Analysis ===
Note that a debug mesa build required (ie. `--enable-debug`)
### Analysis
./si-report.py old-run new-run
=== freedreno Usage ===
=== Running shaders ===
## freedreno Usage
### Running shaders
$ ./run -1 shaders 2> new-run
./run -1 shaders 2> new-run
Note that a debug mesa build required (ie. `--enable-debug`)
Note that a debug mesa build required (ie. --enable-debug)
`-1` option for disabling multi-threading is required to avoid garbled shader dumps.
-1 option for disabling multi-threading is required to avoid garbled shader dumps.
=== Analysis ===
### Analysis
./fd-report.py old-run new-run
=== Dependencies ===
## Dependencies
run requires some GNU C extensions, render nodes (/dev/dri/renderD128),
libepoxy, OpenMP, and Mesa configured with --with-egl-platforms=x11,drm
libepoxy, OpenMP, and Mesa configured with `--with-egl-platforms=x11,drm`
=== jemalloc ===
## 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
$ LD_PRELOAD=/usr/lib64/libjemalloc.so.1 ./run shaders 2> err | tee new-run
=== Deprecated ===
## Deprecated
run.py is obsolete. Use the 'run' binary instead.
`run.py` is obsolete. Use the `run` binary instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment