Don't query GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS if no subroutines

* Works around some mesa debug message spam if no subroutines exist.
This commit is contained in:
baldurk
2018-02-01 16:17:13 +00:00
parent bf457be9f1
commit 26c6456c8e
+6
View File
@@ -907,6 +907,12 @@ void GLRenderState::FetchState(WrappedOpenGL *gl)
if(prog == 0)
continue;
GLint numSubroutines = 0;
m_Real->glGetProgramStageiv(prog, shs[s], eGL_ACTIVE_SUBROUTINES, &numSubroutines);
if(numSubroutines == 0)
continue;
m_Real->glGetProgramStageiv(prog, shs[s], eGL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS,
&Subroutines[s].numSubroutines);