mesa: glsl: additional constructors
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 12 Aug 2008 14:49:57 +0000 (08:49 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 12 Aug 2008 14:53:49 +0000 (08:53 -0600)
src/mesa/shader/slang/library/slang_core.gc

index 840a081..10a6bb5 100644 (file)
@@ -362,6 +362,13 @@ bvec2 __constructor(const bool b1, const bool b2)
    __retVal.y = b2;
 }
 
+bvec2 __constructor(const int i1, const int i2)
+{
+   __asm vec4_sne __retVal.x, i1, 0.0;
+   __asm vec4_sne __retVal.y, i2, 0.0;
+}
+
+
 bvec2 __constructor(const bool b)
 {
    __asm vec4_move __retVal.xy, b;
@@ -398,6 +405,13 @@ bvec3 __constructor(const bool b1, const bool b2, const bool b3)
    __retVal.z = b3;
 }
 
+bvec3 __constructor(const float f1, const float f2, const float f3)
+{
+   __asm vec4_sne __retVal.x, f1, 0.0;
+   __asm vec4_sne __retVal.y, f2, 0.0;
+   __asm vec4_sne __retVal.z, f3, 0.0;
+}
+
 bvec3 __constructor(const bool b)
 {
    __asm vec4_move __retVal.xyz, b;