[Mesa-dev] [PATCH] glsl: use correct context when cloning variable
Ilia Mirkin
imirkin at alum.mit.edu
Sun Jun 28 21:45:03 PDT 2015
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
I'm not really clear on how ralloc, clone, etc all work. However
experimentally, this makes the leak go away from:
bin/fbo-generatemipmap-formats GL_ARB_depth_texture -auto
(and likely others). In fact the ProgramResourceList is reralloc'd
with the shProg as a context as well.
src/glsl/linker.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 5da9cad..2dca9a8 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2639,7 +2639,7 @@ add_interface_variables(struct gl_shader_program *shProg,
/* Clone ir_variable data so that backend is able to free memory. */
if (!add_program_resource(shProg, programInterface,
- var->clone(shProg->ProgramResourceList, NULL),
+ var->clone(shProg, NULL),
build_stageref(shProg, var->name) | mask))
return false;
}
--
2.3.6
More information about the mesa-dev
mailing list