Graphics Diagnostics

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.

NoteNote

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

  1. In Visual Studio, on the menu bar, choose File, Open, File. The Open File dialog box appears.

  2. 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 Graphics Debugger toolbar in diagnostics mode

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.

Toolbar button

Description

Start Diagnostics

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.

Event List

Opens the Graphics Event List window.

Pixel History

Opens the Graphics Pixel History window.

Event Call Stack

Opens the Graphics Event Call Stack window.

Object Table

Opens the Graphics Object Table window.

Pipeline Stages

Opens the Graphics Pipeline Stages window.

Capture Frame

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.

The following illustration shows the tool windows that are used to inspect and debug captured frames. Each window exposes a different category of information that has been captured for the frame that's being inspected, and even for individual pixels in the frame.

All of the graphics debugger windows

Title

Description

Capturing Graphics Information

Describes how to capture graphics information so that you can analyze it in the Graphics Diagnostics tools.

Graphics Log Document

Describes how to use the graphics information in a graphics log document to identify visual artifacts that are caused by rendering problems.

Graphics Event List

Describes how to use the Graphics Event List to identify events that are related to rendering problems.

Graphics Pipeline Viewer

Describes how to use the Graphics Pipeline Stages window to identify the pipeline stage where a rendering problem first appears.

Graphics Event Call Stack

Describes how to use the Graphics Event Call Stack to locate app code that's related to rendering problems.

Graphics Pixel History

Describes how to use the Graphics Pixel History to examine the details of events that affected a pixel's final color.

Graphics Object Table

Describes how to use the Graphics Object Table to view the details of objects that are related to rendering problems.

HLSL Debugging

Describes how to use the HLSL Debugger.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft