summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2020-01-07 13:49:50 +1100
committerTimothy Arceri <tarceri@itsqueeze.com>2020-01-10 00:41:20 +0000
commit87e0dd68f50748938e4abe0c6961b6704798afa3 (patch)
treeaa525c12079bfe6039d3ab7c3dbec68016b785e1
parent726e8f24c6eefe5b2d77fe0dbfd9d7c89fc224f4 (diff)
glsl: call calculate_subroutine_compat() from the nir linker
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
-rw-r--r--src/compiler/glsl/gl_nir_linker.c1
-rw-r--r--src/compiler/glsl/linker.cpp3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c
index 59ef963a860..2ca25bda818 100644
--- a/src/compiler/glsl/gl_nir_linker.c
+++ b/src/compiler/glsl/gl_nir_linker.c
@@ -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);
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index ef77389add4..880f42ae171 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -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);