summaryrefslogtreecommitdiff
path: root/rsScript.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Delete simple reduction implementation.David Gross2016-06-101-14/+6
| | | | | Bug: 27298560 Change-Id: I8c3d568e98aaf0b7d86881c985d13ed5b8e95338
* Support for general reduction kernels.David Gross2016-01-191-0/+12
| | | | | | | | | | | | | | Requires coordinated change in frameworks/base. Requires coordinated change in frameworks/compile/libbcc in order for RsTest to run. At present, general reduction kernels are run single-threaded. Also: Remove dead struct field MTLaunchStructForEach::sig. Bug: 23535724 Change-Id: Ice17ccf20a902f8a106eaa62ec071d46e3c0ad8c
* Add a basic implementation of the reduce kernel API to the CPUMatt Wala2015-08-141-1/+3
| | | | | | | | | | reference implementation. Bug: 22631253 For now, this just runs a serial reduction on one thread. Change-Id: I34c96d24bb6f44274de72bb53160abcf79d143b0
* Add a ScriptReduce API entry and a stub function rsi_ScriptReduce().Matt Wala2015-07-211-0/+6
| | | | | | Bug: 22631253 Change-Id: I16769d58e3ff3ac712d005b07ffa5aff4116d227
* Fix issue with older structure sizesStephen Hines2015-04-141-0/+1
| | | | | | | | | When structures are enlarged in RS we need to use the script API number to properly handle the older cases. Bug: 19734267 Change-Id: I0ffd3dc4cea1640f2b14c588df3a93eee749e74e
* Add fatal error checkJason Sams2015-03-181-0/+10
| | | | | | | | Prevent launching additional commands if the process is dying This increases the chance the developer will get the error message before we segfault somewhere. Change-Id: I575906b22364c0d03859140570ca29bf8f336c01
* Runtime support for invocables in ScriptGroupsYang Ni2015-02-041-19/+13
| | | | | | This also includes support for InvokeID Change-Id: I5b59df166ea30b309b8dd9623825ac0e72d03856
* Replace NULL macros with nullptr literals.Chris Wailes2014-08-201-10/+10
| | | | Change-Id: I918c40879aa547438f77e7d1a95fa2aa33bec398
* Collapse code paths for single- and multi-input kernels.Chris Wailes2014-08-151-12/+19
| | | | | | | | | | | 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-19/+12
| | | | | | This reverts commit 818cfa034e257c7bb48356257f5cb67334e19aa6. Change-Id: I59f39f52e6c8f60bb01cbcb8ccf2215eaf46a57f
* Collapse code paths for single- and multi-input kernels.Chris Wailes2014-08-121-12/+19
| | | | | | | | | | | 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 rsg_generator.c to properly propagate NULL values.Chris Wailes2014-07-161-15/+0
| | | | | | | This patch modifies rsg_generator.c to properly propagate NULL values in the presence of inlined data pointers. Change-Id: I5f91518807d4ab05148c9382e143581157409be6
* Add 64bit large object supportJason Sams2014-07-081-1/+8
| | | | | | | | | | | | 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-1/+22
| | | | | | | | | | | | | 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
* Fix one last use of size_t instead of uint32_t.Stephen Hines2014-06-251-1/+1
| | | | Change-Id: I2d351be87fa09ce0fe3f1953e78cba399e5792b0
* Switch the dimensions array to use uint32_t instead of size_t.Stephen Hines2014-06-251-1/+1
| | | | | | | | | 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
* fix build.Nick Kralevich2013-12-151-3/+3
| | | | | | | | | | | | | | | | Fix the following compiler error on the sdk build: cc1plus: warnings being treated as errors frameworks/rs/rsScript.cpp: In member function 'void android::renderscript::Script::getVar(uint32_t, const void*, size_t)': frameworks/rs/rsScript.cpp:68: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t' frameworks/rs/rsScript.cpp: In member function 'void android::renderscript::Script::setVar(uint32_t, const void*, size_t, android::renderscript::Element*, const size_t*, size_t)': frameworks/rs/rsScript.cpp:78: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t' frameworks/rs/rsScript.cpp: In member function 'void android::renderscript::Script::setVarObj(uint32_t, android::renderscript::ObjectBase*)': frameworks/rs/rsScript.cpp:89: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t' make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsScript.o] Error 1 make: *** Waiting for unfinished jobs.... Change-Id: Ibeb858c24bff95ef3960073aba108f1dc92a5ac4
* Add missing functions and tests for support library.Stephen Hines2013-12-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing functions: rsFrac(float) rsMatrixLoadRotate(rs_matrix4x4 *, float, float, float, float) rsMatrixLoadScale(rs_matrix4x4 *, float, float, float) rsMatrixLoadTranslate(rs_matrix4x4 *, float, float, float) rsMatrixRotate(rs_matrix4x4 *, float, float, float, float) rsMatrixScale(rs_matrix4x4 *, float, float, float) rsMatrixTranslate(rs_matrix4x4 *, float, float, float) rsMatrixLoadOrtho(rs_matrix4x4 *, float, float, float, float, float, float) rsMatrixLoadFrustum(rs_matrix4x4 *, float, float, float, float, float, float) rsMatrixLoadPerspective(rs_matrix4x4 *, float, float, float, float) rsMatrixInverse(rs_matrix4x4 *) rsMatrixInverseTranspose(rs_matrix4x4 *) rsMatrixTranspose(rs_matrix4x4 *) rsMatrixTranspose(rs_matrix3x3 *) rsMatrixTranspose(rs_matrix2x2 *) rsUptimeNanos() rsGetDt() Headers tested in this CL: rs_element.rsh rs_math.rsh rs_matrix.rsh rs_object.rsh rs_sampler.rsh rs_time.rsh Change-Id: I6cb1972a44f66dc7fed8fe3cf0329720d166af81
* Detect use of RS objects in kernels to disable a ScriptGroup optimization.Stephen Hines2013-09-101-0/+3
| | | | | | | | | | | | | | | | | | | Bug: 10394865 This change disables a ScriptGroup optimization when we can't guarantee that there is no implicit ordering between two kernels. In this case, it is possible to communicate between kernels using the same bound global RS object (like Allocation). A subsequent kernel in the ScriptGroup could accidentally pick up stale data, leading to incorrect results. Now, we disable this optimization whenever we see binds/sets of variables that are potentiall RS object types for a given Script/kernel. This is overly conservative, but sufficient for now. This change also fixes a small issue with preLaunch/postLaunch missing for the default ScriptGroup execution case. Change-Id: I0d19d200cc8dc397d68008a4df6ea423b1e4d04f
* Add support for synchronous get().Tim Murray2013-04-111-0/+14
| | | | Change-Id: Ic94f1e36f7cffaaeda11fa9f0bb70e441fe1e535
* Add incUserRef() for ScriptGroup/ScriptKernelID/ScriptFieldID.Stephen Hines2013-04-091-2/+6
| | | | | | | | | Bug: 8530206 This change also fixes a small bug in zeroUserRef(), where we mistakenly decrement the zeroed out count. Change-Id: I5097e59faad52291218657c10e99c598a00ad84b
* Make sure that we don't pass bogus RsScriptCall data along to driver.Stephen Hines2013-04-021-0/+7
| | | | | | | | | | | | | | In the case where there is no actual RsScriptCall data, our rs.spec is accidentally passing along a stale pointer (with 0 length). Unfortunately, the RS HAL does not supply the RsScriptCall length along with the data, making it impossible to determine whether or not the sc data is real or bogus. Note that this path only occurs when we are creating packed data in our JNI layer due to having a usrData parameter too. In other cases, we don't end up propagating the bogus pointer(s). Change-Id: Ica66b75abb63bcf33d4d536076cf326b5e4d8338
* Start making RS 64-bit clean.Tim Murray2013-03-201-1/+1
| | | | Change-Id: Ie40ad9a1d2b59094c86eb7e40b358e60120ce213
* Add API entry points for clipped kernels and fix Z-dimension clipping.Tim Murray2013-02-071-2/+3
| | | | Change-Id: I43074cb8556d9b28d3e549930f5ac68387f8d823
* Add backed for script groups.Jason Sams2012-09-171-0/+47
| | | | Change-Id: If2fdbde7381fcdaeb54d41a913b855fd83d4f186
* Cleanup pointer access in adapter and font.Jason Sams2012-07-271-1/+0
| | | | Change-Id: Ie500574adebb9bdb38c138f78582af2cd7610f76
* Move memory layout to driver.Jason Sams2012-07-251-5/+1
| | | | | | | | This change moves all allocation data copies to the hal. Also removes stride from the runtime. Follow on changes will remove the malloc pointer from the runtime. Change-Id: I30967c739800cd4b97186e9fc8b69f26a3f2787d
* Support additional element/dim information for FieldPacker.Stephen Hines2012-05-011-0/+18
| | | | | | BUG=6009244 Change-Id: I3c439559d61b24b26f9a36f2525f0a0e05b00e77
* Support running ForEach on non-root functions.Stephen Hines2012-02-221-2/+2
| | | | | | BUG=6000538 Change-Id: Ie2b16893b150cc5955ee4b9d028c988f69a82744
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-10/+10
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Fix script init error handling.Jason Sams2011-11-221-0/+1
| | | | Change-Id: I7ceb0af4dfd12db0274985ff658f678d7af829ff
* Fix setTimeZone() and use it properly in RSTest/rstime.Stephen Hines2011-11-101-2/+17
| | | | | | | | | | | BUG=5470134 The original implementation for rsi_ScriptSetTimeZone() never actually did anything with the bytes received. This change allows it to safely update the timezone. RSTest is also updated to call setTimeZone(), so that users in different timezones can accurately get test results. Change-Id: I6cb1b3a0c3a417749ba39e0fe09cc9c7ab65c2e7
* Call .rs.dtor() when tearing down Scripts.Stephen Hines2011-08-311-0/+6
| | | | | | | | | BUG=5186750 This allows us to properly reference count any globals (static or extern) that need to potentially be cleaned up. Change-Id: I03d2c38c1e7a4ca96c40003d2eeecb6f395d5835
* More work to make libRS buildable on the host.Alex Sakhartchouk2011-06-031-5/+5
| | | | Change-Id: I239585ef7c1334f7fc19fa6423535dea7b9a753f
* Start implementing control side forEach.Jason Sams2011-04-271-0/+10
| | | | Change-Id: I2d77d908cbb64b26071d9d5a3421f0b195342d2c
* Start seperating out RS compute implementation. Create halJason Sams2011-03-171-28/+19
| | | | | | layer to seperate from runtime. Change-Id: Idf5c1261be4131690d25c15948e98324e979b4f9
* Almost all warnings are now errors in RS build.Stephen Hines2011-03-011-1/+0
| | | | Change-Id: Ie22eccdafbc95d1f903c73007dd3fb0ad10af7cc
* Correctly free resouces bound to scripts when the scripts are deleted.Jason Sams2011-01-271-2/+0
| | | | | Change-Id: Idfcc30f1a7de0badeb6d8254ed508938d89f4070 b: 3381615
* Fix ref counting for globals when set from java code.Jason Sams2010-11-161-0/+22
| | | | Change-Id: I415b6ddeaab277e60233e905a6bae357cd5193eb
* Code cleanup to make formatting consistentAlex Sakhartchouk2010-11-101-32/+17
| | | | | | across all the renderscript files. Change-Id: Idf5fcc60877e44c8f074f7176e37f70b3b895a3c
* Fix refcounting bugs where the sys refcountJason Sams2010-10-211-2/+0
| | | | | | | | | | could be corrupted during async type creation. Change-Id: If42828e92990598b0cb5da81c82ea513f94725f2 Fix stack object deletion bug. Change-Id: I2c723aa5ad15e0c99dc9cd0cfbc7db80bace172a
* Fix support for 64-bit integers.Stephen Hines2010-10-111-0/+6
| | | | Change-Id: I4e2146a5fda41f280ee3f6f685a34f3cff28f05e
* Cleanup error message for null binding address.Jason Sams2010-10-101-1/+3
| | | | | | | | | | | Only print the debug if script debugging is enabled. Change-Id: I72b9c2a73d49987a73b354442e9defec02b93bc6 Implement inner utiliy class to specify surface formats. Remove boxed bitmap upload functions. Change-Id: I3ff5ca59e53d02b9d75277afa947ea3d218459eb
* Removing fixed size arrays.Alex Sakhartchouk2010-10-081-10/+28
| | | | Change-Id: I5c65b29a197013de2517cfb6dbe7abb9e24a688b
* Add support for Float64 (double) to RenderScript.Stephen Hines2010-09-201-0/+6
| | | | Change-Id: Iad1c4adadf657a46aa38a3fad7813927e643e29d
* Begin naming cleanup for renderscript runtime.Jason Sams2010-05-191-85/+3
| | | | | | Prefix functions with "rs" or "rsg". Change-Id: I4435b486831bfab1ea473ccfad435b404e68f1c9
* Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.Jason Sams2010-05-171-11/+0
| | | | Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
* Change RS to use the passed surface size rather than EGL size.Jason Sams2010-05-141-1/+1
| | | | | | | | | | | | Its possible that during a resize the EGL information could be stale so caching this is bad. The surface size should always be correct. Change-Id: Ifd479e1ea70b1cada1a8690c7c82e91aa391b685 Conflicts: libs/rs/rsProgramStore.cpp libs/rs/rsProgramStore.h
* Convert renderscript from using ACC to LLVM for its compiler.Jason Sams2010-05-111-13/+103
| | | | | | | This will also require application to be updated to support the new compiler and data passing models. Change-Id: If078e3a5148af395ba1b936169a407d8c3ad727f
* Improve RS error handling. On errors RS will now store the error and a ↵Jason Sams2010-03-031-0/+4
| | | | message that can be read from the app. RS will then not continue rendering frames while an unchecked error is present until new state is received.