Visual Studio Graphics Frame Analysis in action!

Visual Studio Graphics Frame Analysis in action!

Rate This
  • Comments 10

As mentioned in this blog post a few weeks ago, one of the features we're adding in Visual Studio 2013 Update 2 (Download Update 2 RC) is Graphics Frame Analysis. This feature can be useful to help identify performance bottlenecks in your DirectX applications.

How to use it?

To start, launch your DirectX app with Graphics Diagnostics through menu DEBUG->Graphics->Start Diagnostics or use shortcut "Alt+F5". Once the app is running, you can capture frames from the app by pressing "PrintScreen" key in the app or using the capture button in the Graphics Toolbar in VS (see red circle in the screenshot below)

Switch back to VS, you should be able to see a frame captured in Frame List. At this point, you can continue to capture more frames, or start analyzing the frame in VS while the app is still running, or stop debugging and analyze the frame in VS. Use the Graphics toolbar to bring up various tool windows to inspect events, objects, pipeline stages, pixel history and call stack to diagnose rendering issues. I'm not going to go into details about how to use the feature to identify rendering problems in this blog post because we're going to focus on Frame Analysis today. But if you are interested, we have document on MSDN to walk you through the feature.

Now onto Frame Analysis! To generate an analysis report for captured frame, switch to the Frame Analysis tab in the vsglog document. (see red circle in the screenshot below)

Then click the link in the document to start analysis. The analysis will collect GPU timing for each DirectX draw call and GPU performance counters if running on Windows Phone 8.1 devices, and it will perform a set of pre-defined experiments that provides insights into how different techniques can impact the performance of your app. Since the data is collected from GPU, the results can vary on different hardware. You can change Playback Machine (to a remote machine, or a tablet, or a Phone) for the analysis to perform on the specific hardware you want to optimize for.

How to read the report?

Once analysis is finished, a report will be presented inside VS. MSDN document explains how to interpret the data in the report. Or read Shawn Hargreaves's blog post in which he talks about how to read the data. Or go watch the Channel9 video nicely done by Adrian Tsai, in which Adrian walked through the features in greater details with a really cool sample project.

When can I use it?

Graphics Frame Analysis feature supports Windows apps, desktop apps and Windows Phone apps that run on Windows Phone 8.1 device (Window Phone 8.0 devices don't have the necessary driver support for this feature).

Download Visual Studio 2013 Update 2 RC, try it out and let us know what you think. J

  • Will this help with our WPF content (which uses DX as you know)?

  • Or does it need Pro, desktop.

    Again since it did not make it first time.

  • @jps, unfortunately no. :( The VS graphics diagnostics feature supports DX10 and DX11 but WPF uses DX9..

    @ Is this is in X?

    This feature is in VS 2013 Express for Windows, Professional and above SKUs. Express for Windows supports running this feature on store and phone apps as well as any executables. To work with executables, go to File->Open->Project/Solution and pick the exe file. Then you will be able to run graphics diagnostics feature on this exe.

  • AFAIK, MonoGame uses SharpDX (which is DX11). Will this work for it?

  • @  What about MonoGame and SharpDX?

    Not a main scenario that we've tested, but this should work with MonoGame and SharpDX apps. (At least the SharpDX app I tried does work :)) You will still get a list of DX calls, but those won't be mapped back to the SharpDX or MonoGame API calls. If you see any issues, let me know...

  • creating the d3d and Pointer in C # and offsets??

  • @Edu, I'm not understanding your question very well...Can you give me a bit more context on what your comment is about?

  • Does this work with OpenGL and if not, is there any OpenGL support planned in the future?

  • @Johnathan

    This is C++ support all over again. What microsoft do not own will get the backseat priority.

    Just look at how microsoft allocate developers.

    More lies, bullshit, anti-consumer exploitation, intentional delays, etc.

    You can't trust an american company.

  • @Johnathan, this feature currently only supports DirectX. We currently don't have plan to support OpenGL.

Page 1 of 1 (10 items)