-
Notifications
You must be signed in to change notification settings - Fork 861
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
[d3d9] Majesty 2 woes with iGPUs and system memory heaps #1542
Comments
I'd say setting
DXVK is known to have very high memory overhead, it's not really possible to change that without a complete rewrite (and potentially sacrificing performance for memory efficiency). Memory efficiency was never really a goal since it started out as a 64-bit only D3D11 translation layer. |
Fair enough. I think the game's pre-loading a ton of stuff on startup, which is a bit weird anyway.
It doesn't help in terms of getting the game to not crash on startup and also tanks the framerate during gameplay (the hardware's somewhat maxed out anyway). The game will manage its memory well once it's started, so it doesn't really help here.
I thought as much, hence the can of worms I mentioned. Ok, got it and I'll close this, I just had to ask :). Thanks! |
With new hardware comes new insight into old issues. I've recently upgraded to an 8GB laptop with an Iris Xe-LP G7 iGPU and I'm still seeing the same behavior. It's the only game out of 30+ D3D9 games I've tried that has this problem, so it's not a system-specific or low heap memory problem, as I initially thought. It appears the game will reserve all the VRAM it possibly can + whatever RAM it needs for its 32-bit LAA-aware process. While this allocation logic works fine with dedicated GPUs, it eats up all available memory on iGPUs and causes the game to crash on startup. Could you please add Either way, there has to be a limit in place on systems with an iGPU or the game will not start with DXVK. I'm not sure how WineD3D works around what the game is doing to be honest... but it offers worse performance, so I also don't care that much. As a last note, I've also tried Log files
|
Hm, I think we should maybe add maxAvailableMemory to something sane on iGPUs to avoid the "allocating all RAM" problem. |
Fair point, but to be honest this is the only game I've ever had issues with. All other D3D9 stuff seems to behave nicely and NOT crunch on all they detect. It's hard IMHO to determine what might be a sane limit using a hard cutoff value, unless you go for something dynamic like 30% of system RAM for example. |
How much memory does your new laptop have out of curiosity? |
8GB in total. If my understanding is correct on how the heap size is calculated, having more RAM could potentially prevent the memory allocation error. But the game would still take up an unjustifiably large portion of RAM/VRAM. |
Well, not if the game decides it wants to eat all of it if you're on UMA. Maybe something like min(60%, 4GB) for UMA would be sensible |
I'll be happy to test whatever you come up with and think is best :). But for this particular game the crashes started between 3GB and 4GB max VRAM, as I mentioned above. |
While trying to narrow down the exact point on which the game breaks (just for fun), I noticed the following behavior: starting with It clearly does not know how to handle more video memory than it's ever been designed for... at this point I'm intrigued by why it works on my GTX 1080. Ancient NUMA magic maybe. |
While trying to start Majesty 2 on a laptop with only 4GB of RAM (unfortunately not upgradable) and an iGPU, the game hangs on startup with the infamous:
DxvkMemoryAllocator: Memory allocation failed
exception.I thought initially it's LAA related, but it's not. The game starts up and plays just fine if I use:
d3d9.maxAvailableMemory = 1024
A couple of other points:
I have a feeling this has the potential of opening a can of worms, but can anything be done to improve the memory allocation logic in such scenarios?
Software information
Majesty 2 (GOG version), others may be affected as well.
System information
Apitrace file(s)
N/A
Log files
The text was updated successfully, but these errors were encountered: