diff options
author | Tapani Pälli <[email protected]> | 2015-06-11 10:41:52 +0300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-06-24 12:01:21 -0700 |
commit | c2ff3485b3d48749ea9dcad07bc1a691627dc3e5 (patch) | |
tree | cbfaef450e33045e647c3e6b51ee406891fca447 /src/glsl/linker.cpp | |
parent | 4b35ab9bdb4e663f41ff5c9ae5bbcc650b6093f9 (diff) |
glsl: clone inputs and outputs during linking
This increases memory pressure during linking but makes it easier
for backend to free IR after it is not needed anymore.
v2: use resource list as ralloc context in case of relink (Kenneth)
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 4a726d4e2e7..5da9cadcb08 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -2637,7 +2637,9 @@ add_interface_variables(struct gl_shader_program *shProg, continue; }; - if (!add_program_resource(shProg, programInterface, var, + /* Clone ir_variable data so that backend is able to free memory. */ + if (!add_program_resource(shProg, programInterface, + var->clone(shProg->ProgramResourceList, NULL), build_stageref(shProg, var->name) | mask)) return false; } |