rsdBcc.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * Copyright (C) 2011-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. #ifndef RSD_BCC_H
  17. #define RSD_BCC_H
  18. #include <rs_hal.h>
  19. #include <rsRuntime.h>
  20. bool rsdScriptInit(const android::renderscript::Context *, android::renderscript::ScriptC *,
  21. char const *resName, char const *cacheDir,
  22. uint8_t const *bitcode, size_t bitcodeSize, uint32_t flags);
  23. bool rsdInitIntrinsic(const android::renderscript::Context *rsc,
  24. android::renderscript::Script *s,
  25. RsScriptIntrinsicID iid,
  26. android::renderscript::Element *e);
  27. void rsdScriptInvokeFunction(const android::renderscript::Context *dc,
  28. android::renderscript::Script *script,
  29. uint32_t slot,
  30. const void *params,
  31. size_t paramLength);
  32. void rsdScriptInvokeForEach(const android::renderscript::Context *rsc,
  33. android::renderscript::Script *s,
  34. uint32_t slot,
  35. const android::renderscript::Allocation * ain,
  36. android::renderscript::Allocation * aout,
  37. const void * usr,
  38. size_t usrLen,
  39. const RsScriptCall *sc);
  40. void rsdScriptInvokeReduce(const android::renderscript::Context *rsc,
  41. android::renderscript::Script *s,
  42. uint32_t slot,
  43. const android::renderscript::Allocation ** ains,
  44. size_t inLen,
  45. android::renderscript::Allocation *aout,
  46. const RsScriptCall *sc);
  47. void rsdScriptInvokeForEachMulti(const android::renderscript::Context *rsc,
  48. android::renderscript::Script *s,
  49. uint32_t slot,
  50. const android::renderscript::Allocation ** ains,
  51. size_t inLen,
  52. android::renderscript::Allocation * aout,
  53. const void * usr,
  54. size_t usrLen,
  55. const RsScriptCall *sc);
  56. int rsdScriptInvokeRoot(const android::renderscript::Context *dc,
  57. android::renderscript::Script *script);
  58. void rsdScriptInvokeInit(const android::renderscript::Context *dc,
  59. android::renderscript::Script *script);
  60. void rsdScriptInvokeFreeChildren(const android::renderscript::Context *dc,
  61. android::renderscript::Script *script);
  62. void rsdScriptSetGlobalVar(const android::renderscript::Context *,
  63. const android::renderscript::Script *,
  64. uint32_t slot, void *data, size_t dataLen);
  65. void rsdScriptGetGlobalVar(const android::renderscript::Context *,
  66. const android::renderscript::Script *,
  67. uint32_t slot, void *data, size_t dataLen);
  68. void rsdScriptSetGlobalVarWithElemDims(const android::renderscript::Context *,
  69. const android::renderscript::Script *,
  70. uint32_t slot, void *data,
  71. size_t dataLength,
  72. const android::renderscript::Element *,
  73. const uint32_t *dims,
  74. size_t dimLength);
  75. void rsdScriptSetGlobalBind(const android::renderscript::Context *,
  76. const android::renderscript::Script *,
  77. uint32_t slot, android::renderscript::Allocation *data);
  78. void rsdScriptSetGlobalObj(const android::renderscript::Context *,
  79. const android::renderscript::Script *,
  80. uint32_t slot, android::renderscript::ObjectBase *data);
  81. void rsdScriptSetGlobal(const android::renderscript::Context *dc,
  82. const android::renderscript::Script *script,
  83. uint32_t slot,
  84. void *data,
  85. size_t dataLength);
  86. void rsdScriptGetGlobal(const android::renderscript::Context *dc,
  87. const android::renderscript::Script *script,
  88. uint32_t slot,
  89. void *data,
  90. size_t dataLength);
  91. void rsdScriptDestroy(const android::renderscript::Context *dc,
  92. android::renderscript::Script *script);
  93. android::renderscript::Allocation * rsdScriptGetAllocationForPointer(
  94. const android::renderscript::Context *dc,
  95. const android::renderscript::Script *script,
  96. const void *);
  97. void rsdScriptUpdateCachedObject(const android::renderscript::Context *rsc,
  98. const android::renderscript::Script *script,
  99. android::renderscript::rs_script *obj);
  100. #endif