Restore missing min and max API.
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
diff --git a/api/rs_math.spec b/api/rs_math.spec
index 6e7daf6..bf4d9c0 100644
--- a/api/rs_math.spec
+++ b/api/rs_math.spec
@@ -989,6 +989,16 @@
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 @@
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