summaryrefslogtreecommitdiff
path: root/cpu_ref/rsCpuScript.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Skip linkloader, use shared object filesPirama Arumuga Nainar2015-01-141-289/+533
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Enable autovectorization in CPU driver.Tim Murray2015-01-081-0/+2
| | | | Change-Id: Ibc10c61dee8d071256a9ebd6c4c47cb7dc617284
* Merge "Align ScriptInvokeV parameters to 16 bytes for x86_64"Jason Sams2015-01-061-2/+22
|\
| * Align ScriptInvokeV parameters to 16 bytes for x86_64Yong Chen2014-12-121-2/+22
| | | | | | | | | | Change-Id: I0c9aea220b12f364c0a1a90232fbaa40ad90aeec Signed-off-by: Yong Chen <yong.a.chen@intel.com>
* | BCCContext is actually dead code.Stephen Hines2014-12-161-12/+0
| | | | | | | | | | | | This should have been removed as part of the switchover to standalone bcc. Change-Id: Icbb9a4c064dd9f002f9acfa1ac7748745501de2b
* | Enable A53 erratum workaround in bcc.Tim Murray2014-12-091-0/+5
|/ | | | | | bug 18683922 Change-Id: I33636dfa74605211c4898cc08fcee6e0f77978e5
* Fix script instancing issue for RS compatibility library.Stephen Hines2014-10-011-9/+35
| | | | | | | | | | | Bug: 17734273 This switches us from using symlinked files to using explicit copies. The latest Android linker actually checks the inode for the loaded shared object, so a symlink is now insufficient to have it count as a distinct object to load. Change-Id: I729993696ef8d656761fe571703ab96d4bec940b
* Replace NULL macros with nullptr literals.Chris Wailes2014-08-201-67/+71
| | | | Change-Id: I918c40879aa547438f77e7d1a95fa2aa33bec398
* Replace android::String8 with std::stringChris Wailes2014-08-201-11/+13
| | | | Change-Id: I5b2b6d3e38afd0b040f0a584613745206bf01ba0
* Replaced android::Vector with std::vector.Chris Wailes2014-08-181-1/+1
| | | | Change-Id: I4c6abd964dc4b1412ec2e592fc8e835fecfe53f6
* Adjust to handle the change to std::vector in libbcc.Chris Wailes2014-08-181-4/+4
| | | | Change-Id: I9bcf36d088d423246312d97e2a87a05e90f6617d
* Collapse code paths for single- and multi-input kernels.Chris Wailes2014-08-151-165/+49
| | | | | | | | | | | This patch simplifies the RenderScript driver and CPU reference implementation by removing the distinction between sing- and multi-input kernels in many places. The distinction is maintained in some places due to the need to maintain backwards compatibility. This permits the deletion of some functions and struct members that are no longer needed. Several related functions were also cleaned up. Change-Id: Id70a223ea5e3aa2b0b935b2b7f9af933339ae8a4
* Revert "Collapse code paths for single- and multi-input kernels."Stephen Hines2014-08-131-49/+165
| | | | | | This reverts commit 818cfa034e257c7bb48356257f5cb67334e19aa6. Change-Id: I59f39f52e6c8f60bb01cbcb8ccf2215eaf46a57f
* Collapse code paths for single- and multi-input kernels.Chris Wailes2014-08-121-165/+49
| | | | | | | | | | | This patch simplifies the RenderScript driver and CPU reference implementation by removing the distinction between sing- and multi-input kernels in many places. The distinction is maintained in some places due to the need to maintain backwards compatibility. This permits the deletion of some functions and struct members that are no longer needed. Several related functions were also cleaned up. Change-Id: I77e4b155cc7ca1581b05bf901c70ae53a9ff0b12
* Fix isObject when in 64bit mode.Jason Sams2014-08-121-5/+5
| | | | | | | This also cleans up the passing of args to SetObject and ClearObject. Fix related issues in 64bit teardown. Change-Id: I90d1b93c45ff5bc84957d5441ab48a4e2f6feb20
* Deprecate rs_fp_impreciseJean-Luc Brouillet2014-07-091-1/+1
| | | | Change-Id: I063e356e939393e6fa4f39d056cb526aeaf8ee70
* Add 64bit large object supportJason Sams2014-07-081-6/+1
| | | | | | | | | | | | Add HAL hooks for filling in LO fields. Change-Id: Ib9bdee714a062de519d2a9708c1016404a1b11a4 Conflicts: driver/rsdBcc.cpp driver/rsdCore.cpp rsAllocation.h rs_hal.h
* Adds support for multi-input kernels to Frameworks/RS.Chris Wailes2014-07-081-10/+182
| | | | | | | | | | | | | This patch modifies Frameworks/RS in the following ways: * Adjusted the data-layout of the C/C++ version of RsForEachStubParamStruct to accommodate a pointer to an array of input allocations and a pointer to an array of stride sizes for each of these allocatoins. * Adds a new code path for Java code to pass multiple allocations to a RS kernel. * Packs base pointers and step values for multi-input kernels into the new RsForEachStubParamStruct members. Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
* Merge "Use build fingerprint and compile command for caching."Jean-Luc Brouillet2014-06-251-86/+90
|\
| * Use build fingerprint and compile command for caching.Jean-Luc Brouillet2014-06-261-86/+90
| | | | | | | | | | | | | | If either of those have changed, we need to invalidate the compiled bit code. Change-Id: Ic0c392ea5bfff5bf6dc8511740306895b1b12c82
* | Add in a missing unlockMutex() on an error path.Stephen Hines2014-06-261-0/+1
|/ | | | Change-Id: I223e64381190184e37a92ce6478340cb7a323e29
* Switch the dimensions array to use uint32_t instead of size_t.Stephen Hines2014-06-251-3/+3
| | | | | | | | | size_t isn't safe, since we pack/unpack the array as a 32-bit int array, but that is the wrong type for 64-bit. Switching to uint32_t is better, since we only support 1 dimension today, and won't need many more than that even for complex cases in the future. Change-Id: Ie0dda264a9398b0e385e0f9ee0a91cda08325dbc
* Move the lib paths out of RSInfo.Jean-Luc Brouillet2014-06-191-34/+48
| | | | Change-Id: Ic65874459509043fef261f7e0122aade4e557c57
* Disable NEON libclcore for AArch64.Tim Murray2014-06-131-5/+7
| | | | | | | On ARMv8/AArch64, we can use the standard libclcore.bc for any precision, as ASIMD is full IEEE 754 precision. Change-Id: Iecff433b20f40a7f2272e497ad2e47a2f4b63ef3
* Remove FAKE_ARM64_BUILD now that we have 64 build working.Jean-Luc Brouillet2014-06-101-47/+2
| | | | Change-Id: Ieb6627adcd1d097fe709559e182efcfc6841d13e
* Modify script loading behavior.Tim Murray2014-06-021-13/+19
| | | | | | This moves away from RSInfo and toward bcinfo. This also disables all caching for the time being. Change-Id: Id7c717258d51e0b45540a78596f1bc9c94468efb
* Switch to the separate RS loading path.Stephen Hines2014-05-211-7/+9
| | | | | | | This change goes with a similar change to libbcc that separates compilation from loading. We create our own symbol resolvers in the driver. Change-Id: Ifdeed588d5935c49a1e19bdc46d0a8f0b9252e00
* Switch to standalone bcc compilation path (again).Stephen Hines2014-05-161-10/+0
| | | | | Bug: 7342767 Change-Id: I6d876742cbd4dbbc7fac1d559a7c54da9e118889
* Use the proper triple when compiling with bcc.Stephen Hines2014-05-071-0/+3
| | | | Change-Id: I6cbd14e1e196012583929dd383803903dc80e9ff
* Revert "Switch to standalone bcc compilation path."Stephen Hines2014-05-011-0/+10
| | | | | | | | | | | The current standalone bcc on the device needs to be able to select from multiple possible target triples before we enable it by default. Bug: 14470052 This reverts commit 99281b5bc2a81a42fa490ddbc1496621c2d84486. Change-Id: I68f98b3c4f78d708aa5f544d36570e3db9c3e7d1
* Switch to standalone bcc compilation path.Stephen Hines2014-04-301-10/+0
| | | | | Bug: 7342767 Change-Id: Idabdc75cb7daefa44177b23efe6ef8c3df4e908a
* Configure standalone bcc compiler to work with plugin libraries.Stephen Hines2014-04-301-11/+44
| | | | | | | | | | | Bug: 7342767 This change adds support (hidden behind the EXTERNAL_BCC_COMPILER ifdef) for loading plugin libraries via the external bcc toolchain. The external bcc compiler loads the named library and will then invoke a customized rsCompilerDriverInit() from that library. Change-Id: I07c2ea68be54c2255d36926fd37e395db790ef8f
* Make RS compile on ARM64.Tim Murray2014-03-131-5/+49
| | | | | | bug 13280327 Change-Id: I79080c448ca17d0cba8df075737c22b24ce9a085
* Create a cache directory for our symlinked files if necessary.Stephen Hines2013-11-251-2/+22
| | | | | | Bug: 11519886 Change-Id: I93d3c194a15e4842455c31406095e90bced882ee
* Remove references/use of ARCH_X86_HAVE_* in frameworks/rs.Stephen Hines2013-10-031-2/+2
| | | | | | | | | | | | | | | | | Bug: 11048298 These SSE-related defines are unnecessary because all x86 Android devices have these features. We switch all the checks to __i386__ instead. This also fixes an issue where non-ARM bitcode files were being created with the ARM defines present. This is problematic when we then try to do things that would be arch-specific (i.e. the presence of SSE-enabled functions for clamp(), ...). This also cleans up the different target architecture specified in the x86 bitcode files so that they match the platform target (i686-unknown-linux). Change-Id: I4776bbdce360de26e8a00e05d2cb19341d94a173
* Fix ScriptGroup performance regressionJason Sams2013-09-091-0/+12
| | | | | | bug 10151545 Change-Id: Ica4a30c6fe8718f7fdbff0b446885d9ac7083769
* Refactor hal to remove cpuConsumer from driversJason Sams2013-08-071-2/+2
| | | | | | | This CL should minimize build breaks due to BufferQueue changes in the future. Change-Id: I565a6eae5cc25603741fef32f2cfcb31a32eb757
* Fix Script instancing issue for support library.Stephen Hines2013-07-191-34/+137
| | | | | | | | | | | | | | | | | | | | | Our support library relies on opening shared library versions of Scripts on older devices. This has the unfortunate side effect of sharing global variables across Script instances. In traditional RenderScript, the actual Scripts are always instanced, and thus have distinct storage/values for every global (and static global). This change fixes the instancing issue by keeping track of loaded libraries (via a global set, since dlopen is tracked/shared per-process). If we detect a collision, we create a new randomly named symlink of the library to actually load from. The dlopen() function only looks at the library name passed to it, so this allows us to cheaply create a duplicate instance. Once the symlinked library is actually loaded, we destroy it. A new unit test has also been added to RSTest_CompatLib to verify instance behavior. This is a modified version of the same test we have present in CTS for traditional RenderScript instance verification. Change-Id: I6a0bca2b65d125b54793d98f0f73ae92e0280af7
* resolved conflicts for merge of 5376c9bf to masterStephen Hines2013-07-111-8/+1
|\ | | | | | | Change-Id: I51507da10f8d7116a2aa29446a00a43d397a37c8
| * Remove libutils and fix rsDebug for RS support library.Stephen Hines2013-07-101-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 9664050 Our bitcode runtime library translates vector rsDebug() calls into passing their parameters via pointers. The previous version of libRSSupport.so was being created with non-pointer versions of these routines accidentally. This change also fixes a missing permission issue for ImageProcessing2, so that the compatibility library can be verified. This change also removes the use of libutils by switching the implementation of String8/Vector in the compatibility library to internal types backed by libstlport_static. Change-Id: I20da75e8c19a82a42dc2bceaba1937d21372db84
* | Provide path to execute standalone bcc compiler.Stephen Hines2013-06-251-9/+108
| | | | | | | | | | | | Bug: 7342767 Change-Id: Ife9d9fee77416832445dcf30f0e3eba3dd173bad
* | Add the name of the forEach functions to the tracing outputTobias Grosser2013-06-171-0/+1
| | | | | | | | | | | | | | | | | | | | Instead of showing up as 'runForEach', kernels are now e.g. printed as 'runForEach_createAntLookup'. The String8 is carefully constructed here, such that we only pay the string processing overhead in case tracing is actually enabled. Change-Id: Id18319e271a02cbe888bcb9fe806794007d00fca
* | Switch to separate build/load steps for Scripts.Stephen Hines2013-06-051-4/+47
| | | | | | | | | | Bug: 7342767 Change-Id: I94f81cb4dc917dd2cfc10c7718e9263454571db4
* | Provide a mechanism for adjusting RSCompilerDriver after construction.Stephen Hines2013-04-291-0/+7
|/ | | | | | | | We add a simple callback to the reference implementation of libRSDriver.so, such that additional BCC flags can be toggled/adjusted before doing any actual CPU compilation. Change-Id: Iaf253b7d967d0382937369b1c5dae2d23a99e8be
* Mark use of a debug context with the RSCompilerDriver.Stephen Hines2013-04-181-0/+1
| | | | | Bug: 7343201 Change-Id: Idb003a3314247481c38aa70f9991f000135996b3
* Add support for DEBUG context type.Stephen Hines2013-04-171-0/+5
| | | | | | | | | | Bug: 7343201 This change adds switching for the debug runtime (libclcore_debug.bc) when running under a DEBUG RS context. It also fixes a small naming issue for rsSetElementAt_int(). Change-Id: I8b574c9ce915a440375530325ba7de2b46707cfd
* Merge "Add support for synchronous get()." into jb-mr2-devTim Murray2013-04-121-0/+18
|\
| * Add support for synchronous get().Tim Murray2013-04-111-0/+18
| | | | | | | | Change-Id: Ic94f1e36f7cffaaeda11fa9f0bb70e441fe1e535
* | Remove invalid logging on missing root.expand() functions.Stephen Hines2013-04-091-6/+4
|/ | | | | | | | | | | Bug: 8566872 This log message is confusing and unncessary. Due to legacy compatibility, slot 0 is always reserved for root.expand(). We know that root.expand() may not exist for many user scripts, since we have supported proper names for kernels for several releases now. Change-Id: Id869496aa83f98ce64d6bd784314d788e25182e0
* Add callback to allow replacement of runtime support library.Stephen Hines2013-04-011-3/+7
| | | | Change-Id: I84ec56dfb29a0158015ebf31b3a73ac5bf34ef98