-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Only copy the relevant portion of the screen when copying to backbuffer in Compatibility backend #84733
Only copy the relevant portion of the screen when copying to backbuffer in Compatibility backend #84733
Conversation
…er in Compatibility backend
Tested locally (rebased on top of Exported projects (for quick testing)Press Enter/Space, left-click or tap the screen to toggle Clip Children. AndroidWebBenchmarkLinuxOS: Fedora 39 1152×648 window
3840×2160 fullscreen
Web on LinuxBrowser: Chromium 118 Start Chromium with the 3840×2160 fullscreen
AndroidOS: Android 13 2176×1812
Web on AndroidBrowser: Bromite 108 2176×1812
I'm not sure where this large performance discrepancy between native and web comes from. It's not new, but I'm puzzled it's this large when desktop Chromium is "only" 2× slower than desktop while Android Bromite is roughly 10× slower. |
Any news, seems to be really good performance improvements! ;) |
Thank you @Calinou for testing I wanted to ensure that a performance difference could be reproduced on Android, since you already did that, I am happy to mark as ready for review |
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.
Looks fine to me.
Thanks! |
Cherry-picked for 4.2.2. |
Can't get a clean cherry-pick for 4.1 because it partially depends on changes from #78168. |
Are there anyway to include this improvement for the Godot 4.1.5 next? i tested the FPS difference on Godot 4.3 (stable) and Godot 4.1.4, there are about 15~ fps gap (145 vs 131) |
I'm not sure if we will be releasing another 4.1.x version. However, in either case, a new PR would be needed targeting 4.1.x directly as the source diverged enough between 4.1 and 4.2 that this can't be cleanly cherry picked. In other words, you will have to copy these changes manually into the 4.1 branch if you want to use them there. |
Partially addresses: #79439
Implements the first point from #79439 (comment)
Previously we copied the entire backbuffer, now we only copy the relevant portion. This matches the behavior on the RD backends.
Opening as draft as I need to do more testing
On my laptop using intel integrated graphics I get roughly double the performance with this change (~160 FPS to ~320 FPS) using the MRP from #79439. Testing on a pixel 4 and there is no difference (likely because it is not a fill rate bottleneck)