aboutsummaryrefslogtreecommitdiff
path: root/glslang/MachineIndependent/Initialize.cpp
diff options
context:
space:
mode:
authorJohn Kessenich <cepheus@frii.com>2013-11-09 00:18:22 +0000
committerJohn Kessenich <cepheus@frii.com>2013-11-09 00:18:22 +0000
commit77d908af8a3481514a5aec32469d7767671199d3 (patch)
treec7c7f6b5cc5cc703633fb1604d6642070a20a4c7 /glslang/MachineIndependent/Initialize.cpp
parent0876a5820353710ba1748aa1a394f64186630b7d (diff)
downloadglslang-77d908af8a3481514a5aec32469d7767671199d3.tar.gz
Added constant folding for relational (e.g. lessThan) built-ins, relational built-ins for uints, and bitwise ops for mixed scalars and vectors.
Also, allow comments to precede "#version 100". git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23974 e7fa87d3-cd2b-0410-9028-fcbf551c1848
Diffstat (limited to 'glslang/MachineIndependent/Initialize.cpp')
-rw-r--r--glslang/MachineIndependent/Initialize.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp
index 02311151..b9d0a761 100644
--- a/glslang/MachineIndependent/Initialize.cpp
+++ b/glslang/MachineIndependent/Initialize.cpp
@@ -616,6 +616,35 @@ void TBuiltIns::initialize(int version, EProfile profile)
"\n");
+ if (version >= 130) {
+ commonBuiltins.append(
+ "bvec2 lessThan(uvec2 x, uvec2 y);"
+ "bvec3 lessThan(uvec3 x, uvec3 y);"
+ "bvec4 lessThan(uvec4 x, uvec4 y);"
+
+ "bvec2 lessThanEqual(uvec2 x, uvec2 y);"
+ "bvec3 lessThanEqual(uvec3 x, uvec3 y);"
+ "bvec4 lessThanEqual(uvec4 x, uvec4 y);"
+
+ "bvec2 greaterThan(uvec2 x, uvec2 y);"
+ "bvec3 greaterThan(uvec3 x, uvec3 y);"
+ "bvec4 greaterThan(uvec4 x, uvec4 y);"
+
+ "bvec2 greaterThanEqual(uvec2 x, uvec2 y);"
+ "bvec3 greaterThanEqual(uvec3 x, uvec3 y);"
+ "bvec4 greaterThanEqual(uvec4 x, uvec4 y);"
+
+ "bvec2 equal(uvec2 x, uvec2 y);"
+ "bvec3 equal(uvec3 x, uvec3 y);"
+ "bvec4 equal(uvec4 x, uvec4 y);"
+
+ "bvec2 notEqual(uvec2 x, uvec2 y);"
+ "bvec3 notEqual(uvec3 x, uvec3 y);"
+ "bvec4 notEqual(uvec4 x, uvec4 y);"
+
+ "\n");
+ }
+
//
// Original-style texture functions existing in both stages.
// (Per-stage functions below.)