Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
d3d9_debugging [2014/09/13 23:49]
okias TGSI_PRINT_SANITY
d3d9_debugging [2015/11/26 02:39]
sarnex update to new wine
Line 3: Line 3:
 Compile both Mesa-3D and Wine with **CFLAGS** and **CXXFLAGS** set to debug. Compile both Mesa-3D and Wine with **CFLAGS** and **CXXFLAGS** set to debug.
  
-<code>CFLAGS="-Og -ggdb -pg -g -gdwarf-2 -gstrict-dwarf" CXXFLAGS="${CFLAGS}"</code>+<code>CFLAGS="-Og -ggdb -g -gdwarf-2 -gstrict-dwarf" CXXFLAGS="${CFLAGS}"</code>
  
-  * **-Og** is better than -O0 and disable optimalization which interfere with debug (gcc >= 4.8) +  * **-Og** is better than -O0 and disable optimalization which interferes with debug (gcc >= 4.8) 
-  * **-ggdb, -pg, -g** add debug informations to code+  * **-ggdb, -g** adds debug information to code
   * **-gdwarf-2, -gstrict-dwarf** limit DWARF version to 2. It's necessary for both, because wine support is limited to version 2.   * **-gdwarf-2, -gstrict-dwarf** limit DWARF version to 2. It's necessary for both, because wine support is limited to version 2.
 +  * you can also add **-pg** for profiling. Beware - may cause compilation issues.
  
 Also configure Mesa-3D with <code>--enable-debug</code> Also configure Mesa-3D with <code>--enable-debug</code>
  
-Make **sure**, you had **disabled striping debug symbols** if you using distribution package, ebuild or AUR.+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 **NINE_FF_DUMP=1** variable for dumping shader generated by fixed function (ff) 
 +  * the **TGSI_PRINT_SANITY=1** variable will precisely check TGSI and assert in case of errors 
 +  * the **D3D_ALWAYS_SOFTWARE=1** will run it on CPU instead of GPU... //extremly slow// 
 + 
 +when you comparing logs from ALWAYS_SOFTWARE, is handy to get rid of different addr for diff, with this helps you 
 + 
 +''sed -i -e "s/0x[0-f]*/0x0/g" logfile.log*''
  
-It depends on issue, you need to figure out, where is problem. 
-If it's in mesa, you'll need use 
-  * **NINE_DEBUG** variable, to know what D3D9 ST doing. Pass **NINE_DEBUG=help** to get all options. 
-  * **NINE_TGSI_DUMP=1** variable for dumping generated TGSI code. 
-  * **TGSI_PRINT_SANITY=1** will precisely check TGSI and assert in case of error 
 For wine, **WINEDEBUG**=+d3dadapter9,+d3d9 should be enough. For wine, **WINEDEBUG**=+d3dadapter9,+d3d9 should be enough.
  
-For surpasing annoying dbghelp warnings pass //WINEDEBUG=-dbghelp_dwarf//. 
  
-You maybe also interested in apitrace.+You also may be interested in apitrace.
  
 == APITrace == == APITrace ==
 {{ :apitrace.png?direct&500|}} {{ :apitrace.png?direct&500|}}
-  * For debugging Windows application you'll need APITrace compiled for Windows +  * **For apitrace to work, you need to use the no_external_dll branch of iXit/wine!** 
-  * Windows version is almost always required for replaying+  * For debugging Windows applications you'll need to use APITrace compiled for Windows 
 +  * The Windows version is almost always required for replaying
  
-  * [[https://github.com/apitrace/apitrace|Code on github]] +When uploading APITrace .trace file, please compress it with xz (best compression -> ''xz -9e your_app.trace''
-  * [[http://people.freedesktop.org/~jrfonseca/apitrace/|Build for Windows]]+  * **We have dedicated server space for APITrace files, contact sarnex or okias on IRC for more information.** 
 +  * [[https://github.com/apitrace/apitrace/wiki/WINE#windows-native|Wine HOWTO]] 
 +  * [[http://people.freedesktop.org/~jrfonseca/apitrace/apitrace-msvc-latest.7z|Build suitable for Wine]]