diff options
author | Jean-Luc Brouillet <jeanluc@google.com> | 2014-01-22 15:23:30 -0800 |
---|---|---|
committer | Jean-Luc Brouillet <jeanluc@google.com> | 2014-01-22 15:25:06 -0800 |
commit | 0ec1635641a2075c9d2349219632650401f88881 (patch) | |
tree | 4bdefbb4d3289d19a0696eeea30f17248dba984f /scriptc | |
parent | 329635d3549d5763f8c319d292c3b871b6794fa2 (diff) | |
download | rs-0ec1635641a2075c9d2349219632650401f88881.tar.gz |
Implement version of step() that takes a scalar edge and a vector for the other argument.
Tests to be done in another CL.
Bug: 12112379
Change-Id: I28a865a9a8f272e9ac4808dacd1ad35a16731a0b
Diffstat (limited to 'scriptc')
-rw-r--r-- | scriptc/rs_core_math.rsh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/scriptc/rs_core_math.rsh b/scriptc/rs_core_math.rsh index 3984c6d2..848740d4 100644 --- a/scriptc/rs_core_math.rsh +++ b/scriptc/rs_core_math.rsh @@ -8129,6 +8129,42 @@ extern float3 __attribute__((const, overloadable))step(float3 edge, float v); extern float4 __attribute__((const, overloadable))step(float4 edge, float v); #endif +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +/* + * if (v < edge) + * return 0.f; + * else + * return 1.f; + * + * Supported by API versions 20 and newer. + */ +extern float2 __attribute__((const, overloadable))step(float edge, float2 v); +#endif + +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +/* + * if (v < edge) + * return 0.f; + * else + * return 1.f; + * + * Supported by API versions 20 and newer. + */ +extern float3 __attribute__((const, overloadable))step(float edge, float3 v); +#endif + +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +/* + * if (v < edge) + * return 0.f; + * else + * return 1.f; + * + * Supported by API versions 20 and newer. + */ +extern float4 __attribute__((const, overloadable))step(float edge, float4 v); +#endif + #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* * Return the sign of a value. |