Closed Bug 593450 Opened 14 years ago Closed 13 years ago

Excessive D3D9/D3D10 interop overhead

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: joe, Assigned: bas.schouten)

References

Details

Right now we have a lot of synchronization overhead with D3D9/D3D10 interop. Bas has an idea that will let us issue all our D2D drawing commands, then, using the stuff in bug 593268, wait on individual textures, which are more likely to be through the pipeline then.

Bas: What sort of overhead are we talking about here? You told me something like 50%, but we'd like some numbers.
The overhead is not describable in numbers. Individual testcases can be quantified, but there is no single number for this. The simple reason here is that it depends very strongly on what the testcase is doing. If a test case is strongly CPU bound, and whatever it does on the GPU are very short series of instructions (i.e. sampling a bunch of textures to places on the screen, etc.) the overhead is minimal. In this situation the time we spend waiting on the GPU to finish is minimal.

If a testcase is not bound by the CPU bound and executes a lot of complex instructions on the GPU, we could end up spending a lot of time waiting for the GPU to finish stuff.

Batching D2D executions in larger blocks will not completely solve this problem, but it should give some improvements in theory.
This is a theortical problem currently, though, with a theoretical solution.  Are there any example pages that show this problem?  If not, then I think we should ignore this.
Would FishIE be an example of this? I'm seeing quite a drop in performance (rev. 7aaf30721c48 which came before some other patches which killed performance)  with D3D9 accelerated layers and D2D enabled.
Here's an example:
http://paulrouget.com/tmp/fx4beta5/

GDI only: 12 fps
D2D only: 85 fps
D2D + D3D9: 41 fps
D3D9 + GDI: 18 fps
Hmm, interesting. I get opposite results for that test:

D2D only - 31 fps
D2D+D3D9 - 52 fps

Combination is faster there, but slower on FishIE. Tested twice just to make sure. I have an 8800GT with the latest drivers. 

With FishIE I see: 

D2D only - 60 fps
D2D+D3D9 - 37 fps
No longer blocks: d3d9-layers
I get this
Direct2D + D3D9 - 22fps
D2D only - 22fps
D3D9 - 12fps
GDI - 6fps

FishIE Tank 20 fishes
Direct2D + D3D9 - 20fps
Direct2D only - 24fps
D3D9 only - 17fps

If I switch to Basic Windows theme, and turn on only Direct2D I get 48fps on FishIE Tank.
I get 16fps with Direct2D and D3D9 using Basic theme.
Using just D3D9 on Basic theme I get 16fps.
Note that Direct2D has slowed, especially yesterday. (slowness first started with fixing clipping bug)

Mozilla/5.0 (Windows NT 6.1; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre ID:20100903210645

OS: Windows 7
GPU: Nvidia GeForce 8400GS on 258.96 drivers.

I'm sorry if this benchmark stuff is just a spam comment.
There's currently a bug on trunk that makes FishIE slow so they're not valid right now :(. See Bug 593361.
We no longer support D3D9 + D2D, this has been replaced by D3D10. Please re-open if this has been closed in error.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.