blob: 5f83ed2703bb9cfa9ae516c792c69ce862581f62 [file] [log] [blame]
Jason Samsbad80742011-03-16 16:29:28 -07001/*
Jason Sams8feea4e2011-03-18 15:03:25 -07002 * Copyright (C) 2011 The Android Open Source Project
Jason Samsbad80742011-03-16 16:29:28 -07003 *
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>
Jason Sams87fe59a2011-04-20 15:09:01 -070021#include <rsRuntime.h>
Jason Samsbad80742011-03-16 16:29:28 -070022
23
24bool rsdScriptInit(const android::renderscript::Context *, android::renderscript::ScriptC *,
25 char const *resName, char const *cacheDir,
Jason Sams87fe59a2011-04-20 15:09:01 -070026 uint8_t const *bitcode, size_t bitcodeSize, uint32_t flags);
Jason Samsbad80742011-03-16 16:29:28 -070027void rsdScriptInvokeFunction(const android::renderscript::Context *dc,
Jason Samscdfdb8f2011-03-17 16:12:47 -070028 android::renderscript::Script *script,
Jason Samsbad80742011-03-16 16:29:28 -070029 uint32_t slot,
30 const void *params,
31 size_t paramLength);
Jason Samscdfdb8f2011-03-17 16:12:47 -070032
33void rsdScriptInvokeForEach(const android::renderscript::Context *rsc,
34 android::renderscript::Script *s,
Jason Sams35e429e2011-07-13 11:26:26 -070035 uint32_t slot,
Jason Samscdfdb8f2011-03-17 16:12:47 -070036 const android::renderscript::Allocation * ain,
37 android::renderscript::Allocation * aout,
38 const void * usr,
39 uint32_t usrLen,
40 const RsScriptCall *sc);
41
Jason Samsbad80742011-03-16 16:29:28 -070042int rsdScriptInvokeRoot(const android::renderscript::Context *dc,
Jason Samscdfdb8f2011-03-17 16:12:47 -070043 android::renderscript::Script *script);
Jason Samsbad80742011-03-16 16:29:28 -070044void rsdScriptInvokeInit(const android::renderscript::Context *dc,
Jason Samscdfdb8f2011-03-17 16:12:47 -070045 android::renderscript::Script *script);
Stephen Hines4ee16ff2011-08-31 17:41:39 -070046void rsdScriptInvokeFreeChildren(const android::renderscript::Context *dc,
47 android::renderscript::Script *script);
Jason Samsbad80742011-03-16 16:29:28 -070048
49void rsdScriptSetGlobalVar(const android::renderscript::Context *,
50 const android::renderscript::Script *,
51 uint32_t slot, void *data, size_t dataLen);
52void rsdScriptSetGlobalBind(const android::renderscript::Context *,
53 const android::renderscript::Script *,
54 uint32_t slot, void *data);
55void rsdScriptSetGlobalObj(const android::renderscript::Context *,
56 const android::renderscript::Script *,
57 uint32_t slot, android::renderscript::ObjectBase *data);
58
59void rsdScriptSetGlobal(const android::renderscript::Context *dc,
60 const android::renderscript::Script *script,
61 uint32_t slot,
62 void *data,
63 size_t dataLength);
64void rsdScriptGetGlobal(const android::renderscript::Context *dc,
65 const android::renderscript::Script *script,
66 uint32_t slot,
67 void *data,
68 size_t dataLength);
69void rsdScriptDestroy(const android::renderscript::Context *dc,
70 android::renderscript::Script *script);
71
72
73#endif