Sodium

Sodium

35M Downloads

Performance regressions with the new multidraw fixes

coderbot16 opened this issue ยท 8 comments

commented

A number of users have reported significant performance regressions with the recent fixes to multidraw. I've created an issue so that these problems can be kept track of.

Version Information

Sodium next branch, 2fb1d28...34eb1d2 and above

Expected Behavior

Multidraw is faster than Oneshot

Actual Behavior

Multidraw is sometimes slower than Oneshot

Reproduction Steps

I have not taken the time to reproduce this myself, however quite a few users have reported problems on Discord.

System Information

This data is from one person who reported the issue

Java version: unknown
CPU: unknown
GPU: GTX 1050 2GB

Other Information

Reverting to 2fb1d28 appears to resolve the issue

commented

I haven't observed any regressions on AMD/Linux at least when just staring at a bunch of chunks from above. I loaded the same world at 32 render distance with both 2fb1d28 and abfa386 and got the exact same performance. I also checked out the oneshot renderer on abfa386 and performance is much worse.

OS: Linux 5.11.9
Mesa: 20.3.4
Java version: AdoptOpenJDK 16+36
Java arguments: -XX:+UseZGC -Xms4096m -Xmx4096m
CPU: AMD Ryzen 5 3600
GPU: AMD R9 Fury X

2fb1d28:
2fb1d28

abfa386:
abfa386

abfa386 GL 3.0 oneshot:
abfa386-oneshot3 0

P.S. Is there a way to not have images be so large? Like spoilers or something?

commented

Linux (or at least Mesa - not sure about amdgpu-pro) is not affected by the multidraw issue, and hence no regressions are to be expected there. This is specifically about AMD's Windows drivers.

Ignore me, I didn't think this through properly before commenting

commented

AFAIK, the regressions were for people who were not affected by the rendering issues, such as one user who had a GTX 1050. Perhaps the performance drops mainly happen when moving around?

commented

I attempted to do a bit more testing and still haven't run into any regressions. I installed the latest dev branch of phosphor and lithium (also tweakaroo/malilib has been installed to disable fog), flew slowly from Z=0.5 to Z=5000 to generate chunks, then teleported back to X=1000.5 Y=430 Z=0.5 and sprint-flew for a while. The only performance "issues" are oneshot not being able to keep up with chunk loading when sprint flying, and the stutters when unloading/loading chunks (which seem to happen on any version/chunk renderer). I didn't record a video because it messes with performance a bit, but I can if it would be helpful.

2fb1d28 moving:
2fb1d28-moving-SLP
abfa386 moving:
abfa386-moving-SLP
abfa386 moving GL 3.0 oneshot:
abfa386-moving-oneshot3-SLP

commented

Interesting, so clearly it doesn't happen on all configurations. I guess it would be needed it for someone on a nvidia card to test as well then.

commented

From my testing on intel, multidraw is slower than oneshot

Still test (Not moving around)

Multidraw:
image

Oneshot GL 3.0:

image

But once I start moving the angle of my head around, the results become more interesting

Multidraw:

image

Oneshot:

image

So yes, looks like multidraw isn't performing quite as well as it should

commented

pure sodium install, no other mods
GPU: GTX 1650, driver version NVIDIA 455.50.10
Both tests done on Multidraw with uncapped FPS
Started at spawn, flew to roughly 2000 on z-axis to generate chunks, then flew from 0 on z-axis to roughly 1000 on z-axis
2fb1d28 moving: https://flightlessmango.com/games/30952/logs/1562

abfa386 moving: https://flightlessmango.com/games/30952/logs/1563

Overall, it appears i had a performance gain, rather than regression

commented

Closing this because of e014238, which seemed to be the source of most performance regressions - not the multidraw changes.