You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Since #2909 moved all rendering onto the main thread, these per-map contexts should no longer be necessary. Because calls to glXMakeContextCurrent trigger an implicit glFlush, swapping these contexts could be causing unnecessary synchronization and possibly GL pipeline stalls.
I think that this change in combination with #477 could possibly remove all implicit flushes from the Node.js render pipeline.
This is going to require some careful review and perhaps modifications to the internals of Map, which currently makes optimizations based on the assumption that the View provides each Map with a unique context.
I'm thinking mainly of gl::Config. If it's only used when actually painting (and not, say, opportunistically binding / uploading buffers as data comes in), and headless rendering only ever paints once per map, then this is probably safe. Otherwise, we need to ensure that setDirty() gets called whenever it's possible that the shared context was modified by another Map object.
This is going to require some careful review and perhaps modifications to the internals of Map, which currently makes optimizations based on the assumption that the View provides each Map with a unique context.
We already have the GLContextMode::Shared mode for that no?
GLContextMode::Shared indicates we're sharing the context with code we don't have control over, so must treat the gl::Config as dirty after every frame. But we can do better in this case.
Reacted by Thiago Marcos P. Santos and Dane Springmeyer
Activity
jfirebaugh commentedon Sep 7, 2016
This is going to require some careful review and perhaps modifications to the internals of
Map, which currently makes optimizations based on the assumption that theViewprovides eachMapwith a unique context.I'm thinking mainly of
gl::Config. If it's only used when actually painting (and not, say, opportunistically binding / uploading buffers as data comes in), and headless rendering only ever paints once per map, then this is probably safe. Otherwise, we need to ensure thatsetDirty()gets called whenever it's possible that the shared context was modified by anotherMapobject.jfirebaugh commentedon Sep 7, 2016
Or better yet, have the view provide the
gl::Config, and share it betweenMaps that are sharing a context.mikemorris commentedon Sep 7, 2016
Making a note to track #5938 and #5620, which fix a few bits of GL context state not yet tracked by
gl::Config.tmpsantos commentedon Sep 8, 2016
We already have the
GLContextMode::Sharedmode for that no?jfirebaugh commentedon Sep 8, 2016
GLContextMode::Sharedindicates we're sharing the context with code we don't have control over, so must treat thegl::Configas dirty after every frame. But we can do better in this case.stale commentedon Nov 20, 2018
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.