summaryrefslogtreecommitdiff
path: root/cpu_ref/rsd_cpu.h
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2014-12-02 15:23:38 -0800
committerPirama Arumuga Nainar <pirama@google.com>2015-01-14 16:41:06 -0800
commitdc0d8f7c0f1f43f25c34fbc04656ad578f6e953b (patch)
tree8d529d72e367579dc3dcad3117927fb41d25689e /cpu_ref/rsd_cpu.h
parente8151ab5a9cbcc875cdce64b84287650418922e3 (diff)
downloadrs-dc0d8f7c0f1f43f25c34fbc04656ad578f6e953b.tar.gz
Skip linkloader, use shared object files
Bug: 18322681 - In rsCpuScript, if property rs.skip.linkloader is set, look for a .so file in the cache directory and load it. If it is not available, use bcc to generate relocatable object file and link it to a .so using ld.mc. Use the embedded symbols in .rs.info and follow steps similar to the compatibility library to invoke script functions or access script variables. - Add rs* symbols like rsGetAllocation to libRSCpuRef (ala libRSSupport). Do necessary changes to argument types to get mangled names correct. - Make 64-bit version of rsSetObject take two pointers instead of a pointer and a large object. rsIsObject takes a pointer instead of a large object. Otherwise, we get failures in x86_64 due to calling convention mismatch. To match the function names in the shared object path, define these functions as 'extern "C"' with their mangled names. - Add stubbed Math functions from rsCpuRuntimeMath and rsCpuRuntimeMathFuncs into libRSCpuRef.so. - Coalesce separate #ifdef paths in libRSCpuRef. Function parameters for runtime callbacks and bcc plugin are needed in the non-compatibilty path, but take default NULL arguments. This patch introduces these parameters into the compatibility path as well, and passes default NULL arguments. Change-Id: I8a853350e39d30b4d852c30e4b5da5a75a2f2820
Diffstat (limited to 'cpu_ref/rsd_cpu.h')
-rw-r--r--cpu_ref/rsd_cpu.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/cpu_ref/rsd_cpu.h b/cpu_ref/rsd_cpu.h
index d886cef0..d00425c6 100644
--- a/cpu_ref/rsd_cpu.h
+++ b/cpu_ref/rsd_cpu.h
@@ -19,7 +19,6 @@
#include "rsAllocation.h"
-#ifndef RS_COMPATIBILITY_LIB
namespace llvm {
class Module;
@@ -38,7 +37,6 @@ typedef llvm::Module* (*RSLinkRuntimeCallback)
typedef const char* (*RSSelectRTCallback) (const char*, size_t);
typedef void (*RSSetupCompilerCallback) (bcc::RSCompilerDriver *);
-#endif
namespace android {
namespace renderscript {
@@ -123,11 +121,9 @@ public:
static RsdCpuReference * create(Context *c, uint32_t version_major,
uint32_t version_minor, sym_lookup_t lfn, script_lookup_t slfn
-#ifndef RS_COMPATIBILITY_LIB
, bcc::RSLinkRuntimeCallback pLinkRuntimeCallback = nullptr,
RSSelectRTCallback pSelectRTCallback = nullptr,
const char *pBccPluginName = nullptr
-#endif
);
virtual ~RsdCpuReference();
virtual void setPriority(int32_t priority) = 0;