Closed Bug 1568600 Opened 3 years ago Closed 3 years ago

Better batching when dual source blending is unavailable


(Core :: Graphics: WebRender, enhancement, P3)




Tracking Status
firefox72 --- fixed


(Reporter: nical, Assigned: nical)


(Blocks 2 open bugs)



(1 file)

When we don't have dual source blending we appear to be creating a new batch each time the text color changes (for text with subpx aa). On some sites it makes us generate hundreds of tiny draw calls and the majority of the GPU time ends up spent there (in addition to costly submission).

We should be able to emit a batch per color instead of a batch each time the color changes.

Assignee: nobody → nical.bugzilla
Blocks: wr-perf

I'll make the suggestion that we may want to just disable subpixel aa if we don't have dual source blending available. I'll make the bold claim that anyone running on hardware that old probably wants speed more than subpixels. Also WebRender doesn't even support running on hardware that's not d3d10.1 yet.

Erratum: this batching issue happens with dual source blending enabled. That said I like the idea of disabling subpx aa when dual source blending is disabled.

Erratum on the Erratum, I'm not seeing this batching issue anymore. I updated from a rather old intel driver so that probably gave me dual source blending and fixed the batching issue.

Summary: Better batching with subpx aa → Better batching when dual source blending is unavailable

Can you switch back to the old driver to see if the problem returns? You should be able to choose the old driver by using "Update Driver" in device manager and then choosing "Browse my computer for driver software" -> "Let me pick from a list of available drivers on my computer"

Flags: needinfo?(nical.bugzilla)

I switched back to the old driver and the draw calls count looks reasonable. I don't know what's up.
I'm still game for removing subpx aa without dual source blending. Should we do it only in firefox by disabling subpx-aa when DSB is unavailable, or can we simply get rid of the whole subpx-aa without DSB implementaion?

Flags: needinfo?(nical.bugzilla)

I'm inclined to leave the subpx-aa without DSB implementation for now, as complaints may drive us to requiring it.

Posted file Bug 1568600 - Disable sub-px aa in WebRender if dual-source-blending is unavailable. r=jrmuizel

This patch adds a force_subpixel_aa renderer option (false by default) without which sub-pixel aa is only used when dual source blending is enabled.
This breaks a wrench test (wrench/reftests/text/allow-subpixel.yam) on windows 10 and android which checks that text renders different in a situation where we would normally get sub-px aa vs a situation when we normally fallback to gray scale.
I'm surprised that we're not getting DSB on the Windows 10 case, and even more surprised that this breaks this one without breaking other reftests on the same platform). For android I suppose we don't actually want sub-pixel aa so that test isn't very useful there.

We could land this patch by forcing sub-px aa for wrench tests but I'm not a fan of that since that's testing a code path we probably don't want to ship.

I believe this is broken on Win10 because we're using an old version of mozangle. I plan on updating it once 0.2.4 comes out. (Today)

I think it's fine to disable subpixel wrench tests on android.

Pushed by
Disable sub-px aa in WebRender if dual-source-blending is unavailable. r=jrmuizel
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Blocks: wr-batching
Depends on: 1616592
You need to log in before you can comment on or make changes to this bug.