Jump to content
  • Advertisement
Sign in to follow this  
gunning

Wanted: Performance Tips for Reading Back Render Target Data

This topic is 3938 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

A graphics algorithm I am using requires that I render scene depth information to a render target and then read it back to the CPU. That's all great, but it drops my framerate dramatically. In fact, my framerate goes from 2000+ to around 100. This is understandable since the CPU must flush the graphics commands, the GPU must respond to it (possibly having to render the scene), and then the CPU must wait for the texture data. My question is: What tricks can I use to speed this up? I've currently tried reducing the dimensions of the render target by half (currently 1024x768), and that boosts the framerate to about 300, but I haven't determined if my graphics algorithm will still work with a reduced render target and it's not an optimization I'm able to make right now. So ... experts ... any advice?

Share this post


Link to post
Share on other sites
Advertisement
Can't you do this through a shader? Without really leavning the shader, avoiding roundtripping between CPU and GPU or DirectX and Shaders...

Share this post


Link to post
Share on other sites
Quote:
Original post by leidegren
Can't you do this through a shader? Without really leavning the shader, avoiding roundtripping between CPU and GPU or DirectX and Shaders...
Unfortunately, no. The algorithm I am using requires depth values to generate new geometry.

Share this post


Link to post
Share on other sites
One thing that might speed it up a bit is to double buffer it - while the GPU is drawing to one buffer you read from the other one with the CPU.

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!