Advertisement Jump to content
Sign in to follow this  

Resource sharing

This topic is 1772 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 guys


Anyone got an example of sharing textures between 2 devices on D3D10? Im unsure of how the OpenSharedResource method works.




Share this post

Link to post
Share on other sites

1. Create a texture resource on device A, using the D3D10_RESOURCE_MISC_SHARED flag for the MiscFlags member

2. Use QueryInterface to get the IDXGIResource pointer for the new texture

3. Call GetSharedHandle to get the shared handle for your resource

4. On device B, call OpenSharedResource and pass the handle that you got from GetSharedHandle. For the REFIID use __uuidof(ID3D10Texture2D).


Note that in D3D10 you had to call ID3D10Device::Flush after updating your texture on one device before the other device could use it, since there's no other synchronization primitives. In D3D10.1 and D3D11 you can use D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX, and then use IDXGIKeyedMutex to sync between the two devices.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!