summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/library
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-01-20 09:22:13 -0700
committerBrian <brian@yutani.localnet.net>2007-01-20 09:22:13 -0700
commita3e938b8da07e656775e88bb4b078429723689a2 (patch)
tree8b27fbcf45e6a9580bb8f428ffdad229385d3e1d /src/mesa/shader/slang/library
parent9f07ed00e4d4bca95189720dd44bf57a228baf02 (diff)
Reimplement && and || to do short-circuit evaluation.
Improved shader error handling.
Diffstat (limited to 'src/mesa/shader/slang/library')
-rw-r--r--src/mesa/shader/slang/library/slang_core.gc19
-rw-r--r--src/mesa/shader/slang/library/slang_core_gc.h90
2 files changed, 45 insertions, 64 deletions
diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc
index 407c613ab5..811568c7ba 100644
--- a/src/mesa/shader/slang/library/slang_core.gc
+++ b/src/mesa/shader/slang/library/slang_core.gc
@@ -2470,11 +2470,6 @@ bool __operator <= (const int a, const int b) {
}
-//bool __operator ^^ (const bool a, const bool b) {
-// return a != b;
-//}
-
-
bool __logicalNot(const bool a)
{
@@ -2483,20 +2478,6 @@ bool __logicalNot(const bool a)
return true;
}
-bool __logicalAnd(const bool a, const bool b)
-{
- if (a)
- return 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)
{
// XXX return a != b;
diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h
index b1869c5d89..b34cbb89ce 100644
--- a/src/mesa/shader/slang/library/slang_core_gc.h
+++ b/src/mesa/shader/slang/library/slang_core_gc.h
@@ -805,50 +805,50 @@
1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,
97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,
1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,
-100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,
-95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,
-9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,
-98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,
-18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,
-112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,
-4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,
-1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,
-116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,
-0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,
-77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,
-9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,
-65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,
-112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,
-18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,
-114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,
-1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,
-105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,
-0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,
-110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,
-122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,
-116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,
-0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,
-69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,
-9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,
-65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,
-112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,
-18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,
-112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,
+100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,20,
+0,9,18,95,95,114,101,116,86,97,108,0,15,2,48,0,20,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,79,
+114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95,
+95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,
+95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,
+110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,
+0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,
+116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,
+95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,
+0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,
+83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,
+58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,
+0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,
+112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,
118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,
105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,
-59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,
-110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,
-16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,
-105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,
-109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,
-0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,
-0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,
-9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,
-83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,
-0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,
-0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,
-110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,
-0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,
-0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,
-112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,
-1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0
+59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,
+110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,
+121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,
+116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,
+0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,
+77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,
+58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,
+0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,
+112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,
+118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,
+114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,
+59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,
+116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,
+0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,
+69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,
+9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,
+83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,
+58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,
+69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,
+9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,
+83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,
+0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,
+69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,
+57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,
+110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,
+0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,
+0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,
+112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,
+1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,
+1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,
+116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0