summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-07-02 12:37:01 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-07-02 12:38:48 -0600
commit18adc71822463b5e50bcb23d682726b1a44870aa (patch)
tree7780bfb1a361d4ba2d3656079df0ca79ea90f483 /src
parent5ef4e4ffb8053db87f52df3c9b2ddb71d9c7d6e5 (diff)
mesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/library/slang_common_builtin.gc2
-rw-r--r--src/mesa/shader/slang/library/slang_core.gc38
2 files changed, 39 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc
index 26080cf26c..356f5f9d8e 100644
--- a/src/mesa/shader/slang/library/slang_common_builtin.gc
+++ b/src/mesa/shader/slang/library/slang_common_builtin.gc
@@ -1559,7 +1559,7 @@ bool any(const bvec4 v)
//// all
-bool all (const vec2 v)
+bool all (const bvec2 v)
{
float prod;
__asm vec4_multiply prod.x, v.x, v.y;
diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc
index ffa57f74c2..78e3ea9fda 100644
--- a/src/mesa/shader/slang/library/slang_core.gc
+++ b/src/mesa/shader/slang/library/slang_core.gc
@@ -350,6 +350,19 @@ bvec2 __constructor(const int i)
__asm vec4_seq __retVal.xy, i.xx, zero;
}
+bvec2 __constructor(const vec2 v)
+{
+ const vec2 zero = vec2(0.0, 0.0);
+ __asm vec4_seq __retVal.xy, v, zero;
+}
+
+bvec2 __constructor(const ivec2 v)
+{
+ const ivec2 zero = ivec2(0, 0);
+ __asm vec4_seq __retVal.xy, v, zero;
+}
+
+
//// bvec3 constructors
@@ -377,6 +390,19 @@ bvec3 __constructor(const int i)
__asm vec4_seq __retVal.xyz, i.xxx, zero;
}
+bvec3 __constructor(const vec3 v)
+{
+ const vec3 zero = vec3(0.0, 0.0, 0.0);
+ __asm vec4_seq __retVal.xyz, v, zero;
+}
+
+bvec3 __constructor(const ivec3 v)
+{
+ const ivec3 zero = ivec3(0, 0, 0);
+ __asm vec4_seq __retVal.xyz, v, zero;
+}
+
+
//// bvec4 constructors
@@ -405,6 +431,18 @@ bvec4 __constructor(const int i)
__asm vec4_seq __retVal, i.xxxx, zero;
}
+bvec4 __constructor(const vec4 v)
+{
+ const vec4 zero = vec4(0.0, 0.0, 0.0, 0.0);
+ __asm vec4_seq __retVal, v, zero;
+}
+
+bvec4 __constructor(const ivec4 v)
+{
+ const ivec4 zero = ivec4(0, 0, 0, 0);
+ __asm vec4_seq __retVal, v, zero;
+}
+
//// mat2 constructors