Support additional element/dim information for FieldPacker.
BUG=6009244
Change-Id: I3c439559d61b24b26f9a36f2525f0a0e05b00e77
diff --git a/rsScript.cpp b/rsScript.cpp
index 6a3bd4b..d39fb5e 100644
--- a/rsScript.cpp
+++ b/rsScript.cpp
@@ -64,6 +64,16 @@
mRSC->mHal.funcs.script.setGlobalVar(mRSC, this, slot, (void *)val, len);
}
+void Script::setVar(uint32_t slot, const void *val, size_t len, Element *e,
+ const size_t *dims, size_t dimLen) {
+ if (slot >= mHal.info.exportedVariableCount) {
+ ALOGE("Script::setVar unable to set allocation, invalid slot index");
+ return;
+ }
+ mRSC->mHal.funcs.script.setGlobalVarWithElemDims(mRSC, this, slot,
+ (void *)val, len, e, dims, dimLen);
+}
+
void Script::setVarObj(uint32_t slot, ObjectBase *val) {
//ALOGE("setVarObj %i %p", slot, val);
if (slot >= mHal.info.exportedVariableCount) {
@@ -166,6 +176,14 @@
s->setVar(slot, data, len);
}
+void rsi_ScriptSetVarVE(Context *rsc, RsScript vs, uint32_t slot,
+ const void *data, size_t len, RsElement ve,
+ const size_t *dims, size_t dimLen) {
+ Script *s = static_cast<Script *>(vs);
+ Element *e = static_cast<Element *>(ve);
+ s->setVar(slot, data, len, e, dims, dimLen);
+}
+
}
}