diff options
author | Jean-Luc Brouillet <jeanluc@google.com> | 2015-08-20 17:30:41 -0700 |
---|---|---|
committer | Jean-Luc Brouillet <jeanluc@google.com> | 2015-08-20 19:49:44 -0700 |
commit | d1fdfc12e1b52b362452bc08ffaf472ff7c8c491 (patch) | |
tree | fdc4b11c26e2c4176d97535394385c8cc96a5c36 | |
parent | 966f28aea042b69caa614182c8f1f30f8d709a7c (diff) | |
download | rs-marshmallow-mr1-dev.tar.gz |
Restore missing min and max API.android-6.0.1_r9android-6.0.1_r81android-6.0.1_r80android-6.0.1_r8android-6.0.1_r79android-6.0.1_r78android-6.0.1_r77android-6.0.1_r74android-6.0.1_r73android-6.0.1_r72android-6.0.1_r70android-6.0.1_r7android-6.0.1_r69android-6.0.1_r66android-6.0.1_r65android-6.0.1_r61android-6.0.1_r60android-6.0.1_r59android-6.0.1_r58android-6.0.1_r57android-6.0.1_r56android-6.0.1_r52android-6.0.1_r51android-6.0.1_r50android-6.0.1_r49android-6.0.1_r48android-6.0.1_r47android-6.0.1_r46android-6.0.1_r43android-6.0.1_r42android-6.0.1_r41android-6.0.1_r40android-6.0.1_r30android-6.0.1_r3android-6.0.1_r28android-6.0.1_r27android-6.0.1_r26android-6.0.1_r20android-6.0.1_r17android-6.0.1_r13android-6.0.1_r12android-6.0.1_r11android-6.0.1_r10android-6.0.1_r1android-6.0.0_r41marshmallow-mr3-releasemarshmallow-mr2-releasemarshmallow-mr1-releasemarshmallow-mr1-devmarshmallow-dr-devmarshmallow-dev
min(float2/3/4, float) and max(float2/3/4, float) were defined in our
headers in K. In L, they were removed by mistake. This continued to
work however because a float would be auto converted by the compiler to
a float4.
In M, we started validating for unexpected external references, which
_Z3minDv4_ff is. This can prevent programs compiled with K from running
on M.
This CL restores the declarations. Corresponding CLs will fix the whitelist
and add CTS tests.
Bug:23389429
Change-Id: I3f91830a14b7e01cf1b6ea954fa6dd2fc9d71286
(cherry picked from commit 7cf263d593c057af8da8d57025e7315c4ed21ea2)
-rw-r--r-- | api/rs_math.spec | 20 | ||||
-rw-r--r-- | scriptc/rs_math.rsh | 18 |
2 files changed, 38 insertions, 0 deletions
diff --git a/api/rs_math.spec b/api/rs_math.spec index 6e7daf69..bf4d9c02 100644 --- a/api/rs_math.spec +++ b/api/rs_math.spec @@ -989,6 +989,16 @@ description: end: function: max +version: 9 +attrib: const +w: 2, 3, 4 +t: f32 +ret: #2#1 +arg: #2#1 a +arg: #2 b +end: + +function: max version: 9 20 attrib: const w: 1 @@ -1072,6 +1082,16 @@ description: end: function: min +version: 9 +attrib: const +w: 2, 3, 4 +t: f32 +ret: #2#1 +arg: #2#1 a +arg: #2 b +end: + +function: min version: 9 20 attrib: const w: 1 diff --git a/scriptc/rs_math.rsh b/scriptc/rs_math.rsh index 91258541..9b39680d 100644 --- a/scriptc/rs_math.rsh +++ b/scriptc/rs_math.rsh @@ -1630,6 +1630,15 @@ extern float3 __attribute__((const, overloadable)) extern float4 __attribute__((const, overloadable)) max(float4 a, float4 b); +extern float2 __attribute__((const, overloadable)) + max(float2 a, float b); + +extern float3 __attribute__((const, overloadable)) + max(float3 a, float b); + +extern float4 __attribute__((const, overloadable)) + max(float4 a, float b); + #if !defined(RS_VERSION) || (RS_VERSION <= 20) static inline char __attribute__((const, overloadable)) max(char a, char b) { @@ -2047,6 +2056,15 @@ extern float3 __attribute__((const, overloadable)) extern float4 __attribute__((const, overloadable)) min(float4 a, float4 b); +extern float2 __attribute__((const, overloadable)) + min(float2 a, float b); + +extern float3 __attribute__((const, overloadable)) + min(float3 a, float b); + +extern float4 __attribute__((const, overloadable)) + min(float4 a, float b); + #if !defined(RS_VERSION) || (RS_VERSION <= 20) static inline char __attribute__((const, overloadable)) min(char a, char b) { |