Page 1 of 1
Could not allocate memory for vulkan buffer
Posted: Wed Jun 23, 2021 10:55 pm
by Ghost Prototype
I want to know why this happens in GZD v4.6 and up, but not with 4.5.0.
When I use InventoryReader, it CTD after a few seconds with this message "Could not allocate memory for vulkan buffer: out of device memory".
pk3 included in the crash report.
Re: Could not allocate memory for vulkan buffer
Posted: Sun Jul 18, 2021 11:00 am
by Zhs2
Getting this error too, but I have steps to reproduce. Running a recent AMD GPU.
1. Grab JGP's
Painslayer mod and load it up under the Vulkan renderer.
2. Start a new game, be taken to the tarot card board.
3. Wait a couple seconds, it'll crash with an out of memory error.
Here's the related crash report.
Re: Could not allocate memory for vulkan buffer
Posted: Sun Jul 18, 2021 11:13 am
by Zhs2
Addendum to the above: if you follow the first step but also specify that GZDoom should go straight to a map, by providing either +map or +skill as command line parameters, GZDoom will immediately crash with Integer Divide by Zero instead - with Vulkan enabled of course, this does not happen in other renderers. Related crash report attached.
Re: Could not allocate memory for vulkan buffer
Posted: Tue Jul 20, 2021 6:42 am
by Ghost Prototype
IIRC both Divine Frequency & Painslayer use ZForms. Weird thing is using GZD v4.5.0's with Vulkan rendering did not cause the crash. OpenGL with GZD's current version is also safe as well.
Re: Could not allocate memory for vulkan buffer
Posted: Tue Jul 20, 2021 7:04 am
by dpJudas
So far all the 'could not allocate memory' errors have been caused by higher level GZDoom rendering code requesting zero byte buffers, which the heap management library used by the vulkan code doesn't support. If there are divide by zero errors that also would indicate something passed in a zero that shouldn't have done so.
Re: Could not allocate memory for vulkan buffer
Posted: Sun Jul 25, 2021 9:50 am
by Ghost Prototype
Is there anything I can do about this? Or is it just a hardware issue.
Re: Could not allocate memory for vulkan buffer
Posted: Fri Aug 06, 2021 8:50 am
by Guest
Hello.
Yeah, old pesky error...
gl_precache enabled with Vulkan engine will cause a program to crash even faster.
This error will always occur if you "clog" your GPU VRAM.
For example, massive anti-aliasing or texture scaling set too high.
Usually it won't crash under OpenGL, but it will slow down the game a lot, as textures will start loading into RAM
I have a graphics card with a lot of VRAM, but the program crashes anyway with Vulkan.
gl_precache is a useful function as it store textures into VRAM and the game runs fine without stuttering/reading further textures.
Disabling gl_precache obviously allows me to play the game, but "WADs" like "Total Chaos" are unfortunately stuttering.
You can definitely do something about it to prevent these crashes.
Regards.