[GZDoom 4.1.2] "Could not create Vulkan image"

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: [GZDoom 4.1.2] "Could not create Vulkan image"

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

by dpJudas » Thu May 23, 2019 1:20 pm

Hmm yes add _mental_'s stuff to the mix, and I also forgot the right now it allocates just as much memory for staging buffers as for the original texture images. I believe that memory is allocated in host memory, though.

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

by _mental_ » Thu May 23, 2019 1:12 pm

In out of VRAM condition OpenGL will use main memory silently (and you start to complain about its poor performance).
In Vulkan renderer this case must be handled explicitly.

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

by dpJudas » Thu May 23, 2019 1:12 pm

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.

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

by axredneck » Thu May 23, 2019 1:00 pm

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"

by axredneck » Thu May 23, 2019 12:49 pm

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 26 times

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

by dpJudas » Thu May 23, 2019 6:47 am

No, I don't think your crash is related to this. Your log files didn't have any error messages in them.

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

by MasterBeavis » Thu May 23, 2019 6:35 am

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"

by dpJudas » Thu May 23, 2019 6:16 am

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.

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

by _mental_ » Thu May 23, 2019 6:09 am

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.

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

by Graf Zahl » Thu May 23, 2019 5:47 am

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"

by Marisa the Magician » Thu May 23, 2019 3:27 am

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.

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

by axredneck » Wed May 22, 2019 5:30 pm

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.

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

by axredneck » Wed May 22, 2019 1:19 pm

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.

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

by _mental_ » Wed May 22, 2019 1:17 pm

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?

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

by axredneck » Wed May 22, 2019 12:51 pm

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

Top