Mesa (glsl2): glsl2: Steal ir_variable's constant_value field.
Eric Anholt
anholt at kemper.freedesktop.org
Tue Jul 27 02:43:53 UTC 2010
Module: Mesa
Branch: glsl2
Commit: eb2cc4f1b1f5ac657c632aa41da5f23eb1cdbe10
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb2cc4f1b1f5ac657c632aa41da5f23eb1cdbe10
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Jul 23 12:49:17 2010 -0700
glsl2: Steal ir_variable's constant_value field.
Fixes a link-time crash in glsl-vs-cross-3.
---
src/glsl/ir.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 8ebef7d..2fd654e 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -908,6 +908,9 @@ visit_exec_list(exec_list *list, ir_visitor *visitor)
static void
steal_memory(ir_instruction *ir, void *new_ctx)
{
+ ir_variable *var = ir->as_variable();
+ if (var != NULL && var->constant_value != NULL)
+ talloc_steal(ir, var->constant_value);
talloc_steal(new_ctx, ir);
}
More information about the mesa-commit
mailing list