st/mesa: release GLSL IR in LinkShader after it's not needed
authorMarek Olšák <marek.olsak@amd.com>
Mon, 5 Oct 2015 21:18:18 +0000 (23:18 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 11 Feb 2016 16:31:40 +0000 (17:31 +0100)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index ff89be37cbbc7845d2033ee7e00fed6f44af484c..2ad91ecf4dfd5c2af5ec77e7c98288b6e1f5abe1 100644 (file)
@@ -6149,6 +6149,10 @@ get_mesa_program(struct gl_context *ctx,
                              prog->OutputsWritten, 0ULL, prog->PatchOutputsWritten);
    count_resources(v, prog);
 
+   /* The GLSL IR won't be needed anymore. */
+   ralloc_free(shader->ir);
+   shader->ir = NULL;
+
    /* This must be done before the uniform storage is associated. */
    if (shader->Type == GL_FRAGMENT_SHADER &&
        (prog->InputsRead & VARYING_BIT_POS ||