mesa/glspirv: Set separate_shader on shader_info
authorNeil Roberts <nroberts@igalia.com>
Mon, 26 Mar 2018 15:12:41 +0000 (17:12 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 13 Aug 2018 14:28:27 +0000 (16:28 +0200)
The value is copied from the gl_program. If we don’t do this then it
will get reset back to zero in brw_shader_gather_info. This isn’t a
problem for GLSL because in that case the nir_shader is initialised
with a copy of the shader_info from the gl_program.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/main/glspirv.c

index 5a2d6a4..4fc80b7 100644 (file)
@@ -252,6 +252,8 @@ _mesa_spirv_to_nir(struct gl_context *ctx,
                       prog->Name);
    nir_validate_shader(nir);
 
+   nir->info.separate_shader = linked_shader->Program->info.separate_shader;
+
    /* We have to lower away local constant initializers right before we
     * inline functions.  That way they get properly initialized at the top
     * of the function and not at the top of its caller.