diff options
author | Timothy Arceri <[email protected]> | 2020-01-07 14:38:14 +1100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-21 01:57:34 +0000 |
commit | 95f555a93a8891ebba2a291eecd984eb2364d636 (patch) | |
tree | e23d864f888ba3892b04856871e82209085302d9 /src/compiler/glsl | |
parent | 0f79e0f7c62d4ac34e6a4a827b5433402cf7c223 (diff) |
st/glsl_to_nir: make use of nir linker for linking uniforms
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4395>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/gl_nir_linker.c | 3 | ||||
-rw-r--r-- | src/compiler/glsl/linker.cpp | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index c8cb6457f96..fb8b3e0c340 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -622,6 +622,9 @@ 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); diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 292da60b9d9..72713fa2e66 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4441,12 +4441,13 @@ link_and_validate_uniforms(struct gl_context *ctx, struct gl_shader_program *prog) { update_array_sizes(prog); - link_assign_uniform_locations(prog, ctx); - - if (prog->data->LinkStatus == LINKING_FAILURE) - return; if (!ctx->Const.UseNIRGLSLLinker) { + link_assign_uniform_locations(prog, ctx); + + if (prog->data->LinkStatus == LINKING_FAILURE) + return; + link_util_calculate_subroutine_compat(prog); link_util_check_uniform_resources(ctx, prog); link_util_check_subroutine_resources(prog); |