glretrace application.trace
-Pass the `-sb` option to use a single buffered visual. Pass `--help` to
+Pass the `--sb` option to use a single buffered visual. Pass `--help` to
`glretrace` for more options.
EGL traces must be replayed with `eglretrace` instead of `glretrace`.
extension.
-For Direct3D applications you can follow the same procedure used for
-[instrumenting an application for PIX](http://technet.microsoft.com/en-us/query/ee417250)
+For Direct3D applications you can follow the standard procedure for
+[adding user defined events to Visual Studio Graphics Debugger / PIX](http://msdn.microsoft.com/en-us/library/vstudio/hh873200.aspx):
+
+- `D3DPERF_BeginEvent`, `D3DPERF_EndEvent`, and `D3DPERF_SetMarker` for D3D9 applications.
+
+- `ID3DUserDefinedAnnotation::BeginEvent`,
+ `ID3DUserDefinedAnnotation::EndEvent`, and
+ `ID3DUserDefinedAnnotation::SetMarker` for D3D11.1 applications.
Dump GL state at a particular call
You can perform gpu and cpu profiling with the command line options:
- * `-pgpu` record gpu times for frames and draw calls.
+ * `--pgpu` record gpu times for frames and draw calls.
- * `-pcpu` record cpu times for frames and draw calls.
+ * `--pcpu` record cpu times for frames and draw calls.
- * `-ppd` record pixels drawn for each draw call.
+ * `--ppd` record pixels drawn for each draw call.
The results from this can then be read by hand or analysed with a script.
For example, to record all profiling data and utilise the per shader script:
- ./glretrace -pgpu -pcpu -ppd foo.trace | ./scripts/profileshader.py
+ ./glretrace --pgpu --pcpu --ppd foo.trace | ./scripts/profileshader.py
Advanced usage for OpenGL implementors