Move memory layout to driver.
This change moves all allocation data copies to the
hal. Also removes stride from the runtime. Follow on
changes will remove the malloc pointer from the runtime.
Change-Id: I30967c739800cd4b97186e9fc8b69f26a3f2787d
diff --git a/rsScriptC.cpp b/rsScriptC.cpp
index 79725b9..466c18a 100644
--- a/rsScriptC.cpp
+++ b/rsScriptC.cpp
@@ -62,31 +62,10 @@
if (!mTypes[ct].get())
continue;
- void *ptr = NULL;
- if (mSlots[ct].get()) {
- ptr = mSlots[ct]->getPtr();
- }
-
- rsc->mHal.funcs.script.setGlobalBind(rsc, this, ct, ptr);
+ rsc->mHal.funcs.script.setGlobalBind(rsc, this, ct, mSlots[ct].get());
}
}
-const Allocation *ScriptC::ptrToAllocation(const void *ptr) const {
- //ALOGE("ptr to alloc %p", ptr);
- if (!ptr) {
- return NULL;
- }
- for (uint32_t ct=0; ct < mHal.info.exportedVariableCount; ct++) {
- if (!mSlots[ct].get())
- continue;
- if (mSlots[ct]->getPtr() == ptr) {
- return mSlots[ct].get();
- }
- }
- ALOGE("ScriptC::ptrToAllocation, failed to find %p", ptr);
- return NULL;
-}
-
void ScriptC::setupGLState(Context *rsc) {
if (mEnviroment.mFragmentStore.get()) {
rsc->setProgramStore(mEnviroment.mFragmentStore.get());