fix: check for pipeline creation when reloading shaders (#1543)

This is done in the editor, but was omitted in the samples, causing them
to crash.
This commit is contained in:
Dennis Brakhane
2026-02-08 21:45:09 +01:00
committed by GitHub
parent d1856f0e7f
commit 750d68bec2
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ int sdl_loop()
break;
case SDL_WINDOWEVENT_FOCUS_GAINED:
exampleImGui.is_window_active = true;
if (wi::shadercompiler::GetRegisteredShaderCount() > 0)
if (wi::shadercompiler::GetRegisteredShaderCount() > 0 && !wi::renderer::IsPipelineCreationActive())
{
std::thread([] {
wi::backlog::post("[Shader check] Started checking " + std::to_string(wi::shadercompiler::GetRegisteredShaderCount()) + " registered shaders for changes...");
+1 -1
View File
@@ -30,7 +30,7 @@ int sdl_loop()
break;
case SDL_WINDOWEVENT_FOCUS_GAINED:
exampleImGui.is_window_active = true;
if (wi::shadercompiler::GetRegisteredShaderCount() > 0)
if (wi::shadercompiler::GetRegisteredShaderCount() > 0 && !wi::renderer::IsPipelineCreationActive())
{
std::thread([] {
wi::backlog::post("[Shader check] Started checking " + std::to_string(wi::shadercompiler::GetRegisteredShaderCount()) + " registered shaders for changes...");
+1 -1
View File
@@ -32,7 +32,7 @@ int sdl_loop()
break;
case SDL_WINDOWEVENT_FOCUS_GAINED:
tests.is_window_active = true;
if (wi::shadercompiler::GetRegisteredShaderCount() > 0)
if (wi::shadercompiler::GetRegisteredShaderCount() > 0 && !wi::renderer::IsPipelineCreationActive())
{
std::thread([] {
wi::backlog::post("[Shader check] Started checking " + std::to_string(wi::shadercompiler::GetRegisteredShaderCount()) + " registered shaders for changes...");