mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 10:18:05 +02:00
glsl: added slang_operation_insert_child()
This commit is contained in:
parent
f4b1a69b7d
commit
fc0896b50b
2 changed files with 23 additions and 0 deletions
|
|
@ -265,6 +265,26 @@ slang_operation_insert(GLuint *numElements, slang_operation **array,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add/insert new child into given node at given position.
|
||||
* \return pointer to the new child node
|
||||
*/
|
||||
slang_operation *
|
||||
slang_operation_insert_child(slang_operation *oper, GLuint pos)
|
||||
{
|
||||
slang_operation *newOp;
|
||||
|
||||
newOp = slang_operation_insert(&oper->num_children,
|
||||
&oper->children,
|
||||
pos);
|
||||
if (newOp) {
|
||||
newOp->locals->outer_scope = oper->locals;
|
||||
}
|
||||
|
||||
return newOp;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_slang_operation_swap(slang_operation *oper0, slang_operation *oper1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -157,6 +157,9 @@ extern slang_operation *
|
|||
slang_operation_insert(GLuint *numChildren, slang_operation **children,
|
||||
GLuint pos);
|
||||
|
||||
extern slang_operation *
|
||||
slang_operation_insert_child(slang_operation *oper, GLuint pos);
|
||||
|
||||
extern void
|
||||
_slang_operation_swap(slang_operation *oper0, slang_operation *oper1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue