summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Vanik <ben.vanik@gmail.com>2015-06-10 19:19:55 -0700
committerBen Vanik <ben.vanik@gmail.com>2015-06-10 19:20:14 -0700
commitcabf9d626164c53566358770dee9d61bc3472954 (patch)
tree4be57783eabe4ddcc959c1288e3e6124929118f1 /docs
parent6be12a61c1517f171445292d03dd2e23d36a2ea2 (diff)
Adding some GPU docs and creating output directories automatically.
Diffstat (limited to 'docs')
-rw-r--r--docs/gpu.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/docs/gpu.md b/docs/gpu.md
index 00fa701c7..97a0fa8fe 100644
--- a/docs/gpu.md
+++ b/docs/gpu.md
@@ -1,5 +1,57 @@
# GPU Documentation
+## Options
+
+### General
+
+See the top of [src/xenia/gpu/gpu.cc](https://github.com/benvanik/xenia/blob/master/src/xenia/gpu/gpu.cc).
+
+`--vsync=false` will attempt to render the game as fast as possible instead of
+waiting for a fixed 60hz timer.
+
+### OpenGL
+
+See the top of [src/xenia/gpu/gl4/gl4_gpu.cc](https://github.com/benvanik/xenia/blob/master/src/xenia/gpu/gl4/gl4_gpu.cc).
+
+Buggy GL implementations can benefit from `--thread_safe_gl`.
+
+## Tools
+
+### Shader Dumps
+
+Adding `--dump_shaders=path/` will write all translated shaders to the given
+path with names based on input hash (so they'll be stable across runs).
+
+### xe-gpu-trace-viewer
+
+To quickly iterate on graphical issues, xenia can dump frames (or sequences of
+frames) while running that can be opened and inspected in a separate app.
+
+The basic workflow is:
+
+1. Capture the frame in game (using F4) or a stream of frames.
+2. Add the file path to the xe-gpu-trace-viewer Debugging command line in
+Visual Studio.
+3. Launch xe-gpu-trace-viewer.
+4. Poke around, find issues, etc.
+5. Modify code.
+6. Build and relaunch.
+7. Goto 4.
+
+#### Capturing Frames
+
+First, specify a path to capture traces to with
+`--trace_gpu_prefix=path/file_prefix_`. All files will have a randomish name
+based on that.
+
+When running xenia.exe you can hit F4 at any time to capture the next frame the
+game tries to draw (up until a VdSwap call). The file can be used immediately.
+
+#### Capturing Sequences
+
+Passing `--trace_gpu_stream` will write all frames rendered to a file, allowing
+you to seek through them in the trace viewer. These files will get large.
+
## References
### Command Buffer/Registers