summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 2aa9f05a3f0..cbe7d205839 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -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;
}