Sign in to follow this  

Visual Studio 2012 graphical debugger and offscreen buffers

Recommended Posts



Using the new VS2012 graphical debugger it is very easy to take a snapshot of a frame (eg. by pressing Print Screen), and getting the contents of the back buffer into the debugger where you can inspect the pixel history etc. However, I have several offscreen buffers the content of which I would like to inspect in the same way. My engine renders the scene something like:


1. Render all shadow maps

2. Render the view space normals and depth to a buffer for SSAO use

3. Calculate the SSAO

4. Render the main scene.


What if I wanted to inspect one of the shadow maps or the SSAO normal/depth map? How do I get those buffers into the debugger?



Share this post

Link to post
Share on other sites

The easiest way to do it is to pull up the Graphics Event List, and find the draw call(s) where you draw to that render target. When you select the draw call, the render target will pop up the graphics experiment view.


For finding draw calls it helps to wrap related sections in events using ID3DUserDefinedAnnotation*. That you can quickly see where you shadow pass is, or your SSAO pass, or whatever you're looking for. The arrows at the top of the event list will jump to the previous or next draw call, which is also handy.


*The old way to do this is to use D3DPERF_BeginEvent and D3DPERF_EndEvent, which were used for PIX. These still work with the VS 2012 debugger, but they require linking to d3d9.lib.

Edited by MJP

Share this post

Link to post
Share on other sites

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

Sign in to follow this