I get random lagging when playing the recently released Mad Max. Every once in a while, the game freezes completely, and gets back to the game after an arbitrary amount of seconds, anywhere from 2 to 35.
With GALLIUM_HUD, and noticed that the lags appear to precede the VRAM slowly ramping up to full, and then I get this huge lag, and then VRAM usage is a lot lower (eg. from 1GB to ~600MB).
I found this possibly related news item from a couple of months back: https://www.gamingonlinux.com/articles/a-reason-for-poor-performance-on-amd-plus-mesa-has-been-found-and-a-patch-is-in-progress.7873
Please attach a screenshot taken withing a minute after a freeze with GALLIUM_HUD=.dfps,requested-VRAM+VRAM-usage,requested-GTT+GTT-usage,.dnum-bytes-moved,.dbuffer-wait-time,.dnum-compilations+num-shaders-created .
Created attachment 128034 [details]
GALLIUM_HUD enabled with requested settings
GALLIUM_HUD enabled with requested statistics with VRAM and GTT etc. Shows two laggy parts, a small lag and then a big lag.
Assuming your card has 1GB of VRAM, the fundamental problem is that the game wants to use more VRAM than is available. Maybe you can try reducing the game's graphics settings such that the 'requested VRAM' number drops below 1GB.
(In reply to Michel Dänzer from comment #3)
> Assuming your card has 1GB of VRAM, the fundamental problem is that the game
> wants to use more VRAM than is available. Maybe you can try reducing the
> game's graphics settings such that the 'requested VRAM' number drops below
Indeed. The game's settings are at the minimum, and the resolution is @ 720p. I hoped the lowest setting would alleviate the lags, but unfortunately it didn't. However, just by reading the links from the article I linked in my original message, I thought that it should be possible to play with less VRAM than what is needed, as per:
"The game I'm testing needs 3.4 GB of VRAM.
Tonga - 2 GB: It's nearly unplayable, because freezes occur too often.
Fiji - 4 GB: There is one freeze at the beginning (which is annoying
too), after that it's smooth.
So even 4 GB is not enough."
Also the descriptions of the problem seem to match mine. A problem in memory handling?
Thanks for the suggestion though, anything that could remove or at least reduce the lags would make the game from mostly playable to very playable (for me at least).
(In reply to Jani Kärkkäinen from comment #4)
> "The game I'm testing needs 3.4 GB of VRAM.
> Tonga - 2 GB: It's nearly unplayable, because freezes occur too often.
> Fiji - 4 GB: There is one freeze at the beginning (which is annoying
> too), after that it's smooth.
> So even 4 GB is not enough."
> Also the descriptions of the problem seem to match mine. A problem in memory
The freeze at the beginning is most likely shader compilation. Mesa does not have a shader cache yet.
The games requirements list a card with a minimum 2GB but recommend 4GB.
As for lagging at the start with a 4GB card, r600 now has shader cache support (at the TGSIU level at least) so this should not longer be a big issue. Closing.