Export (0) Print
Expand All

Debugging DirectX Graphics

Visual Studio can help you debug graphics errors in your DirectX game or app. By using the Graphics Diagnostics tools, you can identify specific rendering errors and perform a focused examination of the factors that might contribute to them.

Graphics Diagnostics Overview

Introduces the Graphics Diagnostics workflow and tools.

Capturing Graphics Information

To use Graphics Diagnostics to examine a rendering problem in your app, you first record information about how the app uses DirectX. During the recording session, as your app runs normally, you capture (that is, select) the frames that you're interested in. The captures contain detailed information about how the frames are rendered. You can save the captured information as a graphics log document to examine later or share with other members of your team.

Graphics Log Document

To start the examination of a recorded graphics log, you use the Graphics Log document window to select a captured frame—or even a specific pixel—so that you can examine in detail the events (that is, the DirectX API calls) that affect it.

Graphics Frame Analysis

After you select a frame, you use Graphics Frame Analysis to examine and tune your rendering performance.

Graphics Event List

After you select a frame, you use the Graphics Event List to examine its events to determine whether they are related to the rendering problem.

Graphics Pipeline Stages

In the Graphics Pipeline Stages window, you investigate how the currently selected event is processed by each stage of the graphics pipeline so that you can identify where the rendering problem first appears. Examining the pipeline stages is particularly helpful when an object doesn't appear because of an incorrect transformation, or when one of the stages produces output that doesn't match what the next stage expects.

Graphics Event Call Stack

You use the Graphics Event Call Stack to examine the call stack of the currently selected event so that you can navigate to app code that's related to the rendering problem.

Graphics Pixel History

By using the Graphics Pixel History window to analyze how the currently selected pixel is affected by the events that influenced it, you can identify the event or combination of events that cause certain kinds of rendering problems. The pixel history is particularly helpful when an object is rendered incorrectly because pixel shader output is either incorrect or has been combined incorrectly with the frame buffer, or when an object doesn't even appear because its pixels have been discarded before they reach the frame buffer.

Graphics Object Table

You use the Graphics Object Table to examine the properties and contents of specific Direct3D objects and resources that are in effect for the currently selected event. The object table can help you determine the graphics device context that's active during an event, and examine the contents of graphics resources such as constant buffers, vertex buffers, and textures.

HLSL Debugger

To examine how the shader code for the currently selected event and graphics pipeline stage behaves, you use the HLSL Debugger to step through code, examine the contents of variables, and perform other typical debugging tasks. You can also use the HLSL debugger to examine compute shader code, regardless of whether the results are further processed by the graphics pipeline or are just read back by your app.

Graphics Diagnostics Examples

Several examples demonstrate how to use the Graphics Diagnostics tools together to diagnose different kinds of rendering problems.

Title

Description

Debugging in Visual Studio

Introduces the debugging functionality in Visual Studio.

DirectX Graphics and Gaming

Provides articles that discuss DirectX graphics technologies.

Show:
© 2014 Microsoft