-
Notifications
You must be signed in to change notification settings - Fork 851
Fix performance regressions with buffer uploads in 1.21.5 #3094
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
base: 1.21.5/stable
Are you sure you want to change the base?
Conversation
I'm seeing up to a 8% performance drop in 1.21.5 on my Ryzen 7600X + Intel B580 system. This pr does not remedy that at all. However interestingly enough it brings GPU utilization way down to what it was in 1.21.4 (80-50% in 0.6.12, 20-40% with this patch) |
On my laptop, r5 4600h + gtx1650m it seems that this PR sadly does not affect FPS in any way. For me, GPU utilization always has been at 99-100% w/shaders and 30-50% w/o on 1.21.4 and is the same on 1.21.5, but with lower FPS. I'm experiencing a ~30 FPS drop in general compared to 1.21.4, both with Sodium only and Sodium+Iris. If you need any additional info, let us know. |
For me the frametime graph itself is perfectly fine, and I also use Complementary shader. Maybe driver-specific problem arised? |
Here's some spark profiles: Release Sodium: https://spark.lucko.me/88dmo9pZvH |
Testing Sodium's |
@douira Maybe try testing with lots of entitys, for example, Hypixel bedwars lobby 1 |
@douira Oh! I have noticed that even on a Mac, you're not using an Apple designed GPU. You will notice the performance difference with the many entities on an Apple designed GPU, as fast buffer upload actually makes Apple GPUs lag. |
@douira go see RaphiMC/ImmediatelyFast#279, it may give some useful information on this, as ImmediatelyFast also had their fast buffer upload optimisation enabled for Apple GPUs at some point before Mojang added it themselves. |
I definitely have the performance regression issue ( about 75% FPS for 1.21.5 vs 1.21.4 ) and while this has an effect it's pretty minor ( it's roughly x1.1 FPS on 1.21.5 as compared to without it ) so I don't think this is the actual major cause of regression at least for my setup. |
@Kalanyr what is your setup? |
Intel x86_64, Windows 11, Laptop NVIDIA 3080 ( it's a Performance version
since it's a Desktop Replacement Laptop but still a Laptop Mode)
…On Wed, 16 Apr 2025, 11:57 djmrFunnyMan, ***@***.***> wrote:
@Kalanyr <https://github.com/Kalanyr> what is your setup?
—
Reply to this email directly, view it on GitHub
<#3094 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZ334UBVBSB5XEQZWEAO32ZW2G5AVCNFSM6AAAAAB2GPFPQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBXHE4DKOBVHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
*djmrFunnyMan* left a comment (CaffeineMC/sodium#3094)
<#3094 (comment)>
@Kalanyr <https://github.com/Kalanyr> what is your setup?
—
Reply to this email directly, view it on GitHub
<#3094 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZ334UBVBSB5XEQZWEAO32ZW2G5AVCNFSM6AAAAAB2GPFPQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBXHE4DKOBVHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello, ImmediatelyFast dev here. It should be noted that 1.21.5 has multiple other performance regressions, even ones which affect all GPU vendors, so direct comparisons between 1.21.4 and 1.21.5 even with the buffer upload fix are not possible. |
I just don't understand how mojang could release such a completely broken update... Almost the same set of mods of the latest versions (at the moment), the same set of resource packs, the same shader with the same settings, and the difference is -50% frames. But what's more frightening is that some mod developers are already stopping support for 1.21.4 or are moving it to the category of receiving only critical updates. |
This PR essentially reverts Mojang's changes to buffer uploading in 1.21.5 where the new method of uploading buffer data via
glBufferSubData
is inefficient and causes significant performance losses across some systems (see MC-295893 for further details).This patch on my system (macOS) pretty much fixes the significant performance loss I've experienced from this update. I'm not sure if the patch should only be applied to certain systems or not given the many users reporting performance losses (which may or may not be related to this) so that might be something worth considering.
I believe I have added the mixins and whatnot correctly, if anything needs changing please let me know. I also had to update MixinExtras for the
@Cancellable
annotation (Fabric and Neo ship this version so it should be fine).