[GZDoom 4.1.2] "Could not create Vulkan image"
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.
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.
- 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"
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.
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
Re: [GZDoom 4.1.2] "Could not create Vulkan image"
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)
Edit: just for the record, works just fine on my computer to load savegame multiple times in a row (on master)
- 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"
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.
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
Re: [GZDoom 4.1.2] "Could not create Vulkan image"
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?
EDIT: Did .ini file attached in OP cause the bug?
- 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"
Yes, i renamed it, not deleted.
MD5sum of my PLUTONIA.WAD is 75c8cf89566741fa9d22447604053bd7.
Yes, it does. This config, save12.zds (attached above) and PLUTONIA.WAD from Steam's Final Doom.EDIT: Did .ini file attached in OP cause the bug?
MD5sum of my PLUTONIA.WAD is 75c8cf89566741fa9d22447604053bd7.
- 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"
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.
- 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.
- 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"
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.
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.
- Graf Zahl
- 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"
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.
Re: [GZDoom 4.1.2] "Could not create Vulkan image"
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.
Probably, this applies to some other functions as well. I guess, getting out-of-memory on texture allocation is just the most common case.
Re: [GZDoom 4.1.2] "Could not create Vulkan image"
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.
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.
- 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"
should i give this new build a try and post the log from amd crash again?
Re: [GZDoom 4.1.2] "Could not create Vulkan image"
No, I don't think your crash is related to this. Your log files didn't have any error messages in them.
- 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"
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:
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
- 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"
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?
Re: [GZDoom 4.1.2] "Could not create Vulkan image"
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.
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.