summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 4a726d4..5da9cad 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;
}