summaryrefslogtreecommitdiffstats
path: root/libs/rs/driver/rsdBcc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/driver/rsdBcc.cpp')
-rw-r--r--libs/rs/driver/rsdBcc.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/rs/driver/rsdBcc.cpp b/libs/rs/driver/rsdBcc.cpp
index 44ea79c..0755fb7 100644
--- a/libs/rs/driver/rsdBcc.cpp
+++ b/libs/rs/driver/rsdBcc.cpp
@@ -37,6 +37,7 @@ using namespace android::renderscript;
struct DrvScript {
int (*mRoot)();
void (*mInit)();
+ void (*mFreeChildren)();
BCCScriptRef mBccScript;
@@ -125,6 +126,7 @@ bool rsdScriptInit(const Context *rsc,
drv->mRoot = reinterpret_cast<int (*)()>(bccGetFuncAddr(drv->mBccScript, "root"));
drv->mInit = reinterpret_cast<void (*)()>(bccGetFuncAddr(drv->mBccScript, "init"));
+ drv->mFreeChildren = reinterpret_cast<void (*)()>(bccGetFuncAddr(drv->mBccScript, ".rs.dtor"));
exportFuncCount = drv->ME->getExportFuncCount();
if (exportFuncCount > 0) {
@@ -430,6 +432,13 @@ void rsdScriptInvokeInit(const Context *dc, Script *script) {
}
}
+void rsdScriptInvokeFreeChildren(const Context *dc, Script *script) {
+ DrvScript *drv = (DrvScript *)script->mHal.drv;
+
+ if (drv->mFreeChildren) {
+ drv->mFreeChildren();
+ }
+}
void rsdScriptInvokeFunction(const Context *dc, Script *script,
uint32_t slot,