Over the last couple of weeks we've been discussing within the Graphics team whether to implement a D3D10 layers backend. Over the last week I've created this backend which is now fully functional and passes all tests. Our suggestion is to switch our Direct2D users to the D3D10 layers backend post-Beta 7. The rationale for introducing D3D10 layers follows:
Over the course of our testing with Direct3D 9 layers, we concluded that there were several issues when combining it with Direct2D (which is based around Direct3D 10):
- Interop is complicated and quite untested(sometimes it seems like there's one user in the universe, being us), running into poorly documented features and extremely hard to debug driver issues
- Synchronization overhead causes significant performance issues
We have discussed these issues within the Graphics team and believe that the best way to deliver stability, and get on par with IE9 on performance, would be to use a Direct3D 10 layers backend. This has the following advantages:
- No interop synchronisation overhead
- Behavior is much better documented
- Ability to take advantage of some of D3D10 extra features
- Code from D3D9 is largely analogous, bug diagnosis in one backend will usually benefit the other
- Mitigate Ts regression from D3D9 initialization on Win Vista/7
The downsides:
- Some time taken that could be spent improving D3D9 layers is used for improving D3D10 layers
- An extra layers backend to maintain
- Adding some new code relatively late in the game, even though it's largely analogous to D3D9 layers
We believe that the D3D10 backend is a necessity, particularly from a performance standpoint. There's a lot of eyes on graphics performance at the moment, and by using D3D9 for compositing we put ourselves at a fundamental performance disadvantage relative to IE9.
During preliminary tests of the D3D10 layers backend the following test results are already looking promising, there's significant Tp4, Tp4 private bytes, Tp4 working set and Ts(30-40 ms) improvements.
We'd like to know if anyone feels this is a terribly bad idea.
Bas
Any plans for adding D3D11 layers?
That was already (pretty much) answered in this thread over in dev.platform:
http://groups.google.co.uk/group/mozilla.dev.platform/msg/97a0ccbe0029f77b?hl=en
Michael
First off, I'm not watching that newsgroup. And second, I was asking
for plans, not technical details!
There are no plans, and it's not going to give us any benefits on
computers capable of DirectX 11 until Direct2D is implemented on top of
DirectX 11. Otherwise, using DirectX 11 will just cause a different
version of the slowdowns we saw caused by DirectX 9 interoperating with
DirectX 10.
Joe