Vulkan apparently has some bug that I cannot quite yet understand. It's almost as if after a certain number of texture shaders it can't compile any more and just crashes out.
This has been reproduced with Doomreal. You need this and this, and a gzdoom built from commit bcef44051 or higher due to some script/bugfix requirements.
Here is a full backtrace of the crash.
What's odd about this is that if I comment out the gldefs block that uses that shader, it will then crash at the next one, and so on, until commenting them all out stops the crash.
Running on OpenGL works fine and there are no crashes.
Very odd texture shader crash
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.
- Marisa the Magician
- Banned User
- 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:
- Marisa the Magician
- Banned User
- 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: Very odd texture shader crash
Ah, figured out what the issue is, just take a look at this loop here in vk_shader.cpp
Specifically that LoadVertShader call.
Edit: Oh, sorry, I fixed the links now. Yes, it's a SIGSEGV.
Edit 2: The fix is as simple as changing that last argument to be defaultshaders[usershaders.shaderType].Defines
Code: Select all
for (unsigned i = 0; i < usershaders.Size(); i++)
{
FString name = ExtractFileBase(usershaders[i].shader);
FString defines = defaultshaders[usershaders[i].shaderType].Defines + usershaders[i].defines;
VkShaderProgram prog;
prog.vert = LoadVertShader(name, mainvp, defaultshaders[i].Defines);
prog.frag = LoadFragShader(name, mainfp, usershaders[i].shader, defaultshaders[usershaders[i].shaderType].lightfunc, defines, true, gbufferpass);
mMaterialShaders[j].push_back(std::move(prog));
}
Edit: Oh, sorry, I fixed the links now. Yes, it's a SIGSEGV.
Edit 2: The fix is as simple as changing that last argument to be defaultshaders[usershaders.shaderType].Defines
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Very odd texture shader crash
Well, it looks a bit ... different than the other uses of 'defaultshaders'..., if that's what you mean.
- Marisa the Magician
- Banned User
- 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: Very odd texture shader crash
Oh well, I made a PR for it.