[RADV] Dota2 VRAM memory leak when switching back and forth from fullscreen
Description
Even since Valve added a vulkan backend to dota2, after a few matches the performance becomes really bad sometimes. We are talking about going from >150fps to 5-10 fps. It will then eventually crash the game.
I've also noticed this with some of my other steam games running with proton, but it doesn't happen nearly as often as with dota2. (Might be because I play dota2 for longer periods of time than those).
I installed mangohud and looked at the memory usage and noticed that the VRAM usage slowly increases when playing and watching games.
VRAM usage start around ~3GB for me and during a 1 hour session it had gone up to ~6GB. Note that I didn't tab out that much during this time.
However with mangohud I also noticed that if I tab in and out again from the game VRAM usage increases with 0.1 GB for each time I do this. So I can reproduce the issue much faster by tabbing in and out until the program crashes. (Note that I have still noticed that it seem to leak without doing this but at a much much slower pace).
I've also reproduced this without mangohud to make sure that this is not a leak in the mangohud overlay.
Of course this leak might be a different one than the other I've noticed while just playing the game. But lets hope that they are related at least ;)
Screenshots/video files
Log files (for system lockups / game freezes / crashes)
dmesg output when it crashes:
[ 8292.594499] dota2[30623]: segfault at 0 ip 00007f80eeb508ac sp 00007ffd6a5fc810 error 6 in libtier0.so[7f80eea74000+1cf000]
Steps to reproduce
Example:
- Start Dota2 with the vulkan backend.
- Start furiously tabbing in and out of the program.
- Continue doing it until the VRAM fills up and the program segfaults. (Probably because it can't allocate more VRAM)
System information
- OS: Gentoo Linux
- GPU: Radeon Pro WX 9100
- Kernel version: 5.10.4-gentoo
- Mesa version: Mesa 21.1.0-devel (git-a5685e4d)
- Desktop environment: SwayWM (Wayland)
- Xserver version: 1.20.99.1
Further information (optional)
- Does the issue reproduce with the LLVM backend (
RADV_DEBUG=llvm
) or on the AMDGPU-PRO drivers?
Can't test with RADV_DEBUG=llvm
as it never makes it to the dota2 main menu for me with that on.
- Does your environment set any of the variables
ACO_DEBUG
,RADV_DEBUG
, andRADV_PERFTEST
?
No
Let me know if I should provide any more information! :)