Open Bug 1647951 Opened 4 years ago Updated 3 years ago

Investigate shared SWGL contexts or some form of inter-window SWGL resource sharing

Categories

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

enhancement

Tracking

()

People

(Reporter: lsalzman, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Bug 1646835 tries to introduce some form of depth buffer sharing within a given SWGL compositor, so that all tiles rendered via that compositor don't need to have their own depth buffer. However, since there is still one SWGL compositor per window, that means that each window must still redundantly allocate its own depth buffer. This wastes memory since the depth buffer is only needed while a tile is being rendered, but not thereafter, so while one buffer per compositor is better than nothing, one buffer in total would be even better.

One way to resolve this might be to share a SWGL context across all windows. Once that is in place, we could just allocate the depth texture once for the single SWGL context, and it would automatically be shared across windows.

Another strategy would be to rely on the SWGL set_tex_storage extension (which is more-or-less a form of client storage) and allocate the backing buffer for the depth texture outside of SWGL and pass it in to be shared amongst each depth texture living in the different SWGL contexts. While this could be slightly messier, it might be more desirable from a robustness standpoint to isolate the different SWGL contexts and prevent intermixing that would occur if we had to use a single SWGL context for all windows.

Depends on: 1727993
You need to log in before you can comment on or make changes to this bug.