mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 18:00:13 +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
This commit is contained in:
parent
4b35ab9bdb
commit
c2ff3485b3
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue