Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 1 | /* |
Jason Sams | 8feea4e | 2011-03-18 15:03:25 -0700 | [diff] [blame] | 2 | * Copyright (C) 2011 The Android Open Source Project |
Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 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> |
Jason Sams | 87fe59a | 2011-04-20 15:09:01 -0700 | [diff] [blame] | 21 | #include <rsRuntime.h> |
Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 22 | |
| 23 | |
| 24 | bool rsdScriptInit(const android::renderscript::Context *, android::renderscript::ScriptC *, |
| 25 | char const *resName, char const *cacheDir, |
Jason Sams | 87fe59a | 2011-04-20 15:09:01 -0700 | [diff] [blame] | 26 | uint8_t const *bitcode, size_t bitcodeSize, uint32_t flags); |
Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 27 | void rsdScriptInvokeFunction(const android::renderscript::Context *dc, |
Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 28 | android::renderscript::Script *script, |
Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 29 | uint32_t slot, |
| 30 | const void *params, |
| 31 | size_t paramLength); |
Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 32 | |
| 33 | void rsdScriptInvokeForEach(const android::renderscript::Context *rsc, |
| 34 | android::renderscript::Script *s, |
Jason Sams | 35e429e | 2011-07-13 11:26:26 -0700 | [diff] [blame] | 35 | uint32_t slot, |
Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 36 | const android::renderscript::Allocation * ain, |
| 37 | android::renderscript::Allocation * aout, |
| 38 | const void * usr, |
| 39 | uint32_t usrLen, |
| 40 | const RsScriptCall *sc); |
| 41 | |
Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 42 | int rsdScriptInvokeRoot(const android::renderscript::Context *dc, |
Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 43 | android::renderscript::Script *script); |
Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 44 | void rsdScriptInvokeInit(const android::renderscript::Context *dc, |
Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 45 | android::renderscript::Script *script); |
Stephen Hines | 4ee16ff | 2011-08-31 17:41:39 -0700 | [diff] [blame] | 46 | void rsdScriptInvokeFreeChildren(const android::renderscript::Context *dc, |
| 47 | android::renderscript::Script *script); |
Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 48 | |
| 49 | void rsdScriptSetGlobalVar(const android::renderscript::Context *, |
| 50 | const android::renderscript::Script *, |
| 51 | uint32_t slot, void *data, size_t dataLen); |
| 52 | void rsdScriptSetGlobalBind(const android::renderscript::Context *, |
| 53 | const android::renderscript::Script *, |
| 54 | uint32_t slot, void *data); |
| 55 | void rsdScriptSetGlobalObj(const android::renderscript::Context *, |
| 56 | const android::renderscript::Script *, |
| 57 | uint32_t slot, android::renderscript::ObjectBase *data); |
| 58 | |
| 59 | void rsdScriptSetGlobal(const android::renderscript::Context *dc, |
| 60 | const android::renderscript::Script *script, |
| 61 | uint32_t slot, |
| 62 | void *data, |
| 63 | size_t dataLength); |
| 64 | void rsdScriptGetGlobal(const android::renderscript::Context *dc, |
| 65 | const android::renderscript::Script *script, |
| 66 | uint32_t slot, |
| 67 | void *data, |
| 68 | size_t dataLength); |
| 69 | void rsdScriptDestroy(const android::renderscript::Context *dc, |
| 70 | android::renderscript::Script *script); |
| 71 | |
| 72 | |
| 73 | #endif |