blob: 6723a3640fd0d464a7094504a3486bb5c4a66fbe [file] [log] [blame]
Jason Samse4a06c52011-03-16 16:29:28 -07001/*
2 * Copyright (C) 2009 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 RSD_BCC_H
18#define RSD_BCC_H
19
20#include <rs_hal.h>
21
22
23bool rsdScriptInit(const android::renderscript::Context *, android::renderscript::ScriptC *,
24 char const *resName, char const *cacheDir,
25 uint8_t const *bitcode, size_t bitcodeSize,
26 uint32_t flags, android::renderscript::RsHalSymbolLookupFunc lookupFunc);
27void rsdScriptInvokeFunction(const android::renderscript::Context *dc,
Jason Sams55d2a252011-03-17 16:12:47 -070028 android::renderscript::Script *script,
Jason Samse4a06c52011-03-16 16:29:28 -070029 uint32_t slot,
30 const void *params,
31 size_t paramLength);
Jason Sams55d2a252011-03-17 16:12:47 -070032
33void rsdScriptInvokeForEach(const android::renderscript::Context *rsc,
34 android::renderscript::Script *s,
35 const android::renderscript::Allocation * ain,
36 android::renderscript::Allocation * aout,
37 const void * usr,
38 uint32_t usrLen,
39 const RsScriptCall *sc);
40
Jason Samse4a06c52011-03-16 16:29:28 -070041int rsdScriptInvokeRoot(const android::renderscript::Context *dc,
Jason Sams55d2a252011-03-17 16:12:47 -070042 android::renderscript::Script *script);
Jason Samse4a06c52011-03-16 16:29:28 -070043void rsdScriptInvokeInit(const android::renderscript::Context *dc,
Jason Sams55d2a252011-03-17 16:12:47 -070044 android::renderscript::Script *script);
Jason Samse4a06c52011-03-16 16:29:28 -070045
46void rsdScriptSetGlobalVar(const android::renderscript::Context *,
47 const android::renderscript::Script *,
48 uint32_t slot, void *data, size_t dataLen);
49void rsdScriptSetGlobalBind(const android::renderscript::Context *,
50 const android::renderscript::Script *,
51 uint32_t slot, void *data);
52void rsdScriptSetGlobalObj(const android::renderscript::Context *,
53 const android::renderscript::Script *,
54 uint32_t slot, android::renderscript::ObjectBase *data);
55
56void rsdScriptSetGlobal(const android::renderscript::Context *dc,
57 const android::renderscript::Script *script,
58 uint32_t slot,
59 void *data,
60 size_t dataLength);
61void rsdScriptGetGlobal(const android::renderscript::Context *dc,
62 const android::renderscript::Script *script,
63 uint32_t slot,
64 void *data,
65 size_t dataLength);
66void rsdScriptDestroy(const android::renderscript::Context *dc,
67 android::renderscript::Script *script);
68
69
70#endif