i965: Link uniforms of SPIR-V programs using the NIR linker
authorEduardo Lima Mitev <elima@igalia.com>
Tue, 14 Nov 2017 16:44:39 +0000 (17:44 +0100)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 21 Jun 2018 12:25:05 +0000 (14:25 +0200)
v2: nir_link_uniforms renamed to gl_nir_link_uniforms

Signed-off-by: Eduardo Lima <elima@igalia.com>
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/drivers/dri/i965/brw_link.cpp

index c75721c06ca7e725c68d52c53e0a6da5e750f6f9..8bc97fa4f3ecee837cd6050b52458bf0b58d64c7 100644 (file)
@@ -261,6 +261,12 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
                                  compiler->scalar_stage[stage]);
    }
 
+   /* SPIR-V programs use a NIR linker */
+   if (shProg->data->spirv) {
+      if (!gl_nir_link_uniforms(ctx, shProg))
+         return false;
+   }
+
    /* Determine first and last stage. */
    unsigned first = MESA_SHADER_STAGES;
    unsigned last = 0;