[GZDoom 4.1.2] "Could not create Vulkan image"

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

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.
User avatar
axredneck
Posts: 354
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia
Contact:

[GZDoom 4.1.2] "Could not create Vulkan image"

Post by axredneck »

GZDoom crashes with "Could not create Vulkan image" error message.

How to reproduce:
- Enable Vulkan
- Restart GZDoom
- Load saved game
- Load saved game again

GZDoom 4.1.2 built from sources, PLUTONIA.WAD from Steam, no mods, Arch Linux, Geforce GTX 1050 (driver 430.14).

Log and gzdoom.ini attached.
Attachments
gzdoom.ini
(56.26 KiB) Downloaded 137 times
gzdoom.log
(2.54 KiB) Downloaded 63 times
dpJudas
 
 
Posts: 3037
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by dpJudas »

Did you build 4.1.2 or latest master? If you used 4.1.2, please try again with master just to be sure it isn't something already fixed.

Edit: just for the record, works just fine on my computer to load savegame multiple times in a row (on master)
User avatar
axredneck
Posts: 354
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia
Contact:

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by axredneck »

I tried master 2 days ago - the same issue. Will try again today.

How to reproduce more reliably:
- Load saved game
- Play a bit
- Quickload
- Play a bit
- Quickload again

Edit: tried current master - still an issue.

Edit2: tried with DOOM2.WAD and new game - no issue. Maybe my savegame of Plutonia is corrupted but with OpenGL and Softpoly it works well but with Vulkan it crashes.

Edit3: deleted gzdoom.ini, tried the same Plutonia savegame - no issue.
Attachments
save12.zds
(121.06 KiB) Downloaded 32 times
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by _mental_ »

You shouldn’t delete .ini file, but rename it. Apparently, a particular combination of settings caused this issue. How can we figure out this without old configuration file?

EDIT: Did .ini file attached in OP cause the bug?
User avatar
axredneck
Posts: 354
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia
Contact:

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by axredneck »

Yes, i renamed it, not deleted.
EDIT: Did .ini file attached in OP cause the bug?
Yes, it does. This config, save12.zds (attached above) and PLUTONIA.WAD from Steam's Final Doom.
MD5sum of my PLUTONIA.WAD is 75c8cf89566741fa9d22447604053bd7.
User avatar
axredneck
Posts: 354
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia
Contact:

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by axredneck »

I just reproduced the same issue without savegames:
- Use GZDoom with my config (attached above)
- Try to play this map: https://www.doomworld.com/idgames/level ... d-f/europe
It crashes with different errors each time, sometimes it's "Could not create Vulkan image", sometimes it's something different.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by Marisa the Magician »

Ah, I suppose it's the hq resize. The 1050 has very little VRAM, doesn't it?

I did notice that with 6x resizing, loading map24 of plutonia, then saving and reloading the save, made VRAM usage from gzdoom alone to rise to 2.5GB.

In my case, with a 6GB 1060 I can easily reproduce this error by loading Total Chaos with those resizing settings.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by Graf Zahl »

And in that case the fatal error is expected behavior. I have complained several times myself about the usefulness of these excessively high scaling factors, but some people seem to be too attached to "more pixels" that removing them is not an option. Just one word: They are not meant for low RAM graphics hardware! BTW, 6x scaling more than doubles video ram usage over 4x while providing virtually no improvement whatsoever.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by _mental_ »

Taking into account that vkCreateImage() fails only with out-of-memory codes, we can revise the error message.
Probably, this applies to some other functions as well. I guess, getting out-of-memory on texture allocation is just the most common case.
dpJudas
 
 
Posts: 3037
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by dpJudas »

I just pushed a commit that adds the VkResult status code to vulkan errors. Now it will include it failed due to memory allocation failure.

I also changed how vulkan errors are reported - before it was a bit random if it throwed CRecoverableError or CFatalError. The issue was that CFatalError couldn't be used during initialization, but on the other hand CRecoverableError can't be used after initialization. Vulkan is an API with virtually no error checking, which means that restarting rendering randomly will never work as the general code now don't know which state the various vulkan objects were left in. I solved this by adding a CVulkanError type that the init code can catch and use for falling back to OpenGL, but also will cause a fatal error if such an error is thrown later on.
User avatar
MasterBeavis
Posts: 43
Joined: Mon May 13, 2019 5:19 pm
Preferred Pronouns: Ask Me
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by MasterBeavis »

should i give this new build a try and post the log from amd crash again?
dpJudas
 
 
Posts: 3037
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by dpJudas »

No, I don't think your crash is related to this. Your log files didn't have any error messages in them.
User avatar
axredneck
Posts: 354
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia
Contact:

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by axredneck »

I forgot that i set 6x scaling (yes, it doesn't look much different from 4x). I thought i have enough VRAM because OpenGL didn't complain, so i thought it's a bug of Vulkan renderer.
Rebuilt git master, tried europe.wad again with 6x scaling, now it says that i have not enough memory. I will play with 4x from now.
Here is a log:
Attachments
gzdoom.log
(2.21 KiB) Downloaded 25 times
User avatar
axredneck
Posts: 354
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia
Contact:

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by axredneck »

The same europe.wad, the same config but 4x scaling, "Out of device memory" after loading quicksave. Will try with 2x. Does Vulkan consume much more VRAM than OpenGL?
dpJudas
 
 
Posts: 3037
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom 4.1.2] "Could not create Vulkan image"

Post by dpJudas »

Yes and no. Memory management is more manual in vulkan so it is quite plausible the current implementation uses more memory than OpenGL.

There's currently two main things that will increase the memory requirements for sure: memory resources aren't released until the end of a frame if no longer needed, which may affect precaching. I'm not 100% sure without looking closer at the code. And then strictly 2D textures will use approx 66% more memory due to mipmaps always being allocated for them.

Last, there's the chance an OpenGL driver might attempt to compact memory when running low. I think the vma allocation library used for vulkan supports something like this, but I'm not sure how nasty it would be to hook up.
Last edited by dpJudas on Thu May 23, 2019 1:13 pm, edited 1 time in total.
Post Reply

Return to “Closed Bugs [GZDoom]”