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
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;
}