From: Brian Paul Date: Tue, 12 Aug 2008 14:49:57 +0000 (-0600) Subject: mesa: glsl: additional constructors X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e0bbd404a3ec87c11653f63494d7e0aeee86aa1;p=mesa.git mesa: glsl: additional constructors --- 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;