Lags on macOS

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Lags on macOS

Re: Lags on macOS

by _mental_ » Sat Jul 21, 2018 4:31 am

Sure, changing or disabling wipe had no effect. Sorry, I should mention this before.
Also, menu and console operates with no lags before the game is started. Moreover, wipe is rendered smoothly and then the issue begins.

Re: Lags on macOS

by Graf Zahl » Sat Jul 21, 2018 4:11 am

Apparently. But the title screen only draws some indexed primitives as well.
Have you tried disabling the wipe or changing its mode?

Re: Lags on macOS

by drfrag » Sat Jul 21, 2018 3:57 am

May be i have no idea of what i'm talking about but could be that something bad happens to the vertex cache while on the title screen (or something good does not happen).

Re: Lags on macOS

by _mental_ » Sat Jul 21, 2018 3:44 am

The thing is builds from master branch work fine for me. Outside of this issue I see no problems with them.

Re: Lags on macOS

by Graf Zahl » Sat Jul 21, 2018 3:30 am

_mental_ wrote:Actually, I don't want to provide legacy builds for macOS at all.
I would like to act the same as Apple did, to deprecate as much as possible.
I'm afraid, but with that you'll have to wait until Vulkan works. Until then it's just hoping and praying that the deprecated stuff continues to work.
Apple's OpenGL is already a legacy component because it doesn't support anything of what's considered "modern", so providing only a legacy build seems fitting somehow.

Re: Lags on macOS

by _mental_ » Sat Jul 21, 2018 3:08 am

Actually, I don't want to provide legacy builds for macOS at all.
I would like to act the same as Apple did, to deprecate as much as possible.
And if something doesn't work I'll say that you simply don't need it :)

Back to the topic, it was GeForce 650M but yeah, Apple managed to screw up almost everything.
Anyway, there is the mentioned workaround which I hope will give some hints how to "fix" it.

Re: Lags on macOS

by drfrag » Sat Jul 21, 2018 2:43 am

Graf Zahl wrote:Solution: Contact drfrag to provide a legacy build that still uses the old subsector-based renderer.
Of course i don't own a Mac but _mental_ has access to my repo, i added him as collaborator long ago.

Re: Lags on macOS

by Graf Zahl » Sat Jul 21, 2018 2:19 am

_mental_ wrote:The issues was introduced with this commit which is an essential part of indexed vertex buffer usage for flats rendering.
Honestly I have no idea why it causes such horrendous lags on macOS.
In this case there's a sad conclusion here: The vertex cache being used by indexed rendering seems to be broken somehow and it needs some secondary effects to get on the right track.
To me it looks like a driver bug (figures, considering we are talking about the duo from hell here - Apple and AMD...)
Solution: Contact drfrag to provide a legacy build that still uses the old subsector-based renderer.
I guess for macOS we need the Vulkan renderer even more than for the other platforms - what an irony considering that it has no native Vulkan support...

Re: Lags on macOS

by _mental_ » Sat Jul 21, 2018 1:59 am

The issues was introduced with this commit which is an essential part of indexed vertex buffer usage for flats rendering.
Honestly I have no idea why it causes such horrendous lags on macOS.
But the strangest thing in this bug is the workaround.

If GZDoom is started as usual (without mods or with a mod that doesn't have title map), each frame takes up to 500 ms to render.
If the game is started with +map ... command line (or with a title map), the issue doesn't appear.
Moreover, integrated Intel graphics seem to be unaffected by this thing at all. Only discrete one exhibits the huge difference in performance.

Ideas are welcome. I tried to play with usage arguments of glBufferData in gl_vertexbuffer.cpp but this didn't change anything. Or perhaps I didn't manage to find the right combination.

Re: Lags on macOS

by _mental_ » Sat Jul 14, 2018 5:51 am

I managed to reproduce the problem.

For unknown reason glUnmapBuffer() took up to 200 ms while on the same hardware and OS it should be less than 1 ms.
Indeed, it gets back to such timings after changing the current resolution.

Apparently it's a bug. The thing is I really don't know why it works fine on integrated graphics and fails on discrete one.
We can blame Apple's OpenGL drivers as usual but I hope to find some workaround for this issue.

Re: Lags on macOS

by Guest » Sun Jul 08, 2018 2:08 pm

It's this one:
https://everymac.com/systems/apple/imac ... specs.html
and it has only external graphics.
Already tried to disable the Retina/HiDPI support, but it had no effect.

Re: Lags on macOS

by _mental_ » Sun Jul 08, 2018 1:35 pm

What’s the Mac model?

If you have integrated Intel graphics, I suggest you to switch to it by setting vid_autoswitch CVAR to zero.
Have no idea how Apple managed to do that but sometimes GZDoom works faster than with discrete one.
You can try to switch off Retina/HiDPI support in Video mode menu too.

Lags on macOS

by Guest » Sun Jul 08, 2018 1:22 pm

Hi there!
Since version 3.4.0, any game/mod I try to run, starts with lags. I've found a workaround to go to resolution settings, change the resolution to any other and then pack to the main one (1920x1080), but it's pretty annoying. First I though it was the mods, but the same thing happens with pure Doom/Doom 2/FreeDoom game on clean config (default settings).
Version 3.3.2 has no such issues, only versions 3.4.0 and 3.4.1

Running on:
macOS 10.13.5
NVidia GTX 650
with OpenGL renderer.

If there's any logs I should provide, I'll do it gladly.

Regards,
Philip

Top