projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf823b6
)
add _slang_multiply_swizzles()
author
Brian
<brian@yutani.localnet.net>
Sat, 3 Feb 2007 01:00:03 +0000
(18:00 -0700)
committer
Brian
<brian@yutani.localnet.net>
Sat, 3 Feb 2007 01:00:03 +0000
(18:00 -0700)
src/mesa/shader/slang/slang_typeinfo.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_typeinfo.c
b/src/mesa/shader/slang/slang_typeinfo.c
index 8bedb40435ab0e54d41439a2dc272f9afab02ee5..5a3c2eac6b4e74e1574585fc4737adc76d281767 100644
(file)
--- a/
src/mesa/shader/slang/slang_typeinfo.c
+++ b/
src/mesa/shader/slang/slang_typeinfo.c
@@
-151,6
+151,22
@@
_slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows)
}
+/**
+ * Combines (multiplies) two swizzles to form single swizzle.
+ * Example: "vec.wzyx.yx" --> "vec.zw".
+ */
+GLvoid
+_slang_multiply_swizzles(slang_swizzle * dst, const slang_swizzle * left,
+ const slang_swizzle * right)
+{
+ GLuint i;
+
+ dst->num_components = right->num_components;
+ for (i = 0; i < right->num_components; i++)
+ dst->swizzle[i] = left->swizzle[right->swizzle[i]];
+}
+
+
GLvoid
slang_type_specifier_ctr(slang_type_specifier * self)
{