Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Customizing Visual Studio GPU profiling

Sign in to follow this  


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:
    (default 5). This controls how many times each measurement is repeated, which is done to measure standard deviation and be able to tell which measurements result from noise other than the actual thing we are trying to measure. Turn it down to 1, and analysis will run much faster but you will no longer be able to tell if some results are due to random noise. Increase it, and you will get more accurate results even if the underlying data is noisy, but you might have to wait a while (perhaps leave such an analysis running while you go to lunch).
    . 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

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!