gl: Wait for shader compilation to complete server-side before attaching to a program

This commit is contained in:
kd-11 2026-04-14 02:23:52 +03:00 committed by kd-11
parent 3fc41b6d66
commit 2bb533274c

View file

@ -183,6 +183,12 @@ namespace gl
program& attach(const shader& shader_)
{
if (const auto& comp_fence = shader_.get_compile_fence_sync();
!comp_fence.check_signaled())
{
comp_fence.server_wait_sync();
}
glAttachShader(m_id, shader_.id());
return *this;
}