If a subroutine uniform is declared with no functions backing it,
that isn't legal, so we should fail to link.
Fixes:
GL43-CTS.shader_subroutine.subroutine_uniform_wo_matching_subroutines
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
continue;
count = 0;
+ if (sh->NumSubroutineFunctions == 0) {
+ linker_error(prog, "subroutine uniform %s defined but no valid functions found\n", uni->type->name);
+ continue;
+ }
for (unsigned f = 0; f < sh->NumSubroutineFunctions; f++) {
struct gl_subroutine_function *fn = &sh->SubroutineFunctions[f];
for (int k = 0; k < fn->num_compat_types; k++) {