mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-18 10:36:59 +00:00
only use GL_COMPLETION_STATUS_ARB when the extension is used
This commit is contained in:
parent
328509e719
commit
7a4c539a00
1 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue