From: Brian Paul Date: Tue, 23 Jun 2009 18:46:11 +0000 (-0600) Subject: glsl: added slang_oper_child_const() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=541594b04432710b5dba74277443420c9aa97e04;p=mesa.git glsl: added slang_oper_child_const() --- 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)