only use GL_COMPLETION_STATUS_ARB when the extension is used

This commit is contained in:
goeiecool9999 2025-07-24 10:18:59 +02:00
parent 328509e719
commit 7a4c539a00

View file

@ -146,9 +146,16 @@ bool RendererShaderGL::IsCompiled()
{
if(m_isCompiled)
return true;
GLint isShaderComplete;
if(!glMaxShaderCompilerThreadsARB)
{
WaitForCompiled();
return true;
}
GLint isShaderComplete = 0;
glGetShaderiv(m_shader_object, GL_COMPLETION_STATUS_ARB, &isShaderComplete);
if(isShaderComplete)
if (isShaderComplete)
WaitForCompiled(); // since COMPLETION_STATUS == true, this should be very fast
return m_isCompiled;
}