[Mesa-dev] [PATCH] squash! nir/linker: Add gl_nir_link_uniforms()

Alejandro PiƱeiro apinheiro at igalia.com
Wed Jun 20 12:27:38 UTC 2018

From: Neil Roberts <nroberts at igalia.com>

Sets var->driver.location if the uniform was found from a previous

Hi Timothy,

thanks for the review of the original patch. Recently we found that we
missed a little thing (one line). As we didn't push it to master yet,
could you take a look to this change, so we could include it now?


 src/compiler/glsl/gl_nir_link_uniforms.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c
index a8ebde73270..d3a39577177 100644
--- a/src/compiler/glsl/gl_nir_link_uniforms.c
+++ b/src/compiler/glsl/gl_nir_link_uniforms.c
@@ -419,6 +419,7 @@ gl_nir_link_uniforms(struct gl_context *ctx,
          uniform = find_previous_uniform_storage(prog, var->data.location);
          if (uniform) {
             uniform->active_shader_mask |= 1 << shader_type;
+            var->data.location = uniform - prog->data->UniformStorage;

More information about the mesa-dev mailing list