summaryrefslogtreecommitdiffstats
path: root/cpp/rsDispatch.cpp
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-02-19 18:14:46 -0800
committerMiao Wang <miaowang@google.com>2015-02-23 16:33:07 -0800
commitcc8cea7477352898921044483a6c803e25d02665 (patch)
treea45084bbf8be9f8f591e4512bdef7cd55abefbdf /cpp/rsDispatch.cpp
parente9c79f66478170e4e45e49c71f5e9324842916cf (diff)
downloadandroid_frameworks_rs-cc8cea7477352898921044483a6c803e25d02665.tar.gz
android_frameworks_rs-cc8cea7477352898921044483a6c803e25d02665.tar.bz2
android_frameworks_rs-cc8cea7477352898921044483a6c803e25d02665.zip
Fix the bug for AllocationRead() that cannot handle 3d Allocation
correctly. Add the following functions to make it symmetric for read and write. - AllocationElementData - AllocationElementRead - Allocation3DRead Change-Id: I8c89b5e3474c4c3c70e9795843a76e61f1f90f6a
Diffstat (limited to 'cpp/rsDispatch.cpp')
-rw-r--r--cpp/rsDispatch.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/rsDispatch.cpp b/cpp/rsDispatch.cpp
index e0d67883..6f379d09 100644
--- a/cpp/rsDispatch.cpp
+++ b/cpp/rsDispatch.cpp
@@ -389,6 +389,21 @@ bool loadSymbols(void* handle, dispatchTable& dispatchTab, int device_api) {
LOG_API("Couldn't initialize dispatchTab.ScriptGroup2Create");
return false;
}
+ dispatchTab.AllocationElementData = (AllocationElementDataFnPtr)dlsym(handle, "rsAllocationElementData");
+ if (dispatchTab.AllocationElementData == NULL) {
+ LOG_API("Couldn't initialize dispatchTab.AllocationElementData");
+ return false;
+ }
+ dispatchTab.AllocationElementRead = (AllocationElementReadFnPtr)dlsym(handle, "rsAllocationElementRead");
+ if (dispatchTab.AllocationElementRead == NULL) {
+ LOG_API("Couldn't initialize dispatchTab.AllocationElementRead");
+ return false;
+ }
+ dispatchTab.Allocation3DRead = (Allocation3DReadFnPtr)dlsym(handle, "rsAllocation3DRead");
+ if (dispatchTab.Allocation3DRead == NULL) {
+ LOG_API("Couldn't initialize dispatchTab.Allocation3DRead");
+ return false;
+ }
}
return true;