-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Borderlands 2 runs out of video memory (or so it says) #170
Comments
Maybe related: in #36 a huge amount of samplers mentioned. I found out it only happens when "Texture fade" option is enabled, samplers count grows like crazy! I turned it off and now it's steady at around 80. Maybe that's the cause of this out of memory issue. I'll play further to confirm. |
Was just about to report this myself. Played roughly 3 hours without any issues, but then it started crashing frequently (or rather, freezing). Sometimes I would get the same little error box saying it was out of memory. I'm running on a 2080 Ti with 11GB of VRAM, all graphic settings maxed out. Same proton/D9VK as rkfg. Tried running it without D9VK and it works fine then (but worse performance). Worth noting is that my boss-intro-scenes are often screwed up as well (tons of random black-ness). Probably a separate issue though. |
In the end my game froze, no error message box this time, no interesting info in the game's own log. The RES memory of the game process shrunk to just 18 Mb though. |
Did any of you manage to get a D9VK log file? I'm running the game with Proton, installed D9VK into the prefix as described and as you can see on the screenshot I can enable the HUD. But the logging options either don't work or I do something wrong. Regarding samplers and texture fade: when this option is enabled I see textures fading each time I open a box. It's like the game reloads them every time so it might very well be the reason of samplers number going up quickly. I have the HD textures DLC installed. |
I'd say this is caused by D9VKs implementation of GetAvailableTextureMem. Maybe hook that up with VK_EXT_memory_budget and return values that are actually correct. |
I'll try to get a log tomorrow for this. Should be able to monitor the VRAM usage as well to make sure this is not affecting the rest of the OS. At one time, when BL2 froze, my Discord froze as well. Odd. |
Maybe worth to try and compare 0.11 release. I was able to play through the whole Tina's DLC w/o any OOM errors (in April or so). Now I tried new Lilith's DLC (+Handsome Collection) and got an error immediately after start (D9VK built from git master). Mem usage snapshot during the error (longer session) Several short sessions w/ 0.11 are fine so far. EDIT: April build vs now |
I've tried quite a few builds with BL2/Proton and results vary from day to day. The current master crashes for me as well, but doesn't show anything. Master on Wednesday had "brightness problems" (snow in the start areas was completely bright white). The latest build from before the commit gap before Wednesday worked reasonably well, but had a few annoying graphical glitches that looked like they had to do with lighting (moire style patterns) and messes up the character introduction screens. The build from about a week before that had serious lighting problems. So it looks like the areas that are being worked on at the moment heavily affect BL2 and I haven't been able to find one that was good for this game. Unfortunately wined3d also has quite a few glitches. I'll have a try with the 0.11 build now as suggested. (Edit: 0.11 appears the same as the one from before Wednesday). |
For me it usually freezes or crashes after an hour or so. Setting
|
Setting TextureMB to a bigger value will probably cause it to keep more textures alive. |
Solved my no log issue. The cause is that Proton overrides |
That makes sense. I disabled the Ultra HD Texture Pack, and there are no issues now as far as I can tell after testing the game for 25 minutes with |
Tried producing a log today and it worked well. I actually happen to be at a spot where the game will crash every single time the save is loaded (instantly as soon as the save almost finished loading). Here is the log (22MB): Here's the end of it: steam-49520.log (end)
The log level was info. Not sure if it should have been debug. For me, it crashes before I can see the character. Tried it about 6 times and got the same result every time. Got the out of memory dialog a few times, and a few times not. Monitoring the GPU, the VRAM usage goes up to between 2-2.5GB every time. Sits at about 0.9GB without the game running. The game is running on max graphics with the Ultra HD texture pack installed. Haven't modified any files. I can successfully play without D9VK without any issues (but still performance degradation). EDIT: |
Nevermind. It just crashed with the same DxvkMemoryAllocator error without the Ultra HD Texture Pack and with |
The game froze and well, the same is in the log:
Looks like we're hitting the 32 bit limit (I have 32 Gb of RAM and of course an amd64 system). When you play and visit different locations with many different textures it might exhaust the address space pretty quickly. |
It seems on Medium textures the game works without this issue. The VRAM usage floats around 2100, the game usually crashes when it hits 3100 or so. That's all with UHD textures enabled. |
This also happens with America's Army Proving ground when using the master branch I get the out of memory pop up, but with 0.12 I don't get the pop up, but I get the same as here in the logs. |
I tested the latest master ( e2fcd7f ) and tried to quit to the menu from the game. I showed "Compiling shaders" and then gave the memory error. This did not happen on build 2436010 that I've use for a while before. I don't have logs since I wasn't looking for this, but I assume it'll be the same as for the others. |
Can confirm, with medium textures and the Ultra HD Texture Pack it no longer crashes. |
Nothing about this has changed on the D9VK side. Medium textures just use less VRAM. |
Yeah, same here. Uses ~500mb less. Everything else is still on high however |
This is still an issue in .013... |
I'm getting err: DxvkMemoryAllocator: Mapping memory failed VK_ERROR_MEMORY_MAP_FAILED Ryzen 1600 | RX 580 8 Gb | 16 Gb RAM |
Fixes sampler leakage in Borderlands 2 Not the best solution but it's the best we have right now
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
The error still occurs with commit eccc5c9. |
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
…re by default This allows us to use more than 4GB of VRAM in games. This behaviour changed in the Fall Creators update (https://www.neowin.net/news/windows-10-fall-creators-update-fixes-the-directx-9-memory-allocation-bug) But lets keep it around in case some game depend on the old behaviour! (It's D3D9 after all...) May impact #93, #170, #383 and #438
So I looked into this more and I absolutely cannot repro this on Windows. This only ever happens when Wine gets involved for me so I feel there is some issue somewhere else causing this, but I have no idea right now. |
Here's a screenshot when it happens:
Don't mind the grey rectangles, it's a selection from the screenshot program. The main window isn't redrawing when the error happens. This time it happened when I got to the main menu but it can also "crash" (not really crash as it's not a segfault or whatever) midgame. The error is weird because I have plenty of VRAM (8 Gb) and the game doesn't allocate this much. Usually happens after an hour of playing or so.
Software information
Borderlands 2, all settings maxed out.
System information
For whatever reason I can't produce log files. My command line in Steam is
DXVK_HUD=full DXVK_LOG_LEVEL=debug DXVK_LOG_PATH=/home/rkfg %command%
but there are no new files in my home directory.PS: many thanks for this project! Some might say it's not that important as D3D9 games are old and don't need beefy hardware to work smoothly on modern hardware but it's blatant lies. My FPS is like 50% better and more stable (almost no hitches) in BL2 with D9VK than with default OpenGL backend and it's even more correct! On OpenGL I see small black squares flickering on the geometry and some crosshairs and D9VK doesn't produce them.
The text was updated successfully, but these errors were encountered: