Could not allocate memory for vulkan buffer

Moderator: GZDoom Developers

User avatar
Ghost Prototype
Posts: 185
Joined: Sun May 19, 2013 12:22 pm
Location: Philadelphia

Could not allocate memory for vulkan buffer

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
Zhs2
Posts: 1291
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: Could not allocate memory for vulkan buffer

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
Zhs2
Posts: 1291
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: Could not allocate memory for vulkan buffer

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
Ghost Prototype
Posts: 185
Joined: Sun May 19, 2013 12:22 pm
Location: Philadelphia

Re: Could not allocate memory for vulkan buffer

Post 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.
dpJudas
 
 
Posts: 3145
Joined: Sat May 28, 2016 1:01 pm

Re: Could not allocate memory for vulkan buffer

Post 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.
User avatar
Ghost Prototype
Posts: 185
Joined: Sun May 19, 2013 12:22 pm
Location: Philadelphia

Re: Could not allocate memory for vulkan buffer

Post by Ghost Prototype »

Is there anything I can do about this? Or is it just a hardware issue.
Guest

Re: Could not allocate memory for vulkan buffer

Post 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.

Return to “Vulkan Renderer Bugs”