mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 17:10:26 +01:00
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 <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit c2ff3485b3)
This commit is contained in:
parent
e77d8eb4b6
commit
16d35dbd56
1 changed files with 3 additions and 1 deletions
|
|
@ -2630,7 +2630,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue