Adds support for multi-input kernels to Frameworks/RS.
This patch modifies Frameworks/RS in the following ways:
* Adjusted the data-layout of the C/C++ version of RsForEachStubParamStruct to
accommodate a pointer to an array of input allocations and a pointer to an
array of stride sizes for each of these allocatoins.
* Adds a new code path for Java code to pass multiple allocations to a RS
kernel.
* Packs base pointers and step values for multi-input kernels into the new
RsForEachStubParamStruct members.
Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
diff --git a/driver/rsdBcc.cpp b/driver/rsdBcc.cpp
index 60532df..b62709e 100644
--- a/driver/rsdBcc.cpp
+++ b/driver/rsdBcc.cpp
@@ -77,6 +77,20 @@
cs->invokeForEach(slot, ain, aout, usr, usrLen, sc);
}
+void rsdScriptInvokeForEachMulti(const Context *rsc,
+ Script *s,
+ uint32_t slot,
+ const Allocation ** ains,
+ size_t inLen,
+ Allocation * aout,
+ const void * usr,
+ size_t usrLen,
+ const RsScriptCall *sc) {
+
+ RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)s->mHal.drv;
+ cs->invokeForEachMulti(slot, ains, inLen, aout, usr, usrLen, sc);
+}
+
int rsdScriptInvokeRoot(const Context *dc, Script *s) {
RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)s->mHal.drv;
@@ -145,4 +159,3 @@
RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)sc->mHal.drv;
return cs->getAllocationForPointer(ptr);
}
-