glsl: added slang_oper_child_const()
authorBrian Paul <brianp@vmware.com>
Tue, 23 Jun 2009 18:46:11 +0000 (12:46 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 26 Jun 2009 19:16:32 +0000 (13:16 -0600)
src/mesa/shader/slang/slang_compile_operation.h

index f07aa1c02e7e8490fb4fe6734ac10074e5f29984..b701d9a957c999ecf8da89f4c00a2d4a90188bcd 100644 (file)
@@ -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)