This document describes the Visual Studio Graphics Diagnostics tools, which you can use to diagnose common rendering problems in DirectX graphics applications. Graphics Diagnostics supports Direct3D 10, Direct3D 10.1, Direct3D 11, and Direct3D 11.1, and provides limited support for Direct2D. It does not support earlier versions of Direct3D, DirectDraw, or other graphics APIs.
You can use Graphics Diagnostics to:
Capture rendered frames for later examination.
Browse and select captured frames for in-depth inspection and analysis.
View Direct3D events that occurred during a frame, and their effects on the app.
View 3-D mesh data or render target data after each pipeline stage.
Jump to the source code location of a particular Direct3D event.
Discover which Direct3D events contributed to the color of a specific pixel in each frame.
Examine Direct3D objects such as device state, buffers, meshes, and textures.
During a Graphics Diagnostics capture session, a graphics log is created to record events, resources, and graphics state. Later, you can use the graphics log to recreate and examine captured frames in detail, without having to replicate the environment that was used to capture them. You can load multiple graphics log (.vsglog) files at the same time to compare data and rendering results. Because these files are self-contained, you can share them with other developers. For more information, see Debugging DirectX Graphics.
Because some Windows 8 APIs are not available in Windows 7 or Windows Vista, apps that use these APIs can't be recreated on Windows 7 or Windows Vista.
To open a graphics log (vsglog) file
In Visual Studio, on the menu bar, choose File, Open, File. The Open File dialog box appears.
Specify a graphics log (.vsglog) file to open, and then choose the Open button.
You can use the Graphics Diagnostics toolbar to access tools that help you capture data to a graphics log and then diagnose and debug problems that were captured in the log.
Here's the Graphics Diagnostics toolbar:
The following table describes the items on the Graphics Diagnostics toolbar. The items are listed in the order in which they appear from left to right.
Starts a Direct3D app with support for Graphics Diagnostics enabled. When you start an app this way, you can use Graphics Diagnostics to capture detailed information about individual frames in the running app.
Opens the Graphics Event List window.
Opens the Graphics Pixel History window.
Event Call Stack
Opens the Graphics Event Call Stack window.
Opens the Graphics Object Table window.
Opens the Graphics Pipeline Stages window.
Captures a frame from a running Direct3D app that was started by using the Start Diagnostics button. The Capture Frame button is enabled only when a Graphics Diagnostics-enabled app is running.
The DirectX control panel is a component of DirectX that you can use to change the way that DirectX behaves—for example, you can enable the debug version of the DirectX runtime components, select the kind of debug messages that are reported, and disallow certain graphics hardware capabilities from being used to emulate less-capable hardware. This level of control over DirectX can help you debug and test your DirectX app. You can access the DirectX control panel from Visual Studio.
To open the DirectX control panel
On the menu bar, choose Debug, Graphics, DirectX Control Panel.
Describes how to capture graphics information so that you can analyze it in the Graphics Diagnostics tools.
Describes how to use the graphics information in a graphics log document to identify visual artifacts that are caused by rendering problems.
Describes how to use the Graphics Event List to identify events that are related to rendering problems.
Describes how to use the Graphics Pipeline Stages window to identify the pipeline stage where a rendering problem first appears.
Describes how to use the Graphics Event Call Stack to locate app code that's related to rendering problems.
Describes how to use the Graphics Pixel History to examine the details of events that affected a pixel's final color.
Describes how to use the Graphics Object Table to view the details of objects that are related to rendering problems.
Describes how to use the HLSL Debugger.