Jump to content
  • Advertisement
Sign in to follow this  
GuyWithBeard

Visual Studio 2012 graphical debugger and offscreen buffers

This topic is 1931 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

 

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?

 

Thanks!

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!