Significant overhead from d3d11 flush in 4k video playback

UNCONFIRMED
Unassigned

Status

()

Core
Graphics: Layers
UNCONFIRMED
3 years ago
3 years ago

People

(Reporter: Joe Olivas, Unassigned)

Tracking

({perf})

Trunk
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8537372 [details]
compositor_flush.png

While profiling 4k h.264 video playback, I have observed that the overhead of flush calls in the compositor are causing significant overhead of about 21% of the firefox.exe process. This may be a factor in the choppy playback.

http://dxr.mozilla.org/mozilla-central/source/gfx/layers/d3d11/CompositorD3D11.cpp#923

See the attached call stack from WPA showing the path to flush. Removing the flush shifts the available CPU resources to other work, but I'm not sure if this will have drawbacks elsewhere.

According to MSDN, these calls to Flush() shouldn't be necessary. http://msdn.microsoft.com/en-us/library/windows/desktop/ff476425%28v=vs.85%29.aspx

Updated

3 years ago
Component: General → Graphics: Layers
Product: Firefox → Core

Comment 1

3 years ago
Milan, radar'ing this with you...
Flags: needinfo?(milan)
Keywords: perf
We have been known to add Flush() to make things more robust, with more drivers, but I don't know about these ones in particular.  Bas would.
Flags: needinfo?(milan) → needinfo?(bas)
In most cases we shouldn't be flushing excessively, if we are, we can fix that, in general though, the amount of CPU time spent in 'flush' can be very misleading, as it's when most of the work actually happens anyway.
Flags: needinfo?(bas)
You need to log in before you can comment on or make changes to this bug.