diff options
author | Tapani Pälli <[email protected]> | 2015-06-11 10:41:53 +0300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-06-24 12:03:41 -0700 |
commit | 104c8fc2c2aa5621261f80aa6b4f76c3163078f1 (patch) | |
tree | 1e8d9a2b08974154344909440415eed80c21af0c /src | |
parent | c2ff3485b3d48749ea9dcad07bc1a691627dc3e5 (diff) |
i965: Delete linked GLSL IR when using NIR.
This is based on Kenneth's patch to delete 'most of the IR'. Due to
linker changes to clone variables, we can now free all of IR.
Saves 58MB of memory when replaying a Dota 2 trace on Broadwell.
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 32c40131434..5653d6ba1e4 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -387,8 +387,11 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) brw_add_texrect_params(prog); - if (options->NirOptions) + if (options->NirOptions) { prog->nir = brw_create_nir(brw, shProg, prog, (gl_shader_stage) stage); + ralloc_free(shader->ir); + shader->ir = NULL; + } _mesa_reference_program(ctx, &prog, NULL); } |