diff options
author | Brian Paul <[email protected]> | 2008-08-12 08:49:57 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-12 08:53:49 -0600 |
commit | 3e0bbd404a3ec87c11653f63494d7e0aeee86aa1 (patch) | |
tree | 5b720b54eb985e26b9a48f130b8a96968f71482b | |
parent | 42b262d01a2b0f676ead098c09e33e387b8a5e3a (diff) |
mesa: glsl: additional constructors
-rw-r--r-- | src/mesa/shader/slang/library/slang_core.gc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 840a0814c5d..10a6bb5cb15 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -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; |