From 5951ab311db1e716cada3ada87187e50d4434ee4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 24 Jun 2009 16:04:33 -0600 Subject: glsl: added slang_operation_free_children() --- src/mesa/shader/slang/slang_compile_operation.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/mesa/shader/slang/slang_compile_operation.c') diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index b75fd073af..48586c2d96 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -200,6 +200,20 @@ slang_operation_delete(slang_operation *oper) } +void +slang_operation_free_children(slang_operation *oper) +{ + GLuint i; + for (i = 0; i < slang_oper_num_children(oper); i++) { + slang_operation *child = slang_oper_child(oper, i); + slang_operation_destruct(child); + } + _slang_free(oper->children); + oper->children = NULL; + oper->num_children = 0; +} + + slang_operation * slang_operation_grow(GLuint *numChildren, slang_operation **children) { -- cgit v1.2.3