[2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
MRI-One
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Nov 19, 2024 9:59 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by MRI-One »

2.0.21 works better, and with high resolution much better, thank you.

Factorio running at native resolution (5120x2160, 11 MPixel):
Where .20 would drop the frame rate down to 50fps, .21 runs cleanly at 60fps. I was surprised to see that the power consumption has barely changed. That power consumption is 40W, compared to 85W when fully stressing the GPU and around 14W with an idle desktop.
Factorio running at 3840x1680 HiRes, 24 MPixel:
old version would be quite slow, below 30fps, and now .21 runs fluently, and consuming around 75W
This is with a M2 Max, 40 Core GPU, and no changes in graphics settings.

There must have been quite a few waits in the old graphics code. Could it be that the old code had inadvertently activated some gpu thread syncs?
posila
Factorio Staff
Factorio Staff
Posts: 5348
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by posila »

MRI-One wrote: Fri Nov 22, 2024 9:44 pm 2.0.21 works better, and with high resolution much better, thank you.
...
Factorio running at 3840x1680 HiRes, 24 MPixel:
old version would be quite slow, below 30fps, and now .21 runs fluently, and consuming around 75W

There must have been quite a few waits in the old graphics code. Could it be that the old code had inadvertently activated some gpu thread syncs?
Aww, that's awesome. Thank you!

Yes, it seems call to OpenGL function glQueryCounter to query GPU timer was probably causing CPU-GPU sync on macOS. We used it since 0.17, but I suppose more demanding renderer made this issue really pop-up. And V-sync made the problem even worse.
posila wrote: Tue Nov 19, 2024 1:30 pm And I also found big performance problem with querying GL_TIMESTAMP on macOS. We use it to time how long did GPU take to process some operations, Apple's OpenGL never implemented it (it always return 0) so I was surprised it was taking non-trivial amount of time on macOS and probably caused CPU to wait for GPU when it didn't need to.
hgschmie wrote: Fri Nov 22, 2024 5:28 pm THANK YOU, @posila for all your hard work!

2.0.21 is a very noticeable improvement, at this point the game feels as fluent as 1.1.
Thank you, I appreciate it and I am glad to hear that.
fpe wrote: Wed Nov 20, 2024 12:06 pm After cleaning those fans and air vents my notebook does not overheat anymore (resulting in thermal throttling) and the framerate stays constant.
Oh, cool, I am glad you were able to get resolve the slowdowns. Resolution scaling option is coming soon-ish, in the mean time, you can try disabling the new "Occlude light sprites" option to be able to achieve 60 FPS in full 4K.
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by brunzenstein »

posila wrote: Sat Nov 23, 2024 11:36 am
thank you indeed postila for your dedication!
Post Reply

Return to “Technical Help”