glsl: call calculate_subroutine_compat() from the nir linker
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 7 Jan 2020 02:49:50 +0000 (13:49 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 10 Jan 2020 00:41:20 +0000 (00:41 +0000)
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/compiler/glsl/gl_nir_linker.c
src/compiler/glsl/linker.cpp

index 59ef963a86094ae21ab6b111a477f54f5cc71802..2ca25bda81873472bb3cc01c04f87a6f6ffad46c 100644 (file)
@@ -623,6 +623,7 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog)
 bool
 gl_nir_link_glsl(struct gl_context *ctx, struct gl_shader_program *prog)
 {
+   link_util_calculate_subroutine_compat(prog);
    link_util_check_uniform_resources(ctx, prog);
    link_util_check_subroutine_resources(prog);
    check_image_resources(ctx, prog);
index ef77389add4ec377af3544ca4ddcea6a44296503..880f42ae17159a9b47cac592019fe7bc8472b65b 100644 (file)
@@ -4404,9 +4404,8 @@ link_and_validate_uniforms(struct gl_context *ctx,
    if (prog->data->LinkStatus == LINKING_FAILURE)
       return;
 
-   link_util_calculate_subroutine_compat(prog);
-
    if (!ctx->Const.UseNIRGLSLLinker) {
+      link_util_calculate_subroutine_compat(prog);
       link_util_check_uniform_resources(ctx, prog);
       link_util_check_subroutine_resources(prog);
       check_image_resources(ctx, prog);