glsl: call check_subroutine_resources() from the nir linker
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 6 Jan 2020 23:15:23 +0000 (10:15 +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 ad26507bcc639350dfc792253224540b5f7559e2..945a3922bb0744a40281f54cda176faf38775351 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_check_subroutine_resources(prog);
    check_image_resources(ctx, prog);
    gl_nir_link_assign_atomic_counter_resources(ctx, prog);
    gl_nir_link_check_atomic_counter_resources(ctx, prog);
index f2ea266c9d6bdec6cad5ad1d74ea31a539bbbeb5..62b308bb708f20a124fc9c1fcb38cdb37edf9e64 100644 (file)
@@ -4521,9 +4521,9 @@ link_and_validate_uniforms(struct gl_context *ctx,
 
    link_calculate_subroutine_compat(prog);
    check_resources(ctx, prog);
-   link_util_check_subroutine_resources(prog);
 
    if (!ctx->Const.UseNIRGLSLLinker) {
+      link_util_check_subroutine_resources(prog);
       check_image_resources(ctx, prog);
       link_assign_atomic_counter_resources(ctx, prog);
       link_check_atomic_counter_resources(ctx, prog);