diff options
author | Brian Paul <brianp@vmware.com> | 2009-06-23 12:46:11 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-06-26 13:16:32 -0600 |
commit | 541594b04432710b5dba74277443420c9aa97e04 (patch) | |
tree | ad59e0418bf9d996b85de85fe969bb337f92d553 /src | |
parent | 38ddbc5588a9922854e9191cda42d37cb01e70aa (diff) |
glsl: added slang_oper_child_const()
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/slang/slang_compile_operation.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index f07aa1c02e..b701d9a957 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) |