summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/library/slang_core.gc
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-01-16 14:15:05 -0700
committerBrian <brian@yutani.localnet.net>2007-01-16 14:15:05 -0700
commitd90c655b0571c474785fa94b4c64ab099a2229a2 (patch)
tree4760c1405c4fe64e186869ddce3fd2dae59599c5 /src/mesa/shader/slang/library/slang_core.gc
parent99e788fe561b1dd54ce083d3f05e6895fb91953a (diff)
implement logical or, xor, not
Diffstat (limited to 'src/mesa/shader/slang/library/slang_core.gc')
-rw-r--r--src/mesa/shader/slang/library/slang_core.gc21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc
index 78b983ce9a..063de8428b 100644
--- a/src/mesa/shader/slang/library/slang_core.gc
+++ b/src/mesa/shader/slang/library/slang_core.gc
@@ -2274,8 +2274,11 @@ bool __operator ^^ (const bool a, const bool b) {
// }
//
-bool __operator ! (const bool a) {
- return a == false;
+bool __logicalNot(const bool a)
+{
+ if (a)
+ return false;
+ return true;
}
bool __logicalAnd(const bool a, const bool b)
@@ -2285,6 +2288,20 @@ bool __logicalAnd(const bool a, const bool b)
return false;
}
+bool __logicalOr(const bool a, const bool b)
+{
+ if (a)
+ return true;
+ return b;
+}
+
+bool __logicalXor(const bool a, const bool b)
+{
+ if (a)
+ return __logicalNot(b);
+ return b;
+}
+
//