Unfortunately, subroutine bindings get reset when a shader program is unbound (switched out) from the pipeline by calling glUseProgram or another technique. This requires us to call glUniformSubroutinsuiv each time that we activate a shader program.
A subroutine function defined in a shader can match more than one subroutine type. The subroutine qualifier can contain a comma-separated list of subroutine types. For example, if a subroutine matched the types type1 and type2, we could use the following qualifier:
subroutine( type1, type2 )
This would allow us to use subroutine uniforms of differing types to refer to the same subroutine function.