1a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray/*
2a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * Copyright (C) 2012 The Android Open Source Project
3a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray *
4a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * Licensed under the Apache License, Version 2.0 (the "License");
5a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * you may not use this file except in compliance with the License.
6a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * You may obtain a copy of the License at
7a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray *
8a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray *      http://www.apache.org/licenses/LICENSE-2.0
9a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray *
10a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * Unless required by applicable law or agreed to in writing, software
11a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * distributed under the License is distributed on an "AS IS" BASIS,
12a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * See the License for the specific language governing permissions and
14a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray * limitations under the License.
15a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray */
16a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray
17a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray#ifndef ANDROID_RSDISPATCH_H
18a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray#define ANDROID_RSDISPATCH_H
19a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray
2066f0a168c4227d4e302f4ffb21ec7e9d7b9ca828Jason Sams#include "rsInternalDefines.h"
212bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wang#include "jni.h"
22a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray
23f3213d7fd648da98bb3b03204eaf90f03c31926bMiao Wangtypedef void (*SetNativeLibDirFnPtr)(RsContext con, const char *nativeLibDir, size_t length);
24a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef const void* (*AllocationGetTypeFnPtr)(RsContext con, RsAllocation va);
256c59e3c5d33232452f3a02e29a540d7c82f3982bAshok Bhattypedef void (*TypeGetNativeDataFnPtr)(RsContext, RsType, uintptr_t *typeData, uint32_t typeDataSize);
266c59e3c5d33232452f3a02e29a540d7c82f3982bAshok Bhattypedef void (*ElementGetNativeDataFnPtr)(RsContext, RsElement, uintptr_t *elemData, uint32_t elemDataSize);
276c59e3c5d33232452f3a02e29a540d7c82f3982bAshok Bhattypedef void (*ElementGetSubElementsFnPtr)(RsContext, RsElement, uintptr_t *ids, const char **names, uint32_t *arraySizes, uint32_t dataSize);
28a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsDevice (*DeviceCreateFnPtr) ();
29a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*DeviceDestroyFnPtr) (RsDevice dev);
30a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*DeviceSetConfigFnPtr) (RsDevice dev, RsDeviceParam p, int32_t value);
3184e3dea053bea25c1cec44ffb298f8b5b9b9141aTim Murraytypedef RsContext (*ContextCreateFnPtr)(RsDevice vdev, uint32_t version, uint32_t sdkVersion, RsContextType ct, uint32_t flags);
324a92d1268983edaf329f73c8a5b8860cdbb11596Tim Murraytypedef void (*GetNameFnPtr)(RsContext, void * obj, const char **name);
33fe8f38fabc60f45ba3c0c734bb00ea09f539a7c5Miao Wangtypedef RsClosure (*ClosureCreateFnPtr)(RsContext, RsScriptKernelID, RsAllocation, RsScriptFieldID*, size_t, uintptr_t*, size_t, int*, size_t, RsClosure*, size_t, RsScriptFieldID*, size_t);
34fe8f38fabc60f45ba3c0c734bb00ea09f539a7c5Miao Wangtypedef RsClosure (*InvokeClosureCreateFnPtr)(RsContext, RsScriptInvokeID, const void*, const size_t, const RsScriptFieldID*, const size_t, const uintptr_t*, const size_t, const int*, const size_t);
351ffd86b448d78366190c540f98f8b6d641cdb6cfYang Nitypedef void (*ClosureSetArgFnPtr)(RsContext, RsClosure, uint32_t, uintptr_t, size_t);
361ffd86b448d78366190c540f98f8b6d641cdb6cfYang Nitypedef void (*ClosureSetGlobalFnPtr)(RsContext, RsClosure, RsScriptFieldID, uintptr_t, size_t);
37a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ContextDestroyFnPtr) (RsContext);
38a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsMessageToClientType (*ContextGetMessageFnPtr) (RsContext, void*, size_t, size_t*, size_t, uint32_t*, size_t);
39a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsMessageToClientType (*ContextPeekMessageFnPtr) (RsContext, size_t*, size_t, uint32_t*, size_t);
40a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ContextSendMessageFnPtr) (RsContext, uint32_t, const uint8_t*, size_t);
41a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ContextInitToClientFnPtr) (RsContext);
42a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ContextDeinitToClientFnPtr) (RsContext);
43a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsType (*TypeCreateFnPtr) (RsContext, RsElement, uint32_t, uint32_t, uint32_t, bool, bool, uint32_t);
44a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsAllocation (*AllocationCreateTypedFnPtr) (RsContext, RsType, RsAllocationMipmapControl, uint32_t, uintptr_t);
45a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsAllocation (*AllocationCreateFromBitmapFnPtr) (RsContext, RsType, RsAllocationMipmapControl, const void*, size_t, uint32_t);
46a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsAllocation (*AllocationCubeCreateFromBitmapFnPtr) (RsContext, RsType, RsAllocationMipmapControl, const void*, size_t, uint32_t);
47a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsNativeWindow (*AllocationGetSurfaceFnPtr) (RsContext, RsAllocation);
48a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationSetSurfaceFnPtr) (RsContext, RsAllocation, RsNativeWindow);
49a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ContextFinishFnPtr) (RsContext);
50a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ContextDumpFnPtr) (RsContext, int32_t);
51a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ContextSetPriorityFnPtr) (RsContext, int32_t);
52a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AssignNameFnPtr) (RsContext, RsObjectBase, const char*, size_t);
53a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ObjDestroyFnPtr) (RsContext, RsAsyncVoidPtr);
54a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsElement (*ElementCreateFnPtr) (RsContext, RsDataType, RsDataKind, bool, uint32_t);
55a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsElement (*ElementCreate2FnPtr) (RsContext, const RsElement*, size_t, const char**, size_t, const size_t*, const uint32_t*, size_t);
56a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationCopyToBitmapFnPtr) (RsContext, RsAllocation, void*, size_t);
57a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*Allocation1DDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, const void*, size_t);
58a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*Allocation1DElementDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, const void*, size_t, size_t);
59cc8cea7477352898921044483a6c803e25d02665Miao Wangtypedef void (*AllocationElementDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, const void*, size_t, size_t);
60a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*Allocation2DDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, RsAllocationCubemapFace, uint32_t, uint32_t, const void*, size_t, size_t);
61a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*Allocation3DDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, const void*, size_t, size_t);
62a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationGenerateMipmapsFnPtr) (RsContext, RsAllocation);
63a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationReadFnPtr) (RsContext, RsAllocation, void*, size_t);
64a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*Allocation1DReadFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, void*, size_t);
65cc8cea7477352898921044483a6c803e25d02665Miao Wangtypedef void (*AllocationElementReadFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, void*, size_t, size_t);
66a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*Allocation2DReadFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, RsAllocationCubemapFace, uint32_t, uint32_t, void*, size_t, size_t);
67cc8cea7477352898921044483a6c803e25d02665Miao Wangtypedef void (*Allocation3DReadFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, void*, size_t, size_t);
68a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationSyncAllFnPtr) (RsContext, RsAllocation, RsAllocationUsageType);
69a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationResize1DFnPtr) (RsContext, RsAllocation, uint32_t);
70a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationCopy2DRangeFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t);
71a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationCopy3DRangeFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t);
72a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsSampler (*SamplerCreateFnPtr) (RsContext, RsSamplerValue, RsSamplerValue, RsSamplerValue, RsSamplerValue, RsSamplerValue, float);
73a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptBindAllocationFnPtr) (RsContext, RsScript, RsAllocation, uint32_t);
74a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptSetTimeZoneFnPtr) (RsContext, RsScript, const char*, size_t);
75a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptInvokeFnPtr) (RsContext, RsScript, uint32_t);
76a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptInvokeVFnPtr) (RsContext, RsScript, uint32_t, const void*, size_t);
77a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptForEachFnPtr) (RsContext, RsScript, uint32_t, RsAllocation, RsAllocation, const void*, size_t, const RsScriptCall*, size_t);
78a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptSetVarIFnPtr) (RsContext, RsScript, uint32_t, int);
79a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptSetVarObjFnPtr) (RsContext, RsScript, uint32_t, RsObjectBase);
80a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptSetVarJFnPtr) (RsContext, RsScript, uint32_t, int64_t);
81a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptSetVarFFnPtr) (RsContext, RsScript, uint32_t, float);
82a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptSetVarDFnPtr) (RsContext, RsScript, uint32_t, double);
83a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptSetVarVFnPtr) (RsContext, RsScript, uint32_t, const void*, size_t);
84a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptGetVarVFnPtr) (RsContext, RsScript, uint32_t, void*, size_t);
85ac8d146a41f18afad5314ac8af440d6aedbe20bfStephen Hinestypedef void (*ScriptSetVarVEFnPtr) (RsContext, RsScript, uint32_t, const void*, size_t, RsElement, const uint32_t*, size_t);
86a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsScript (*ScriptCCreateFnPtr) (RsContext, const char*, size_t, const char*, size_t, const char*, size_t);
87a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsScript (*ScriptIntrinsicCreateFnPtr) (RsContext, uint32_t id, RsElement);
88a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsScriptKernelID (*ScriptKernelIDCreateFnPtr) (RsContext, RsScript, int, int);
89eb9aa675754c49f613c6ad71d41472b30f38b007Yang Nitypedef RsScriptInvokeID (*ScriptInvokeIDCreateFnPtr) (RsContext, RsScript, int);
90a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsScriptFieldID (*ScriptFieldIDCreateFnPtr) (RsContext, RsScript, int);
91a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef RsScriptGroup (*ScriptGroupCreateFnPtr) (RsContext, RsScriptKernelID*, size_t, RsScriptKernelID*, size_t, RsScriptKernelID*, size_t, RsScriptFieldID*, size_t, const RsType*, size_t);
928b94222cc8ea83c780c98b22dd1921f392a2bcf6Yang Nitypedef RsScriptGroup2 (*ScriptGroup2CreateFnPtr)(RsContext, const char*, size_t, const char*, size_t, RsClosure*, size_t);
93a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptGroupSetOutputFnPtr) (RsContext, RsScriptGroup, RsScriptKernelID, RsAllocation);
94a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptGroupSetInputFnPtr) (RsContext, RsScriptGroup, RsScriptKernelID, RsAllocation);
95a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*ScriptGroupExecuteFnPtr) (RsContext, RsScriptGroup);
96549f8a500d72edda06f1f1a4986a57aba7f66294Miao Wangtypedef void (*ScriptForEachMultiFnPtr) (RsContext, RsScript, uint32_t, RsAllocation *, size_t, RsAllocation, const void *, size_t, const RsScriptCall *, size_t);
97a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationIoSendFnPtr) (RsContext, RsAllocation);
98a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murraytypedef void (*AllocationIoReceiveFnPtr) (RsContext, RsAllocation);
9994280f817b502caf0b4e40cbcbe300f5178b7473Miao Wangtypedef void * (*AllocationGetPointerFnPtr) (RsContext, RsAllocation, uint32_t lod, RsAllocationCubemapFace face, uint32_t z, uint32_t array, size_t *stride, size_t stride_len);
100a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray
10166f0a168c4227d4e302f4ffb21ec7e9d7b9ca828Jason Samsstruct dispatchTable {
102f3213d7fd648da98bb3b03204eaf90f03c31926bMiao Wang    SetNativeLibDirFnPtr SetNativeLibDir;
103f3213d7fd648da98bb3b03204eaf90f03c31926bMiao Wang
104a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    // inserted by hand from rs.h
105a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationGetTypeFnPtr AllocationGetType;
106a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    TypeGetNativeDataFnPtr TypeGetNativeData;
107a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ElementGetNativeDataFnPtr ElementGetNativeData;
108a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ElementGetSubElementsFnPtr ElementGetSubElements;
109a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray
110a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    DeviceCreateFnPtr DeviceCreate;
111a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    DeviceDestroyFnPtr DeviceDestroy;
112a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    DeviceSetConfigFnPtr DeviceSetConfig;
113a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextCreateFnPtr ContextCreate;
1144a92d1268983edaf329f73c8a5b8860cdbb11596Tim Murray    GetNameFnPtr GetName;
115a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray
116a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    // generated from rs.spec
117a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextDestroyFnPtr ContextDestroy;
118a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextGetMessageFnPtr ContextGetMessage;
119a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextPeekMessageFnPtr ContextPeekMessage;
120a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextSendMessageFnPtr ContextSendMessage;
121a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextInitToClientFnPtr ContextInitToClient;
122a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextDeinitToClientFnPtr ContextDeinitToClient;
123a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    TypeCreateFnPtr TypeCreate;
124a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationCreateTypedFnPtr AllocationCreateTyped;
125a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationCreateFromBitmapFnPtr AllocationCreateFromBitmap;
126a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationCubeCreateFromBitmapFnPtr AllocationCubeCreateFromBitmap;
127a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationGetSurfaceFnPtr AllocationGetSurface;
128a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationSetSurfaceFnPtr AllocationSetSurface;
1291ffd86b448d78366190c540f98f8b6d641cdb6cfYang Ni    ClosureCreateFnPtr ClosureCreate;
130974ca28675268310b1abb29c6ce95b57fa079e2aMiao Wang    InvokeClosureCreateFnPtr InvokeClosureCreate;
1311ffd86b448d78366190c540f98f8b6d641cdb6cfYang Ni    ClosureSetArgFnPtr ClosureSetArg;
1321ffd86b448d78366190c540f98f8b6d641cdb6cfYang Ni    ClosureSetGlobalFnPtr ClosureSetGlobal;
133a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextFinishFnPtr ContextFinish;
134a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextDumpFnPtr ContextDump;
135a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ContextSetPriorityFnPtr ContextSetPriority;
136a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AssignNameFnPtr AssignName;
137a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ObjDestroyFnPtr ObjDestroy;
138a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ElementCreateFnPtr ElementCreate;
139a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ElementCreate2FnPtr ElementCreate2;
140a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationCopyToBitmapFnPtr AllocationCopyToBitmap;
141a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    Allocation1DDataFnPtr Allocation1DData;
142a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    Allocation1DElementDataFnPtr Allocation1DElementData;
143cc8cea7477352898921044483a6c803e25d02665Miao Wang    AllocationElementDataFnPtr AllocationElementData;
144a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    Allocation2DDataFnPtr Allocation2DData;
145a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    Allocation3DDataFnPtr Allocation3DData;
146a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationGenerateMipmapsFnPtr AllocationGenerateMipmaps;
147a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationReadFnPtr AllocationRead;
148a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    Allocation1DReadFnPtr Allocation1DRead;
149cc8cea7477352898921044483a6c803e25d02665Miao Wang    AllocationElementReadFnPtr AllocationElementRead;
150a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    Allocation2DReadFnPtr Allocation2DRead;
151cc8cea7477352898921044483a6c803e25d02665Miao Wang    Allocation3DReadFnPtr Allocation3DRead;
152a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationSyncAllFnPtr AllocationSyncAll;
153a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationResize1DFnPtr AllocationResize1D;
154a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationCopy2DRangeFnPtr AllocationCopy2DRange;
155a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationCopy3DRangeFnPtr AllocationCopy3DRange;
156a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    SamplerCreateFnPtr SamplerCreate;
157a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptBindAllocationFnPtr ScriptBindAllocation;
158a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptSetTimeZoneFnPtr ScriptSetTimeZone;
159a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptInvokeFnPtr ScriptInvoke;
160a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptInvokeVFnPtr ScriptInvokeV;
161a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptForEachFnPtr ScriptForEach;
162a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptSetVarIFnPtr ScriptSetVarI;
163a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptSetVarObjFnPtr ScriptSetVarObj;
164a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptSetVarJFnPtr ScriptSetVarJ;
165a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptSetVarFFnPtr ScriptSetVarF;
166a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptSetVarDFnPtr ScriptSetVarD;
167a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptSetVarVFnPtr ScriptSetVarV;
168a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptGetVarVFnPtr ScriptGetVarV;
169a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptSetVarVEFnPtr ScriptSetVarVE;
170a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptCCreateFnPtr ScriptCCreate;
171a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptIntrinsicCreateFnPtr ScriptIntrinsicCreate;
172a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptKernelIDCreateFnPtr ScriptKernelIDCreate;
173eb9aa675754c49f613c6ad71d41472b30f38b007Yang Ni    ScriptInvokeIDCreateFnPtr ScriptInvokeIDCreate;
174a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptFieldIDCreateFnPtr ScriptFieldIDCreate;
175a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptGroupCreateFnPtr ScriptGroupCreate;
1761ffd86b448d78366190c540f98f8b6d641cdb6cfYang Ni    ScriptGroup2CreateFnPtr ScriptGroup2Create;
177a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptGroupSetOutputFnPtr ScriptGroupSetOutput;
178a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptGroupSetInputFnPtr ScriptGroupSetInput;
179a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    ScriptGroupExecuteFnPtr ScriptGroupExecute;
180549f8a500d72edda06f1f1a4986a57aba7f66294Miao Wang    ScriptForEachMultiFnPtr ScriptForEachMulti;
181a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationIoSendFnPtr AllocationIoSend;
182a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray    AllocationIoReceiveFnPtr AllocationIoReceive;
183b8a94e26c0a5e8f58d5b6ed04e46b411e95b77a4Jason Sams    AllocationGetPointerFnPtr AllocationGetPointer;
18466f0a168c4227d4e302f4ffb21ec7e9d7b9ca828Jason Sams};
185a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray
1868a6a71757f64f02058a50778c75033546a79f2b5Miao Wangbool loadSymbols(void* handle, dispatchTable& dispatchTab, int device_api = 0);
1872bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wang
1882bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wang//USAGE_IO for RS Support lib
1892bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wangtypedef void (*sAllocationSetSurfaceFnPtr) (JNIEnv *, jobject, RsContext, RsAllocation, RsNativeWindow, dispatchTable);
1902bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wangstruct ioSuppDT {
1912bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wang    //USAGE_IO_OUTPUT
1922bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wang    sAllocationSetSurfaceFnPtr sAllocationSetSurface;
1932bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wang};
1942bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wang
1952bd78f2d3e0a94a98dc03502decadfd2e17a70c8Miao Wangbool loadIOSuppSyms(void* handleIO, ioSuppDT& ioDispatch);
196a423096c0d49e5cfe13a400b4323a76f89c6885cTim Murray#endif
197