Jump to content
  • Advertisement
Sign in to follow this  
yk_cadcg

[dx10] readback resource data: asynchronize already done by driver?

This topic is 4059 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, for readback rendertarget texture in dx10, 2 steps are needed: CopyResource(defaultRendertargetTex -> stageTex); Map(stageTex->systemMemory). These 2 steps are easy to cause stall. In dx9, we have to do asynchronization manually. But new sdk says on "Copying and Accessing Resource Data" page that: "Direct3D 10 tries to remove this cost by making the ID3D10Device::CopyResource and ID3D10Device::CopySubresourceRegion methods asynchronous" Does this mean we can easily call Copyresource and Map without worrying the stall? Is the asynchronization managed by dx10's command-buffer queue? thanks!

Share this post


Link to post
Share on other sites
Advertisement
You still need to worry about stalls.

The copy itself will be added to the command queue but the map call is a synchronous operation. If you call map on a resource with outstanding IO operations like a copy you force the runtime to wait until all IO operations are done. Therefore you still should use multiple staging resources and use them round robin.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!