Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

DX11 D3D11 Multithreaded Renderer Device Context Question

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

When I create a multithreaded renderer for DX11 applications, do I create a separate device context for each individual thread? If I had 4 threads, each thread would have its own device context. If Yes, how do I create more than 1 device context using D3D11CreateDeviceAndSwapChain?

Thanks

Jack

Share this post


Link to post
Share on other sites
Advertisement

Just some other things to consider also having been through this multi threaded process in direct x 11:

  • Device support for deferred contexts, on older AMD hardware this doesn't exist so the deferred context will be emulated.  So you may get an improvement in performance, but as usual depending on hardware configuration.  Also,  multithreaded resource creation I found was equally important.
  • Also read up on command lists as part of your deferred contexts (i assume you have anyway :))
  • When using Deferred contexts for multi-threaded rendering, the command list your thread creates needs to be executed in the main thread against the immediate context.
  • Each deferred context you will need to set up render target, blend state, rasterization viewport etc each frames.

All of that im sure if covered on a myriad of tutorials, these are the things that stick out when doing multi-threaded.

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.

GameDev.net 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!