do not compile the first shader in the shader manager's constructor

This was crashing with the move of the V_Init2 call. Instead do it when we first render something so that we can open the window without immediately making the full backend operational.
This was only working on GLES because it performs lazy shader compilation.
This commit is contained in:
Christoph Oelckers 2024-01-05 16:54:28 +01:00
parent 8ad15de138
commit a020b8c2f5
3 changed files with 2 additions and 2 deletions

View file

@ -788,7 +788,6 @@ FShaderCollection::FShaderCollection(EPassType passType)
{
mEffectShaders[i] = NULL;
}
CompileNextShader();
}
//==========================================================================

View file

@ -115,7 +115,7 @@ bool VkShaderManager::CompileNextShader()
VkShaderManager::VkShaderManager(VulkanRenderDevice* fb) : fb(fb)
{
CompileNextShader();
//CompileNextShader();
}
VkShaderManager::~VkShaderManager()

View file

@ -3262,6 +3262,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector<std::string>& allw
if (!batchrun) Printf ("V_Init: allocate screen.\n");
if (!restart)
{
screen->CompileNextShader();
if (StartScreen != nullptr) StartScreen->Render();
}
else