-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terrain render loop: Prioritize large batches and lazy framebuffer switches #10701
Conversation
There seems to be an issue with symbols in |
15c1385
to
3c604bb
Compare
3c604bb
to
8c78724
Compare
8c78724
to
00f0643
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I was slow on the review! I only had the tiniest nitpick and put most of my energy into working to understand the PR. I have a couple questions I'll follow up with after the fact.
drawTerrainRaster(painter, this, this.proxySourceCache, accumulatedDrapes, this._updateTimestamp); | ||
this.renderingToTexture = true; | ||
|
||
accumulatedDrapes.splice(0, accumulatedDrapes.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nitpicky: I had to double-check what this does in the inspector. Maybe setting length is clearer if the intention is to simply flush the array?
accumulatedDrapes.splice(0, accumulatedDrapes.length); | |
accumulatedDrapes.length = 0 ; |
…itches (mapbox#10701) * Prioritize assignment of large render batches first * Prioritize pool assignment of large render batches first * Simplify unnecessary branch * Simplify render loop * Fix lint * Lazy framebuffer switches * Use non-indexed for each loop * Fix missing reset of backbuffer when not rendering any drapes * Ensure main framebuffer reset after terrain render * Simplify
Ports two different optimizations to the render cache from native.
before/after (1)
before/after (2)
<changelog>Improve terrain performance by reducing number of framebuffer switches during draping</changelog>
<changelog>Improve terrain performance by prioritizing allocation of large render cache batches</changelog>