Blend demo uses 60% GPU
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
Attachments
(2 files)
Use WR
Go to https://themaninblue.com/experiment/BlobbyBlendMode/
Monitor the GPU usage via either GPU-Z , or the builtin GPU usage in Windows Task Manager.
Nightly uses 60% GPU. Chrome uses 20%-30% GPU.
ER: Less GPU use, if possible.
Profile : https://share.firefox.dev/3hvvbkg
Reporter | ||
Comment 1•5 years ago
|
||
Reporter | ||
Comment 2•5 years ago
|
||
Feel free to dupe this to other bugs
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Most of the shader GPU time is reported to be in B_MixBlend
and B_Blend
. This appears to be another instance of the slow mix-blend implementation we currently have with WR. This should be resolved by the ongoing work in 1684781, which is unblocked now due to the render task graph patches all landing.
Comment 4•5 years ago
|
||
I did some profiling of this with the recent mix-blend work - it only takes about 2.8ms GPU time on my high-end AMD 5700 GPU at 4k, but it's probably much slower on an integrated GPU.
Do you know if the GPU measurement in comment 1 on Chrome was using GPU rasterization? Or is it using the GPU to composite, but actually rasterizing those tiles on background CPU cores?
One fix in the pipeline for this is to optimize the mix-blend shader (https://bugzilla.mozilla.org/show_bug.cgi?id=1690401). There are also some other optimizations we can apply to the shader, such as specializing the multiply
mode since it's the most commonly used one, rather than having it in an uber-shader.
Un-assigning myself for now, since this doesn't appear to be related to the scrolling / background mix-blend optimizations I'm working on, but just a stress test of the mix-blend shader performance, and I'm not working on that specific part right now.
Updated•5 years ago
|
Reporter | ||
Comment 5•5 years ago
|
||
(In reply to Glenn Watson [:gw] from comment #4)
Do you know if the GPU measurement in comment 1 on Chrome was using GPU rasterization? Or is it using the GPU to composite, but actually rasterizing those tiles on background CPU cores?
I have no idea what Chrome is doing here :)
I will be happy to check, if you can guide me how/what to do.
Comment 6•4 years ago
|
||
According to [1], using one of the following methods should force GPU rasterization:
To use the experimental hardware rasterizer on all pages, regardless of device and content: --force-gpu-rasterization or chrome://flags/#enable-gpu-rasterization
[1] https://www.chromium.org/developers/design-documents/chromium-graphics/how-to-get-gpu-rasterization
Reporter | ||
Comment 7•4 years ago
|
||
(In reply to Glenn Watson [:gw] from comment #6)
According to [1], using one of the following methods should force GPU rasterization:
To use the experimental hardware rasterizer on all pages, regardless of device and content: --force-gpu-rasterization or chrome://flags/#enable-gpu-rasterization
[1] https://www.chromium.org/developers/design-documents/chromium-graphics/how-to-get-gpu-rasterization
force enabling chrome://flags/#enable-gpu-rasterization
CPU : 1 core
GPU: 25%-30%
These readings are the same as with the flag chrome://flags/#enable-gpu-rasterization se to default.
Comment 8•3 years ago
|
||
Does this seem any better now? (it runs well on my machine, but that has a quite decent AMD GPU in it).
Reporter | ||
Comment 9•3 years ago
|
||
Reporter | ||
Comment 10•3 years ago
|
||
On my faster machine, with the original page:
Nightly: 30% GPU
Chrome: 20% GPU
With the stress-test testcase:
Nightly:90%
Chrome: 80%
@gw: I leave it up to you to decide if this bug has any low hanging fruit or something interesting to look at, and therefore should be kept open.
Adding bug 1683440 as a dependency.
Comment 11•3 years ago
|
||
Let's leave it open then, we can probably (definitely) optimize the blend / clip shaders involved here.
Updated•1 year ago
|
Description
•