Closed Bug 1712367 Opened 3 years ago Closed 3 years ago

Avoid TexSubImage2DWithoutUnpackSubimage slowpath when using SWGL

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

OpenGL ES doesn't support extracting a subimage from the source when using glTexSubImage. The memcpy call from mozilla::gl::TexSubImage2DHelper in https://share.firefox.dev/3yn0d5C suggests we're hitting this.

The best way to avoid it is unclear.

Blocks: 1711685

I talked this through with Glenn and came up with the idea of using our current DataSourceSurface as a scratch buffer. Instead of drawing into the correct place in the tile's DataSourceSurface, we always draw in the top left and make sure the stride = width of the dirty rect. We should then be able to TexSubImage2D from that freshly drawn area.

Attached file PoC
Assignee: nobody → jmuizelaar
Status: NEW → ASSIGNED

(In reply to Jeff Muizelaar [:jrmuizel] from comment #0)

OpenGL ES doesn't support extracting a subimage from the source when using glTexSubImage. The memcpy call from mozilla::gl::TexSubImage2DHelper in https://share.firefox.dev/3yn0d5C suggests we're hitting this.

"doesn't support efficiently extracting"?

Flags: needinfo?(jmuizelaar)

When I applied the current D116501 on Wiko sunny2 puls(Mali-400 MP), I sometimes saw cases that part of page colors were inverted between blue and red. I tested on https://www.yahoo.co.jp/

:jrmuizel, can you reproduce the problem of comment 3 on your device?

By applying the updated patch, the color problem was addressed:) I am going to check more.

Flags: needinfo?(jmuizelaar)
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4521e7060665
Avoid TexSubImage ES slow path. r=jgilbert,sotaro
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: