| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 1 | /* |
| Stephen Hines | 2980f07 | 2012-04-09 18:26:29 -0700 | [diff] [blame] | 2 | * Copyright (C) 2011-2012 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 | 8eaba4f | 2012-08-14 14:38:05 -0700 | [diff] [blame] | 27 | bool rsdInitIntrinsic(const android::renderscript::Context *rsc, |
| 28 | android::renderscript::Script *s, |
| Stephen Hines | 41d6c76 | 2012-08-21 17:07:38 -0700 | [diff] [blame] | 29 | RsScriptIntrinsicID iid, |
| Jason Sams | 8eaba4f | 2012-08-14 14:38:05 -0700 | [diff] [blame] | 30 | android::renderscript::Element *e); |
| 31 | |
| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 32 | void rsdScriptInvokeFunction(const android::renderscript::Context *dc, |
| Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 33 | android::renderscript::Script *script, |
| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 34 | uint32_t slot, |
| 35 | const void *params, |
| 36 | size_t paramLength); |
| Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 37 | |
| 38 | void rsdScriptInvokeForEach(const android::renderscript::Context *rsc, |
| 39 | android::renderscript::Script *s, |
| Jason Sams | 35e429e | 2011-07-13 11:26:26 -0700 | [diff] [blame] | 40 | uint32_t slot, |
| Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 41 | const android::renderscript::Allocation * ain, |
| 42 | android::renderscript::Allocation * aout, |
| 43 | const void * usr, |
| 44 | uint32_t usrLen, |
| 45 | const RsScriptCall *sc); |
| 46 | |
| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 47 | int rsdScriptInvokeRoot(const android::renderscript::Context *dc, |
| Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 48 | android::renderscript::Script *script); |
| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 49 | void rsdScriptInvokeInit(const android::renderscript::Context *dc, |
| Jason Sams | cdfdb8f | 2011-03-17 16:12:47 -0700 | [diff] [blame] | 50 | android::renderscript::Script *script); |
| Stephen Hines | 4ee16ff | 2011-08-31 17:41:39 -0700 | [diff] [blame] | 51 | void rsdScriptInvokeFreeChildren(const android::renderscript::Context *dc, |
| 52 | android::renderscript::Script *script); |
| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 53 | |
| 54 | void rsdScriptSetGlobalVar(const android::renderscript::Context *, |
| 55 | const android::renderscript::Script *, |
| 56 | uint32_t slot, void *data, size_t dataLen); |
| Stephen Hines | 2980f07 | 2012-04-09 18:26:29 -0700 | [diff] [blame] | 57 | void rsdScriptSetGlobalVarWithElemDims(const android::renderscript::Context *, |
| 58 | const android::renderscript::Script *, |
| 59 | uint32_t slot, void *data, |
| 60 | size_t dataLength, |
| 61 | const android::renderscript::Element *, |
| 62 | const size_t *dims, |
| 63 | size_t dimLength); |
| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 64 | void rsdScriptSetGlobalBind(const android::renderscript::Context *, |
| 65 | const android::renderscript::Script *, |
| Jason Sams | 807fdc4 | 2012-07-25 17:55:39 -0700 | [diff] [blame] | 66 | uint32_t slot, android::renderscript::Allocation *data); |
| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 67 | void rsdScriptSetGlobalObj(const android::renderscript::Context *, |
| 68 | const android::renderscript::Script *, |
| 69 | uint32_t slot, android::renderscript::ObjectBase *data); |
| 70 | |
| 71 | void rsdScriptSetGlobal(const android::renderscript::Context *dc, |
| 72 | const android::renderscript::Script *script, |
| 73 | uint32_t slot, |
| 74 | void *data, |
| 75 | size_t dataLength); |
| 76 | void rsdScriptGetGlobal(const android::renderscript::Context *dc, |
| 77 | const android::renderscript::Script *script, |
| 78 | uint32_t slot, |
| 79 | void *data, |
| 80 | size_t dataLength); |
| 81 | void rsdScriptDestroy(const android::renderscript::Context *dc, |
| 82 | android::renderscript::Script *script); |
| 83 | |
| Jason Sams | 807fdc4 | 2012-07-25 17:55:39 -0700 | [diff] [blame] | 84 | android::renderscript::Allocation * rsdScriptGetAllocationForPointer( |
| 85 | const android::renderscript::Context *dc, |
| 86 | const android::renderscript::Script *script, |
| 87 | const void *); |
| Jason Sams | bad8074 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 88 | |
| 89 | #endif |