Tuesday, July 22, 2008

Parallel Rendering with DirectX Command Buffers

I'm at Microsoft XNA Gamefest 2008 presenting Practical Parallel Rendering with DirectX 9 and 10. You can find the slides and open source code. Bo Wilson helped out on the design and prototype.

The short form of the presentation is:
  • We made a command buffer (or "display list") format for DirectX 9.
  • Multiple CPUs can record command buffers simultaneously.
  • One main thread that owns the device can playback command buffers.
  • For many games, this provides an effective way to improve performance with minimal changes to existing render code architecture, they can "simply" swap in one of our special recording devices.
  • The code is open source.

7 comments:

  1. This is great stuff; I like the point that the command buffers themselves are memory coherent. Also love the very liberal license.

    ReplyDelete
  2. I understand that your work is based on DirectX 9.

    However how can it be extended to OpenGL ? Is it worth creating own command buffers that would feed the OpenGL api compared to OpenGL display lists ? Or, are OpenGL display lists somehow deprecated in favor of VBO ?

    ReplyDelete
  3. Thanks Eric.

    Guardian, it's been too long since I've used OpenGL. Display lists may be similar - or they could be better if the GPU drivers can optimize them. However, I don't know if they are threadsafe. Without thread safety, there is no multi-core benefit.

    ReplyDelete
  4. sir, I'm wondering if parallel rendering works on X360?
    My company is licensed Gamebryo developer of PC and X360, do these Gamebryo platforms support parallel rendering naturally?

    thanks for your great sharing~ :)

    ReplyDelete
  5. Is this source code still available anywhere? The emergent link appears to be dead. DirectX9 still seems a viable platform especially if you want to support XP. I'm hoping the code is available. Thanks.

    ReplyDelete
    Replies
    1. I've posted a copy of the code here http://www.scheib.net/work/emergent/DirectXCommandBufferLib-v1.zip

      Delete
    2. Thanks. Hopefully I can get out Dirext9 WinXP version running a bit faster with this. I wish we could just move on to Dx11 Win7. Thanks again!

      Delete