From 541594b04432710b5dba74277443420c9aa97e04 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 23 Jun 2009 12:46:11 -0600 Subject: [PATCH] glsl: added slang_oper_child_const() --- src/mesa/shader/slang/slang_compile_operation.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index f07aa1c02e7..b701d9a957c 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -172,6 +172,14 @@ slang_oper_child(slang_operation *oper, GLuint child) } +static INLINE const slang_operation * +slang_oper_child_const(const slang_operation *oper, GLuint child) +{ + assert(child < oper->num_children); + return &oper->children[child]; +} + + /** Init oper to a boolean literal. */ static INLINE void slang_operation_literal_bool(slang_operation *oper, GLboolean value) -- 2.30.2