Closed Bug 1669960 Opened 5 years ago Closed 5 years ago

Using glBlitFramebuffers to copy picture cache textures results in corruption on Mali-G72

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- unaffected
firefox83 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

This is a regression from bug 1669494, which switched us to using glBlitFramebuffer rather than glCopyImageSubData to resize picture cache textures. As a result I'm now seeing blurry or corrupt text on my Samsung Galaxy S9.

That patch was in response to a performance issue spotted on Mali-T, but I applied the change to Mali-G too as a precaution. It seems like that was the wrong choice, so let's revert it on Mali-G. Thankfully on Mali-T I don't see any corruption.

Note that bug 1669567 should fix this anyway, because we will stop resizing (ie allocate new texture and blit old to new) picture cache textures.

But I think we want to fix this anyway so we don't get any surprises in the future if we start blitting textures again.

Attached image malig-corruption.jpg

Set release status flags based on info from the regressing bug 1669494

Using GL_NEAREST instead of GL_LINEAR for the glBlitFramebuffer also appears to fix this. Maybe we should be using GL_NEARST anyway, since the source and dest textures are the same dimensions, and it might be faster. But that seems more brittle than just preferring glCopyImageSubData.

In bug 1669494 we switched Mali-T and Mali-G devices to use
glBlitFramebuffer rather than glCopyImageSubData when resizing
textures. This was in response to a performance issue noticed on
Mali-T, but Mali-G was switched too as a precaution.

However, Mali-G appears to have a buggy implementation of
glBlitFramebuffer, resulting in corruption. Luckily, Mali-T does not
appear to have such a problem, so we can keep Mali-T using
glBlitFramebuffer, but revert Mali-G to glCopyImageSubData.

Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/859eba74bbab Revert to using glCopyImageSubData rather than glBlitFramebuffer on Mali-G r=gw
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
See Also: → 1677757

I was looking through the webrender driver issues wiki page and saw this, and remembered that the description was incorrect. The corruption was due to resizing the GPU cache rather than picture cache tiles. And that was due to GL_LINEAR not being supported for blitting RGBAF32 textures. (bug 1677757)

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: