Differences
This shows you the differences between two versions of the page.
d3d9_debugging [2014/09/25 22:27] sarnex typo |
d3d9_debugging [2022/07/11 10:41] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to debug D3D9 ====== | ||
- | Compile both Mesa-3D and Wine with **CFLAGS** and **CXXFLAGS** set to debug. | ||
- | |||
- | < | ||
- | |||
- | * **-Og** is better than -O0 and disable optimalization which interferes with debug (gcc >= 4.8) | ||
- | * **-ggdb, -pg, -g** adds debug information to code | ||
- | * **-gdwarf-2, | ||
- | |||
- | Also configure Mesa-3D with < | ||
- | |||
- | Make **sure**, you have **disabled striping debug symbols** if you are using distribution packages, ebuild or AUR. | ||
- | |||
- | A problem can be located in either wine or Mesa. | ||
- | If it's in mesa, you'll need to use | ||
- | * the **NINE_DEBUG** variable, to know what the D3D9 ST is doing. Pass **NINE_DEBUG=help** to get all options. | ||
- | * the **NINE_TGSI_DUMP=1** variable for dumping generated TGSI code. | ||
- | * the **TGSI_PRINT_SANITY=1** variable will precisely check TGSI and assert in case of errors | ||
- | For wine, **WINEDEBUG**=+d3dadapter9, | ||
- | |||
- | To get rid of annoying dbghelp warnings pass // | ||
- | |||
- | You also may be interested in apitrace. | ||
- | |||
- | == APITrace == | ||
- | {{ : | ||
- | * For debugging Windows applications you'll need to use APITrace compiled for Windows | ||
- | * The Windows version is almost always required for replaying | ||
- | |||
- | * [[https:// | ||
- | * [[http:// |