glsl: make sure to only add subroutines to resource list
authorTimothy Arceri <t_arceri@yahoo.com.au>
Tue, 3 Nov 2015 21:41:29 +0000 (08:41 +1100)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Wed, 4 Nov 2015 04:43:12 +0000 (15:43 +1100)
Over looked in 763cd8c080353.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/glsl/linker.cpp

index 3ad295587f8d4d25bffc8644492dc1f26ab3be65..26c02986be4a7dacbf2f64b3069dddcad9c17687 100644 (file)
@@ -3776,7 +3776,8 @@ build_program_resource_list(struct gl_shader_program *shProg)
          continue;
 
       for (int j = MESA_SHADER_VERTEX; j < MESA_SHADER_STAGES; j++) {
-         if (!shProg->UniformStorage[i].opaque[j].active)
+         if (!shProg->UniformStorage[i].opaque[j].active ||
+             !shProg->UniformStorage[i].type->is_subroutine())
             continue;
 
          type = _mesa_shader_stage_to_subroutine_uniform((gl_shader_stage)j);