Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 1 (3 posts)

Direct3D11 & Direct3D11.1 and the parallel pattern - a general question

Last post 12/10/2012 8:18 PM by JujiPL. 2 replies.
  • 12/8/2012 2:39 PM

    Direct3D11 & Direct3D11.1 and the parallel pattern - a general question

    Hi!

    Could someone answer my question, please?

    I am developing a program with Direct3D11.1 support.
    The rendering API is being called in the main thread only.
    These operations are simple, DirectXMath, the stack of meshes, the rendering of three shadow maps and one world 3D.
    The cost of such job, is the GPU processing. The CPU rather is not used too much.

    The question is:
    Will be an improvement an implementation a few contexts in their threads.
    I am not sure, that I should refactor the application into the parallel pattern.

    Thank you very much.
    Włodzimierz O. Kubera
  • 12/10/2012 7:23 PM In reply to

    Re: Direct3D11 & Direct3D11.1 and the parallel pattern - a general question

    Answer
    Reply Quote
    Generally speaking with Direct3D 11.x the simplest and most effective method for multi-threading your application is to put asset loading on another thread. Calls to ID3D11Device and ID3D11Device1 are thread-safe, so this is often pretty easy to achieve particularly when using 'initData' style resource loading. To do "Map" style loading, it's a little more complicated and really best done with efficient use of the immediate context and some smart synchronization.

    Generally speaking, deferred contexts help optimize CPU-heavy draw operations. It's not going to do anything to help improve GPU-bound processing since the work still has to get done on the GPU either way.
  • 12/10/2012 8:18 PM In reply to

    Re: Direct3D11 & Direct3D11.1 and the parallel pattern - a general question

    I highly appreciate the answer.
Page 1 of 1 (3 posts) Previous Discussion Next Discussion