blob: ab57936111f39b6203f869dab43529ea235b6ce2 [file] [log] [blame]
Tim Murraya4230962013-07-17 16:50:10 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_RSDISPATCH_H
18#define ANDROID_RSDISPATCH_H
19
Jason Sams66f0a162014-11-11 13:46:38 -080020#include "rsInternalDefines.h"
Miao Wang2bd78f22014-11-20 10:49:43 -080021#include "jni.h"
Tim Murraya4230962013-07-17 16:50:10 -070022
Miao Wangf3213d72015-01-14 10:03:07 -080023typedef void (*SetNativeLibDirFnPtr)(RsContext con, const char *nativeLibDir, size_t length);
Tim Murraya4230962013-07-17 16:50:10 -070024typedef const void* (*AllocationGetTypeFnPtr)(RsContext con, RsAllocation va);
Ashok Bhat6c59e3c2014-02-11 11:36:45 +000025typedef void (*TypeGetNativeDataFnPtr)(RsContext, RsType, uintptr_t *typeData, uint32_t typeDataSize);
Miao Wangc020bdd2017-02-16 11:36:50 -080026typedef void (*ElementGetNativeDataFnPtr)(RsContext, RsElement, uint32_t *elemData, uint32_t elemDataSize);
27typedef void (*ElementGetSubElementsFnPtr)(RsContext, RsElement, uintptr_t *ids, const char **names, size_t *arraySizes, uint32_t dataSize);
Tim Murraya4230962013-07-17 16:50:10 -070028typedef RsDevice (*DeviceCreateFnPtr) ();
29typedef void (*DeviceDestroyFnPtr) (RsDevice dev);
30typedef void (*DeviceSetConfigFnPtr) (RsDevice dev, RsDeviceParam p, int32_t value);
Tim Murray84e3dea2013-09-09 16:12:51 -070031typedef RsContext (*ContextCreateFnPtr)(RsDevice vdev, uint32_t version, uint32_t sdkVersion, RsContextType ct, uint32_t flags);
Tim Murray4a92d122013-07-22 10:56:18 -070032typedef void (*GetNameFnPtr)(RsContext, void * obj, const char **name);
Yang Nifef0cd42015-11-11 15:08:16 -080033typedef RsClosure (*ClosureCreateFnPtr)(RsContext, RsScriptKernelID, RsAllocation, RsScriptFieldID*, size_t, int64_t*, size_t, int*, size_t, RsClosure*, size_t, RsScriptFieldID*, size_t);
34typedef RsClosure (*InvokeClosureCreateFnPtr)(RsContext, RsScriptInvokeID, const void*, const size_t, const RsScriptFieldID*, const size_t, const int64_t*, const size_t, const int*, const size_t);
35typedef void (*ClosureSetArgFnPtr)(RsContext, RsClosure, uint32_t, uintptr_t, int);
36typedef void (*ClosureSetGlobalFnPtr)(RsContext, RsClosure, RsScriptFieldID, int64_t, int);
Tim Murraya4230962013-07-17 16:50:10 -070037typedef void (*ContextDestroyFnPtr) (RsContext);
38typedef RsMessageToClientType (*ContextGetMessageFnPtr) (RsContext, void*, size_t, size_t*, size_t, uint32_t*, size_t);
39typedef RsMessageToClientType (*ContextPeekMessageFnPtr) (RsContext, size_t*, size_t, uint32_t*, size_t);
40typedef void (*ContextSendMessageFnPtr) (RsContext, uint32_t, const uint8_t*, size_t);
41typedef void (*ContextInitToClientFnPtr) (RsContext);
42typedef void (*ContextDeinitToClientFnPtr) (RsContext);
Miao Wangc020bdd2017-02-16 11:36:50 -080043typedef void (*ContextSetCacheDirFnPtr) (RsContext rsc, const char *cacheDir, size_t cacheDir_length);
Tim Murraya4230962013-07-17 16:50:10 -070044typedef RsType (*TypeCreateFnPtr) (RsContext, RsElement, uint32_t, uint32_t, uint32_t, bool, bool, uint32_t);
45typedef RsAllocation (*AllocationCreateTypedFnPtr) (RsContext, RsType, RsAllocationMipmapControl, uint32_t, uintptr_t);
Miao Wang47a58812015-07-23 21:59:16 -070046typedef RsAllocation (*AllocationCreateStridedFnPtr) (RsContext, RsType, RsAllocationMipmapControl, uint32_t, uintptr_t, size_t);
Tim Murraya4230962013-07-17 16:50:10 -070047typedef RsAllocation (*AllocationCreateFromBitmapFnPtr) (RsContext, RsType, RsAllocationMipmapControl, const void*, size_t, uint32_t);
48typedef RsAllocation (*AllocationCubeCreateFromBitmapFnPtr) (RsContext, RsType, RsAllocationMipmapControl, const void*, size_t, uint32_t);
49typedef RsNativeWindow (*AllocationGetSurfaceFnPtr) (RsContext, RsAllocation);
50typedef void (*AllocationSetSurfaceFnPtr) (RsContext, RsAllocation, RsNativeWindow);
51typedef void (*ContextFinishFnPtr) (RsContext);
52typedef void (*ContextDumpFnPtr) (RsContext, int32_t);
53typedef void (*ContextSetPriorityFnPtr) (RsContext, int32_t);
54typedef void (*AssignNameFnPtr) (RsContext, RsObjectBase, const char*, size_t);
55typedef void (*ObjDestroyFnPtr) (RsContext, RsAsyncVoidPtr);
56typedef RsElement (*ElementCreateFnPtr) (RsContext, RsDataType, RsDataKind, bool, uint32_t);
57typedef RsElement (*ElementCreate2FnPtr) (RsContext, const RsElement*, size_t, const char**, size_t, const size_t*, const uint32_t*, size_t);
58typedef void (*AllocationCopyToBitmapFnPtr) (RsContext, RsAllocation, void*, size_t);
59typedef void (*Allocation1DDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, const void*, size_t);
60typedef void (*Allocation1DElementDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, const void*, size_t, size_t);
Miao Wangcc8cea72015-02-19 18:14:46 -080061typedef void (*AllocationElementDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, const void*, size_t, size_t);
Tim Murraya4230962013-07-17 16:50:10 -070062typedef void (*Allocation2DDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, RsAllocationCubemapFace, uint32_t, uint32_t, const void*, size_t, size_t);
63typedef void (*Allocation3DDataFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, const void*, size_t, size_t);
64typedef void (*AllocationGenerateMipmapsFnPtr) (RsContext, RsAllocation);
65typedef void (*AllocationReadFnPtr) (RsContext, RsAllocation, void*, size_t);
66typedef void (*Allocation1DReadFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, void*, size_t);
Miao Wangcc8cea72015-02-19 18:14:46 -080067typedef void (*AllocationElementReadFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, void*, size_t, size_t);
Tim Murraya4230962013-07-17 16:50:10 -070068typedef void (*Allocation2DReadFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, RsAllocationCubemapFace, uint32_t, uint32_t, void*, size_t, size_t);
Miao Wangcc8cea72015-02-19 18:14:46 -080069typedef void (*Allocation3DReadFnPtr) (RsContext, RsAllocation, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, void*, size_t, size_t);
Tim Murraya4230962013-07-17 16:50:10 -070070typedef void (*AllocationSyncAllFnPtr) (RsContext, RsAllocation, RsAllocationUsageType);
71typedef void (*AllocationResize1DFnPtr) (RsContext, RsAllocation, uint32_t);
72typedef 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);
73typedef 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);
Miao Wangc020bdd2017-02-16 11:36:50 -080074typedef void (*AllocationSetupBufferQueueFnPtr) (RsContext context, RsAllocation valloc, uint32_t numAlloc);
75typedef void (*AllocationShareBufferQueueFnPtr) (RsContext context, RsAllocation valloc1, RsAllocation valloc2);
Tim Murraya4230962013-07-17 16:50:10 -070076typedef RsSampler (*SamplerCreateFnPtr) (RsContext, RsSamplerValue, RsSamplerValue, RsSamplerValue, RsSamplerValue, RsSamplerValue, float);
77typedef void (*ScriptBindAllocationFnPtr) (RsContext, RsScript, RsAllocation, uint32_t);
78typedef void (*ScriptSetTimeZoneFnPtr) (RsContext, RsScript, const char*, size_t);
79typedef void (*ScriptInvokeFnPtr) (RsContext, RsScript, uint32_t);
80typedef void (*ScriptInvokeVFnPtr) (RsContext, RsScript, uint32_t, const void*, size_t);
81typedef void (*ScriptForEachFnPtr) (RsContext, RsScript, uint32_t, RsAllocation, RsAllocation, const void*, size_t, const RsScriptCall*, size_t);
Matt Wala394e9a62015-08-03 11:35:55 -070082typedef void (*ScriptForEachMultiFnPtr) (RsContext, RsScript, uint32_t, RsAllocation*, size_t, RsAllocation, const void*, size_t, const RsScriptCall*, size_t);
David Grossae2ec3f2016-06-01 14:45:47 -070083typedef void (*ScriptReduceFnPtr) (RsContext, RsScript, uint32_t, RsAllocation*, size_t, RsAllocation, const RsScriptCall*, size_t);
Tim Murraya4230962013-07-17 16:50:10 -070084typedef void (*ScriptSetVarIFnPtr) (RsContext, RsScript, uint32_t, int);
85typedef void (*ScriptSetVarObjFnPtr) (RsContext, RsScript, uint32_t, RsObjectBase);
86typedef void (*ScriptSetVarJFnPtr) (RsContext, RsScript, uint32_t, int64_t);
87typedef void (*ScriptSetVarFFnPtr) (RsContext, RsScript, uint32_t, float);
88typedef void (*ScriptSetVarDFnPtr) (RsContext, RsScript, uint32_t, double);
89typedef void (*ScriptSetVarVFnPtr) (RsContext, RsScript, uint32_t, const void*, size_t);
90typedef void (*ScriptGetVarVFnPtr) (RsContext, RsScript, uint32_t, void*, size_t);
Stephen Hinesac8d1462014-06-25 00:01:23 -070091typedef void (*ScriptSetVarVEFnPtr) (RsContext, RsScript, uint32_t, const void*, size_t, RsElement, const uint32_t*, size_t);
Tim Murraya4230962013-07-17 16:50:10 -070092typedef RsScript (*ScriptCCreateFnPtr) (RsContext, const char*, size_t, const char*, size_t, const char*, size_t);
93typedef RsScript (*ScriptIntrinsicCreateFnPtr) (RsContext, uint32_t id, RsElement);
94typedef RsScriptKernelID (*ScriptKernelIDCreateFnPtr) (RsContext, RsScript, int, int);
Yang Nieb9aa672015-01-27 14:32:25 -080095typedef RsScriptInvokeID (*ScriptInvokeIDCreateFnPtr) (RsContext, RsScript, int);
Tim Murraya4230962013-07-17 16:50:10 -070096typedef RsScriptFieldID (*ScriptFieldIDCreateFnPtr) (RsContext, RsScript, int);
97typedef RsScriptGroup (*ScriptGroupCreateFnPtr) (RsContext, RsScriptKernelID*, size_t, RsScriptKernelID*, size_t, RsScriptKernelID*, size_t, RsScriptFieldID*, size_t, const RsType*, size_t);
Yang Ni8b942222015-04-02 17:48:28 -070098typedef RsScriptGroup2 (*ScriptGroup2CreateFnPtr)(RsContext, const char*, size_t, const char*, size_t, RsClosure*, size_t);
Tim Murraya4230962013-07-17 16:50:10 -070099typedef void (*ScriptGroupSetOutputFnPtr) (RsContext, RsScriptGroup, RsScriptKernelID, RsAllocation);
100typedef void (*ScriptGroupSetInputFnPtr) (RsContext, RsScriptGroup, RsScriptKernelID, RsAllocation);
101typedef void (*ScriptGroupExecuteFnPtr) (RsContext, RsScriptGroup);
102typedef void (*AllocationIoSendFnPtr) (RsContext, RsAllocation);
Miao Wangc020bdd2017-02-16 11:36:50 -0800103typedef int64_t (*AllocationIoReceiveFnPtr) (RsContext, RsAllocation);
Miao Wang94280f82015-02-02 19:30:27 -0800104typedef void * (*AllocationGetPointerFnPtr) (RsContext, RsAllocation, uint32_t lod, RsAllocationCubemapFace face, uint32_t z, uint32_t array, size_t *stride, size_t stride_len);
Miao Wangc020bdd2017-02-16 11:36:50 -0800105typedef RsAllocation (*AllocationAdapterCreateFnPtr) (RsContext rsc, RsType vtype, RsAllocation baseAlloc);
106typedef void (*AllocationAdapterOffsetFnPtr) (RsContext rsc, RsAllocation alloc, const uint32_t * offsets, size_t offsets_length);
107
108// Graphics APIs
109typedef RsContext (*ContextCreateGLFnPtr) (RsDevice vdev, uint32_t version, uint32_t sdkVersion, RsSurfaceConfig sc, uint32_t dpi);
110typedef RsProgramStore (*ProgramStoreCreateFnPtr) (RsContext rsc, bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA, bool depthMask, bool ditherEnable, RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc, RsDepthFunc depthFunc);
111typedef RsProgramRaster (*ProgramRasterCreateFnPtr) (RsContext rsc, bool pointSprite, RsCullMode cull);
112typedef void (*ProgramBindConstantsFnPtr) (RsContext rsc, RsProgram vp, uint32_t slot, RsAllocation constants);
113typedef void (*ProgramBindTextureFnPtr) (RsContext rsc, RsProgramFragment pf, uint32_t slot, RsAllocation a);
114typedef void (*ProgramBindSamplerFnPtr) (RsContext rsc, RsProgramFragment pf, uint32_t slot, RsSampler s);
115typedef RsProgramFragment (*ProgramFragmentCreateFnPtr) (RsContext rsc, const char * shaderText, size_t shaderText_length, const char ** textureNames, size_t textureNames_length_length, const size_t * textureNames_length, const uintptr_t * params, size_t params_length);
116typedef RsProgramVertex (*ProgramVertexCreateFnPtr) (RsContext rsc, const char * shaderText, size_t shaderText_length, const char ** textureNames, size_t textureNames_length_length, const size_t * textureNames_length, const uintptr_t * params, size_t params_length);
117typedef RsFont (*FontCreateFromFileFnPtr) (RsContext rsc, const char * name, size_t name_length, float fontSize, uint32_t dpi);
118typedef RsFont (*FontCreateFromMemoryFnPtr) (RsContext rsc, const char * name, size_t name_length, float fontSize, uint32_t dpi, const void * data, size_t data_length);
119typedef RsMesh (*MeshCreateFnPtr) (RsContext rsc, RsAllocation * vtx, size_t vtx_length, RsAllocation * idx, size_t idx_length, uint32_t * primType, size_t primType_length);
120typedef void (*ContextBindProgramStoreFnPtr) (RsContext rsc, RsProgramStore pgm);
121typedef void (*ContextBindProgramFragmentFnPtr) (RsContext rsc, RsProgramFragment pgm);
122typedef void (*ContextBindProgramVertexFnPtr) (RsContext rsc, RsProgramVertex pgm);
123typedef void (*ContextBindProgramRasterFnPtr) (RsContext rsc, RsProgramRaster pgm);
124typedef void (*ContextBindFontFnPtr) (RsContext rsc, RsFont pgm);
125typedef void (*ContextSetSurfaceFnPtr) (RsContext rsc, uint32_t width, uint32_t height, RsNativeWindow sur);
126typedef void (*ContextBindRootScriptFnPtr) (RsContext rsc, RsScript sampler);
127typedef void (*ContextPauseFnPtr) (RsContext rsc);
128typedef void (*ContextResumeFnPtr) (RsContext rsc);
129typedef void (*MeshGetVertexBufferCountFnPtr) (RsContext con, RsMesh mv, int32_t *numVtx);
130typedef void (*MeshGetIndexCountFnPtr) (RsContext con, RsMesh mv, int32_t *numIdx);
131typedef void (*MeshGetVerticesFnPtr) (RsContext con, RsMesh mv, RsAllocation *vtxData, uint32_t vtxDataCount);
132typedef void (*MeshGetIndicesFnPtr) (RsContext con, RsMesh mv, RsAllocation *va, uint32_t *primType, uint32_t idxDataCount);
133typedef RsObjectBase (*FileA3DGetEntryByIndexFnPtr) (RsContext con, uint32_t index, RsFile file);
134typedef void (*FileA3DGetNumIndexEntriesFnPtr) (RsContext con, int32_t *numEntries, RsFile file);
135typedef void (*FileA3DGetIndexEntriesFnPtr) (RsContext con, RsFileIndexEntry *fileEntries, uint32_t numEntries, RsFile file);
136typedef RsFile (*FileA3DCreateFromMemoryFnPtr) (RsContext con, const void *data, uint32_t len);
137typedef RsFile (*FileA3DCreateFromAssetFnPtr) (RsContext con, void *_asset);
138typedef RsFile (*FileA3DCreateFromFileFnPtr) (RsContext con, const char *path);
139
Tim Murraya4230962013-07-17 16:50:10 -0700140
Jason Sams66f0a162014-11-11 13:46:38 -0800141struct dispatchTable {
Miao Wangf3213d72015-01-14 10:03:07 -0800142 SetNativeLibDirFnPtr SetNativeLibDir;
143
Miao Wang5b042ca2016-02-23 15:35:51 -0800144 // Inserted by hand based on rs.spec and rs.h
145 Allocation1DDataFnPtr Allocation1DData;
146 Allocation1DElementDataFnPtr Allocation1DElementData;
147 Allocation1DReadFnPtr Allocation1DRead;
148 Allocation2DDataFnPtr Allocation2DData;
149 Allocation2DReadFnPtr Allocation2DRead;
150 Allocation3DDataFnPtr Allocation3DData;
151 Allocation3DReadFnPtr Allocation3DRead;
Miao Wangc020bdd2017-02-16 11:36:50 -0800152 AllocationAdapterCreateFnPtr AllocationAdapterCreate;
153 AllocationAdapterOffsetFnPtr AllocationAdapterOffset;
Miao Wang5b042ca2016-02-23 15:35:51 -0800154 AllocationCopy2DRangeFnPtr AllocationCopy2DRange;
155 AllocationCopy3DRangeFnPtr AllocationCopy3DRange;
156 AllocationCopyToBitmapFnPtr AllocationCopyToBitmap;
157 AllocationCreateFromBitmapFnPtr AllocationCreateFromBitmap;
158 AllocationCreateStridedFnPtr AllocationCreateStrided;
159 AllocationCreateTypedFnPtr AllocationCreateTyped;
160 AllocationCubeCreateFromBitmapFnPtr AllocationCubeCreateFromBitmap;
161 AllocationElementDataFnPtr AllocationElementData;
162 AllocationElementReadFnPtr AllocationElementRead;
163 AllocationGenerateMipmapsFnPtr AllocationGenerateMipmaps;
164 AllocationGetPointerFnPtr AllocationGetPointer;
165 AllocationGetSurfaceFnPtr AllocationGetSurface;
Tim Murraya4230962013-07-17 16:50:10 -0700166 AllocationGetTypeFnPtr AllocationGetType;
Miao Wang5b042ca2016-02-23 15:35:51 -0800167 AllocationIoReceiveFnPtr AllocationIoReceive;
168 AllocationIoSendFnPtr AllocationIoSend;
169 AllocationReadFnPtr AllocationRead;
170 AllocationResize1DFnPtr AllocationResize1D;
171 AllocationSetSurfaceFnPtr AllocationSetSurface;
172 AllocationSyncAllFnPtr AllocationSyncAll;
Miao Wangc020bdd2017-02-16 11:36:50 -0800173 AllocationSetupBufferQueueFnPtr AllocationSetupBufferQueue;
174 AllocationShareBufferQueueFnPtr AllocationShareBufferQueue;
Miao Wang5b042ca2016-02-23 15:35:51 -0800175 AssignNameFnPtr AssignName;
176 ClosureCreateFnPtr ClosureCreate;
177 ClosureSetArgFnPtr ClosureSetArg;
178 ClosureSetGlobalFnPtr ClosureSetGlobal;
179 ContextCreateFnPtr ContextCreate;
180 ContextDeinitToClientFnPtr ContextDeinitToClient;
181 ContextDestroyFnPtr ContextDestroy;
182 ContextDumpFnPtr ContextDump;
183 ContextFinishFnPtr ContextFinish;
184 ContextGetMessageFnPtr ContextGetMessage;
185 ContextInitToClientFnPtr ContextInitToClient;
186 ContextPeekMessageFnPtr ContextPeekMessage;
187 ContextSendMessageFnPtr ContextSendMessage;
188 ContextSetPriorityFnPtr ContextSetPriority;
Miao Wangc020bdd2017-02-16 11:36:50 -0800189 ContextSetCacheDirFnPtr ContextSetCacheDir;
Tim Murraya4230962013-07-17 16:50:10 -0700190 DeviceCreateFnPtr DeviceCreate;
191 DeviceDestroyFnPtr DeviceDestroy;
192 DeviceSetConfigFnPtr DeviceSetConfig;
Tim Murraya4230962013-07-17 16:50:10 -0700193 ElementCreate2FnPtr ElementCreate2;
Miao Wang5b042ca2016-02-23 15:35:51 -0800194 ElementCreateFnPtr ElementCreate;
195 ElementGetNativeDataFnPtr ElementGetNativeData;
196 ElementGetSubElementsFnPtr ElementGetSubElements;
197 GetNameFnPtr GetName;
198 InvokeClosureCreateFnPtr InvokeClosureCreate;
199 ObjDestroyFnPtr ObjDestroy;
Tim Murraya4230962013-07-17 16:50:10 -0700200 SamplerCreateFnPtr SamplerCreate;
201 ScriptBindAllocationFnPtr ScriptBindAllocation;
Miao Wang5b042ca2016-02-23 15:35:51 -0800202 ScriptCCreateFnPtr ScriptCCreate;
203 ScriptFieldIDCreateFnPtr ScriptFieldIDCreate;
Tim Murraya4230962013-07-17 16:50:10 -0700204 ScriptForEachFnPtr ScriptForEach;
Matt Wala394e9a62015-08-03 11:35:55 -0700205 ScriptForEachMultiFnPtr ScriptForEachMulti;
Tim Murraya4230962013-07-17 16:50:10 -0700206 ScriptGetVarVFnPtr ScriptGetVarV;
Yang Ni1ffd86b2015-01-07 09:16:40 -0800207 ScriptGroup2CreateFnPtr ScriptGroup2Create;
Miao Wang5b042ca2016-02-23 15:35:51 -0800208 ScriptGroupCreateFnPtr ScriptGroupCreate;
Tim Murraya4230962013-07-17 16:50:10 -0700209 ScriptGroupExecuteFnPtr ScriptGroupExecute;
Miao Wang5b042ca2016-02-23 15:35:51 -0800210 ScriptGroupSetInputFnPtr ScriptGroupSetInput;
211 ScriptGroupSetOutputFnPtr ScriptGroupSetOutput;
212 ScriptIntrinsicCreateFnPtr ScriptIntrinsicCreate;
213 ScriptInvokeFnPtr ScriptInvoke;
214 ScriptInvokeIDCreateFnPtr ScriptInvokeIDCreate;
215 ScriptInvokeVFnPtr ScriptInvokeV;
216 ScriptKernelIDCreateFnPtr ScriptKernelIDCreate;
217 ScriptReduceFnPtr ScriptReduce;
218 ScriptSetTimeZoneFnPtr ScriptSetTimeZone;
219 ScriptSetVarDFnPtr ScriptSetVarD;
220 ScriptSetVarFFnPtr ScriptSetVarF;
221 ScriptSetVarIFnPtr ScriptSetVarI;
222 ScriptSetVarJFnPtr ScriptSetVarJ;
223 ScriptSetVarObjFnPtr ScriptSetVarObj;
224 ScriptSetVarVEFnPtr ScriptSetVarVE;
225 ScriptSetVarVFnPtr ScriptSetVarV;
226 TypeCreateFnPtr TypeCreate;
227 TypeGetNativeDataFnPtr TypeGetNativeData;
Miao Wangc020bdd2017-02-16 11:36:50 -0800228
229 // Graphics API entries
230 ContextCreateGLFnPtr ContextCreateGL;
231 ContextPauseFnPtr ContextPause;
232 ContextResumeFnPtr ContextResume;
233 ContextBindProgramStoreFnPtr ContextBindProgramStore;
234 ContextBindProgramFragmentFnPtr ContextBindProgramFragment;
235 ContextBindProgramVertexFnPtr ContextBindProgramVertex;
236 ContextBindProgramRasterFnPtr ContextBindProgramRaster;
237 ContextBindFontFnPtr ContextBindFont;
238 ContextSetSurfaceFnPtr ContextSetSurface;
239 ContextBindRootScriptFnPtr ContextBindRootScript;
240 ProgramStoreCreateFnPtr ProgramStoreCreate;
241 ProgramRasterCreateFnPtr ProgramRasterCreate;
242 ProgramBindConstantsFnPtr ProgramBindConstants;
243 ProgramBindTextureFnPtr ProgramBindTexture;
244 ProgramBindSamplerFnPtr ProgramBindSampler;
245 ProgramFragmentCreateFnPtr ProgramFragmentCreate;
246 ProgramVertexCreateFnPtr ProgramVertexCreate;
247 FontCreateFromFileFnPtr FontCreateFromFile;
248 FontCreateFromMemoryFnPtr FontCreateFromMemory;
249 MeshCreateFnPtr MeshCreate;
250 MeshGetVertexBufferCountFnPtr MeshGetVertexBufferCount;
251 MeshGetIndexCountFnPtr MeshGetIndexCount;
252 MeshGetVerticesFnPtr MeshGetVertices;
253 MeshGetIndicesFnPtr MeshGetIndices;
254 FileA3DGetEntryByIndexFnPtr FileA3DGetEntryByIndex;
255 FileA3DGetNumIndexEntriesFnPtr FileA3DGetNumIndexEntries;
256 FileA3DGetIndexEntriesFnPtr FileA3DGetIndexEntries;
257 FileA3DCreateFromMemoryFnPtr FileA3DCreateFromMemory;
258 FileA3DCreateFromAssetFnPtr FileA3DCreateFromAsset;
259 FileA3DCreateFromFileFnPtr FileA3DCreateFromFile;
Jason Sams66f0a162014-11-11 13:46:38 -0800260};
Tim Murraya4230962013-07-17 16:50:10 -0700261
Miao Wang8a6a7172015-02-09 18:41:14 -0800262bool loadSymbols(void* handle, dispatchTable& dispatchTab, int device_api = 0);
Miao Wang2bd78f22014-11-20 10:49:43 -0800263
Miao Wangcf067b82015-09-14 18:27:17 -0700264// USAGE_IO for RS Support lib
Miao Wang2bd78f22014-11-20 10:49:43 -0800265typedef void (*sAllocationSetSurfaceFnPtr) (JNIEnv *, jobject, RsContext, RsAllocation, RsNativeWindow, dispatchTable);
266struct ioSuppDT {
Miao Wangcf067b82015-09-14 18:27:17 -0700267 // USAGE_IO_OUTPUT
Miao Wang2bd78f22014-11-20 10:49:43 -0800268 sAllocationSetSurfaceFnPtr sAllocationSetSurface;
269};
270
271bool loadIOSuppSyms(void* handleIO, ioSuppDT& ioDispatch);
Miao Wangc020bdd2017-02-16 11:36:50 -0800272#endif