Investigate shared SWGL contexts or some form of inter-window SWGL resource sharing
Categories
(Core :: Graphics: WebRender, enhancement, P3)
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.
Description
•