spirv: add ReadClockKHR support with device scope
[mesa.git] / src / compiler / glsl / gl_nir_linker.c
index b3832e5629fcd7bd0fbb426ec590fd85fc9189d9..fb8b3e0c340967de9798aa65f86ced678cf73ba8 100644 (file)
 #include "main/shaderobj.h"
 #include "ir_uniform.h" /* for gl_uniform_storage */
 
-/* This file included general link methods, using NIR, instead of IR as
+/**
+ * This file included general link methods, using NIR, instead of IR as
  * the counter-part glsl/linker.cpp
- *
- * Also note that this is tailored for ARB_gl_spirv needs and particularities
  */
 
 /**
@@ -623,6 +622,13 @@ 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)
 {
+   if (!gl_nir_link_uniforms(ctx, prog, true))
+      return false;
+
+   link_util_calculate_subroutine_compat(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);
    gl_nir_link_check_atomic_counter_resources(ctx, prog);