Skip to content

Commit 25713c7

Browse files
committed
Don't query GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS if no subroutines
* Works around some mesa debug message spam if no subroutines exist.
1 parent 207b248 commit 25713c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

renderdoc/driver/gl/gl_renderstate.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,12 @@ void GLRenderState::FetchState(void *ctx, WrappedOpenGL *gl)
853853
if(prog == 0)
854854
continue;
855855

856+
GLint numSubroutines = 0;
857+
m_Real->glGetProgramStageiv(prog, shs[s], eGL_ACTIVE_SUBROUTINES, &numSubroutines);
858+
859+
if(numSubroutines == 0)
860+
continue;
861+
856862
m_Real->glGetProgramStageiv(prog, shs[s], eGL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS,
857863
&Subroutines[s].numSubroutines);
858864

0 commit comments

Comments
 (0)