The GPU profiling feature discussed in my previous post includes a not-very-obvious customization mechanism:
- Graphics / Start Diagnostics, use Print Screen to capture frames, then return to Visual Studio
- Open up the folder that contains the resulting .vsglog capture file (eg. right-click on GraphicsExperiment1.vsglog and select Open Containing Folder)
- In this folder you will see a file named something like GraphicsExperiment1.vsglog.GraphicsFrameAnalysisParameters.xml
- Edit this XML to configure GPU performance analysis settings
- Now when you select the Frame Analysis tab and click on the Click here label, these new settings will be used
Yes yes, I know - we simply didn't have time to make a better UI for these options :-) Although most people will be fine with the defaults, we figured it was still worth exposing this XML file for more advanced users to tweak things to their preference.
Interesting settings to adjust:
. These elements control which experiments (changing viewport size, MSAA, filtering, reduced texture dimensions, etc.) are carried out. Deleting ones you don't need will speed up the analysis. If you only care about the baseline time per draw call, delete all but variant #0 for the fastest possible analysis (#0 is the baseline, which cannot be turned off). . This controls whether we will collect and display any hardware-specific counter values reported by the D3D driver (as exposed via the ID3D11Device::CreateCounter API and D3D11_COUNTER_DEVICE_DEPENDENT_0). The resulting data can be valuable for understanding GPU performance, but unfortunately not all drivers properly support this functionality, so by default we collect counters only on specific devices where we recognize the driver and know it will do the right thing. Hardware counters will be collected automatically on new Windows Phone 8.1 devices, but not on desktop PCs where we have no way to be sure what the driver will do if we call that API! If you are feeling brave, change the "Default" setting to "ForceEnable" and see what happens. On my dev PC the result is:[quote]
The analysis tool returned an error.
so I guess my driver does not properly support ID3D11Device::CreateCounter :-(http://blogs.msdn.com/aggbug.aspx?PostID=10517210