summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2014-12-12 00:35:03 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-12-12 00:35:04 +0000
commit914cbfc17d08d9b310e042691152152826a15625 (patch)
tree0308ca462daa332ab4fa1d3aa4290fb2fa091c8d
parent79d1df9063189cb2cad3643f78423dbf8f99bbe7 (diff)
parent2f6dc8469a45fa2dafcb772c76009565d0c3885f (diff)
downloadrs-914cbfc17d08d9b310e042691152152826a15625.tar.gz
Merge "Move rsForEach with usrData to 32-bit only."
-rw-r--r--driver/rsdRuntimeStubs.cpp27
-rw-r--r--scriptc/rs_core.rsh6
2 files changed, 10 insertions, 23 deletions
diff --git a/driver/rsdRuntimeStubs.cpp b/driver/rsdRuntimeStubs.cpp
index 37b12639..59eca5b6 100644
--- a/driver/rsdRuntimeStubs.cpp
+++ b/driver/rsdRuntimeStubs.cpp
@@ -613,6 +613,7 @@ static void SC_ForEach_SAAUS(android::renderscript::rs_script *target,
}
#endif
+// These functions are only supported in 32-bit.
#ifndef __LP64__
static void SC_ForEach_SAAUL(android::renderscript::rs_script target,
android::renderscript::rs_allocation in,
@@ -623,18 +624,6 @@ static void SC_ForEach_SAAUL(android::renderscript::rs_script target,
rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p,
usr, usrLen, nullptr);
}
-#else
-static void SC_ForEach_SAAUL(android::renderscript::rs_script *target,
- android::renderscript::rs_allocation *in,
- android::renderscript::rs_allocation *out,
- const void *usr,
- uint32_t usrLen) {
- Context *rsc = RsdCpuReference::getTlsContext();
- rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, usr, usrLen, NULL);
-}
-#endif
-
-#ifndef __LP64__
static void SC_ForEach_SAAULS(android::renderscript::rs_script target,
android::renderscript::rs_allocation in,
android::renderscript::rs_allocation out,
@@ -644,16 +633,6 @@ static void SC_ForEach_SAAULS(android::renderscript::rs_script target,
Context *rsc = RsdCpuReference::getTlsContext();
rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, usr, usrLen, call);
}
-#else
-static void SC_ForEach_SAAULS(android::renderscript::rs_script *target,
- android::renderscript::rs_allocation *in,
- android::renderscript::rs_allocation *out,
- const void *usr,
- uint32_t usrLen,
- const RsScriptCall *call) {
- Context *rsc = RsdCpuReference::getTlsContext();
- rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, usr, usrLen, call);
-}
#endif
#endif
@@ -1405,8 +1384,12 @@ static RsdCpuReference::CpuSymbol gSyms[] = {
{ "_Z9rsForEach9rs_script13rs_allocationS0_", (void *)&SC_ForEach_SAA, true },
{ "_Z9rsForEach9rs_script13rs_allocationS0_PKv", (void *)&SC_ForEach_SAAU, true },
{ "_Z9rsForEach9rs_script13rs_allocationS0_PKvPK14rs_script_call", (void *)&SC_ForEach_SAAUS, true },
+
+ //rsForEach with usrdata is not supported in 64-bit
+#ifndef __LP64__
{ "_Z9rsForEach9rs_script13rs_allocationS0_PKvj", (void *)&SC_ForEach_SAAUL, true },
{ "_Z9rsForEach9rs_script13rs_allocationS0_PKvjPK14rs_script_call", (void *)&SC_ForEach_SAAULS, true },
+#endif
#endif // RS_COMPATIBILITY_LIB
#ifndef __LP64__
diff --git a/scriptc/rs_core.rsh b/scriptc/rs_core.rsh
index 3489e443..2052a2ec 100644
--- a/scriptc/rs_core.rsh
+++ b/scriptc/rs_core.rsh
@@ -150,6 +150,8 @@ extern void __attribute__((overloadable))
rs_allocation output, const void * usrData);
#else
+
+#if (RS_VERSION < 21)
/**
* Make a script to script call to launch work. One of the input or output is
* required to be a valid object. The input and output must be of the same
@@ -160,7 +162,7 @@ extern void __attribute__((overloadable))
* @param input The allocation to source data from
* @param output the allocation to write date into
* @param usrData The user definied params to pass to the root script. May be
- * NULL.
+ * NULL. Not supported in API 21 or higher.
* @param usrDataLen The size of the userData structure. This will be used to
* perform a shallow copy of the data if necessary.
* @param sc Extra control infomation used to select a sub-region of the
@@ -177,6 +179,8 @@ extern void __attribute__((overloadable))
extern void __attribute__((overloadable))
rsForEach(rs_script script, rs_allocation input, rs_allocation output,
const void * usrData, size_t usrDataLen);
+#endif
+
/**
* \overload
*/