summaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp4
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;
}