glsl: call uniform resource checks from the nir linker
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 6 Jan 2020 23:30:17 +0000 (10:30 +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 945a3922bb0744a40281f54cda176faf38775351..59ef963a86094ae21ab6b111a477f54f5cc71802 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_uniform_resources(ctx, prog);
    link_util_check_subroutine_resources(prog);
    check_image_resources(ctx, prog);
    gl_nir_link_assign_atomic_counter_resources(ctx, prog);
index 2c4c0051fc62f9d894b297ba29de2cb9e7687281..ce0ab7ac32232e846e3f7c28313e8f03bb7b1c89 100644 (file)
@@ -4441,9 +4441,9 @@ link_and_validate_uniforms(struct gl_context *ctx,
       return;
 
    link_calculate_subroutine_compat(prog);
-   link_util_check_uniform_resources(ctx, prog);
 
    if (!ctx->Const.UseNIRGLSLLinker) {
+      link_util_check_uniform_resources(ctx, prog);
       link_util_check_subroutine_resources(prog);
       check_image_resources(ctx, prog);
       link_assign_atomic_counter_resources(ctx, prog);