[4.7.1] Vulkan Buffer: Out of Device Memory

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [4.7.1] Vulkan Buffer: Out of Device Memory

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Graf Zahl » Mon Apr 04, 2022 12:16 am

Because this thread has already been closed. Never bump closed bug reports when having a problem. These will inevitably be forgotten.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by marco.nadal.75 » Mon Apr 04, 2022 12:10 am

Major Cooke wrote:Please make a new thread.
Because of Necroposting or because dev builds have reached version 4.8.1?

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Ghost Prototype » Sun Apr 03, 2022 3:23 pm

As of using the 4.8 dev build. I no longer have this crash.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Major Cooke » Sun Apr 03, 2022 12:06 am

Please make a new thread.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by marco.nadal.75 » Sat Apr 02, 2022 4:53 pm

I'm using 4.7.1 dev build and this bug crashes the game
https://devbuilds.drdteam.org/gzdoom/gz ... 49a0d8f.7z

I'm using Project Brutality Custom Build from this link:
https://telegra.ph/Project-Brutality-Custom-Build-03-05

When I am running PBCB with OpenGL API, the .m3D and voxel models are rendered incorrectly. This is due to AMD no longer fixing OpenGL bugs or paying any attention to it, since OpenGL is obsolete and is being supplanted by Vulkan.
Has a novel look because of the reshade.me filters that were chosen. Plays well, has some screen tearing.

When I run PBCB with Vulkan API, the 3D and voxel models are rendered correctly. The reshade.me filters are disabled, but framerate is good and it plays great, until it crashes with the Vulkan Buffer: Out of Device Memory.

I thought the Vulkan bug was fixed in the 4.7.1 dev builds?

Any suggestions what I could try?

I'm updating my AMD drivers from 22.2.3 to 22.3.1. ATM
PBCB is a really nice mod pack, I don't mind spending some time to troubleshoot it.

Thanks for your time reading this, and I look forward to your input!
Attachments
CrashReport.zip
(128.33 KiB) Downloaded 40 times

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Graf Zahl » Wed Oct 27, 2021 10:44 am

You cannot really fix that. When the GC starts its cleanup it needs to free a lot of objects and that costs time. Depending on the type of objects it can indeed cause some lag if taking them down is a non-trivial affair.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Nash » Wed Oct 27, 2021 10:00 am

Ghost Prototype wrote:Things will occasionally lag when the GC starts doing its cleaning
Huh, strange... I thought that was already fixed...

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Ghost Prototype » Wed Oct 27, 2021 7:06 am

Tested with the latest dev build. Can confirm it's fixed. I left the menu opened for 5+ min and no crash. Things will occasionally lag when the GC starts doing its cleaning (I don't actually know what is going on but i'm assuming it's that) but definitely no crash. Thank you so much for fixing this.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by dpJudas » Tue Oct 26, 2021 7:48 pm

I created a PR fix for this: https://github.com/coelckers/gzdoom/pull/1497. Note that since I don't own an AMD card I can't actually confirm it fixed it. It should though, as this will make it use a different heap for the 2D drawer.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Graf Zahl » Thu Oct 21, 2021 7:44 am

Correct. These buffers are supposed to be static. Considering that they can be longer lived they really should not occupy such a limited resource as host visible memory.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by dpJudas » Thu Oct 21, 2021 7:10 am

Unless I am missing something, those vertex buffers used by this feature does not have to pass in false when calling SetData. If the hardware layer tells the vulkan backend the buffer is static then it will create a transfer buffer in system memory (heap #1 for this card) and then transfer it to a vertex buffer in video memory (heap #0).

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Graf Zahl » Thu Oct 21, 2021 6:20 am

AMD does indeed provide only 256 MB of host visible memory. They surely know how to cripple their cards.
The main question should be whether it is necessary to use host visible memory for these static 2D vertex buffers or if the code can be rewritten to use another type of memory.
A large portion of this heap is already used for the persistently mapped buffers so using it for convenience for all buffers may not be such a good idea.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by dpJudas » Thu Oct 21, 2021 5:57 am

Perhaps AMD cards have less memory available for vertex buffers?

Edit: looking at the memory stats at gpuinfo.org for that particular GPU makes it a bit more mysterious. It reports 3 different vulkan heaps: two that are 8 gigs in size and one that is 256 megabytes.

F2DVertexBuffer specifies that the memory is not static, which makes VKBuffer::SetData require a memory heap that is both host visible and device local. That means heap #2 that is only 256 MB in size. Now the question is, does the GC kick in before that?

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Nash » Thu Oct 21, 2021 5:46 am

Seems to be an AMD-only thing. I am also unable to repro it with PDA Kit 1.2 and GZDoom 4.7.1.

Re: [4.7.1] Vulkan Buffer: Out of Device Memory

by Enjay » Thu Oct 21, 2021 5:34 am

This sounds very much like a problem that I had with 4.7.0 but I have not seen it since the dev builds were changed to fix it and I can't make it happen with 4.7.1 either.

Using my own test files and Nash's kit, I can have the PDAs open for several minutes and not experience a crash. I've ran it with the garbage collector stats on screen it there doesn't seem to be a problem there.

So I'm not sure why this is crashing for you. I was going to suggest that you'd inadvertently run it with 4.7.0 but I see from your crash report that isn't the case.

Top