diff options
-rw-r--r-- | src/mesa/shader/slang/library/slang_common_builtin.gc | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/library/slang_core.gc | 38 |
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 26080cf26ca..356f5f9d8e9 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 ffa57f74c27..78e3ea9fdac 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 |