summaryrefslogtreecommitdiff
path: root/rsScript.cpp
AgeCommit message (Collapse)Author
2015-04-14Fix issue with older structure sizesStephen Hines
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
2015-03-18Add fatal error checkJason Sams
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
2015-02-04Runtime support for invocables in ScriptGroupsYang Ni
This also includes support for InvokeID Change-Id: I5b59df166ea30b309b8dd9623825ac0e72d03856
2014-08-20Replace NULL macros with nullptr literals.Chris Wailes
Change-Id: I918c40879aa547438f77e7d1a95fa2aa33bec398
2014-08-15Collapse code paths for single- and multi-input kernels.Chris Wailes
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
2014-08-13Revert "Collapse code paths for single- and multi-input kernels."Stephen Hines
This reverts commit 818cfa034e257c7bb48356257f5cb67334e19aa6. Change-Id: I59f39f52e6c8f60bb01cbcb8ccf2215eaf46a57f
2014-08-12Collapse code paths for single- and multi-input kernels.Chris Wailes
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
2014-07-16Fix rsg_generator.c to properly propagate NULL values.Chris Wailes
This patch modifies rsg_generator.c to properly propagate NULL values in the presence of inlined data pointers. Change-Id: I5f91518807d4ab05148c9382e143581157409be6
2014-07-08Add 64bit large object supportJason Sams
Add HAL hooks for filling in LO fields. Change-Id: Ib9bdee714a062de519d2a9708c1016404a1b11a4 Conflicts: driver/rsdBcc.cpp driver/rsdCore.cpp rsAllocation.h rs_hal.h
2014-07-08Adds support for multi-input kernels to Frameworks/RS.Chris Wailes
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
2014-06-25Fix one last use of size_t instead of uint32_t.Stephen Hines
Change-Id: I2d351be87fa09ce0fe3f1953e78cba399e5792b0
2014-06-25Switch the dimensions array to use uint32_t instead of size_t.Stephen Hines
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
2013-12-15fix build.Nick Kralevich
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
2013-12-12Add missing functions and tests for support library.Stephen Hines
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
2013-09-10Detect use of RS objects in kernels to disable a ScriptGroup optimization.Stephen Hines
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
2013-04-11Add support for synchronous get().Tim Murray
Change-Id: Ic94f1e36f7cffaaeda11fa9f0bb70e441fe1e535
2013-04-09Add incUserRef() for ScriptGroup/ScriptKernelID/ScriptFieldID.Stephen Hines
Bug: 8530206 This change also fixes a small bug in zeroUserRef(), where we mistakenly decrement the zeroed out count. Change-Id: I5097e59faad52291218657c10e99c598a00ad84b
2013-04-02Make sure that we don't pass bogus RsScriptCall data along to driver.Stephen Hines
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
2013-03-20Start making RS 64-bit clean.Tim Murray
Change-Id: Ie40ad9a1d2b59094c86eb7e40b358e60120ce213
2013-02-07Add API entry points for clipped kernels and fix Z-dimension clipping.Tim Murray
Change-Id: I43074cb8556d9b28d3e549930f5ac68387f8d823
2012-09-17Add backed for script groups.Jason Sams
Change-Id: If2fdbde7381fcdaeb54d41a913b855fd83d4f186
2012-07-27Cleanup pointer access in adapter and font.Jason Sams
Change-Id: Ie500574adebb9bdb38c138f78582af2cd7610f76
2012-07-25Move memory layout to driver.Jason Sams
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
2012-05-01Support additional element/dim information for FieldPacker.Stephen Hines
BUG=6009244 Change-Id: I3c439559d61b24b26f9a36f2525f0a0e05b00e77
2012-02-22Support running ForEach on non-root functions.Stephen Hines
BUG=6000538 Change-Id: Ie2b16893b150cc5955ee4b9d028c988f69a82744
2012-01-08Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2011-11-22Fix script init error handling.Jason Sams
Change-Id: I7ceb0af4dfd12db0274985ff658f678d7af829ff
2011-11-10Fix setTimeZone() and use it properly in RSTest/rstime.Stephen Hines
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
2011-08-31Call .rs.dtor() when tearing down Scripts.Stephen Hines
BUG=5186750 This allows us to properly reference count any globals (static or extern) that need to potentially be cleaned up. Change-Id: I03d2c38c1e7a4ca96c40003d2eeecb6f395d5835
2011-06-03More work to make libRS buildable on the host.Alex Sakhartchouk
Change-Id: I239585ef7c1334f7fc19fa6423535dea7b9a753f
2011-04-27Start implementing control side forEach.Jason Sams
Change-Id: I2d77d908cbb64b26071d9d5a3421f0b195342d2c
2011-03-17Start seperating out RS compute implementation. Create halJason Sams
layer to seperate from runtime. Change-Id: Idf5c1261be4131690d25c15948e98324e979b4f9
2011-03-01Almost all warnings are now errors in RS build.Stephen Hines
Change-Id: Ie22eccdafbc95d1f903c73007dd3fb0ad10af7cc
2011-01-27Correctly free resouces bound to scripts when the scripts are deleted.Jason Sams
Change-Id: Idfcc30f1a7de0badeb6d8254ed508938d89f4070 b: 3381615
2010-11-16Fix ref counting for globals when set from java code.Jason Sams
Change-Id: I415b6ddeaab277e60233e905a6bae357cd5193eb
2010-11-10Code cleanup to make formatting consistentAlex Sakhartchouk
across all the renderscript files. Change-Id: Idf5fcc60877e44c8f074f7176e37f70b3b895a3c
2010-10-21Fix refcounting bugs where the sys refcountJason Sams
could be corrupted during async type creation. Change-Id: If42828e92990598b0cb5da81c82ea513f94725f2 Fix stack object deletion bug. Change-Id: I2c723aa5ad15e0c99dc9cd0cfbc7db80bace172a
2010-10-11Fix support for 64-bit integers.Stephen Hines
Change-Id: I4e2146a5fda41f280ee3f6f685a34f3cff28f05e
2010-10-10Cleanup error message for null binding address.Jason Sams
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
2010-10-08Removing fixed size arrays.Alex Sakhartchouk
Change-Id: I5c65b29a197013de2517cfb6dbe7abb9e24a688b
2010-09-20Add support for Float64 (double) to RenderScript.Stephen Hines
Change-Id: Iad1c4adadf657a46aa38a3fad7813927e643e29d
2010-05-19Begin naming cleanup for renderscript runtime.Jason Sams
Prefix functions with "rs" or "rsg". Change-Id: I4435b486831bfab1ea473ccfad435b404e68f1c9
2010-05-17Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.Jason Sams
Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
2010-05-14Change RS to use the passed surface size rather than EGL size.Jason Sams
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
2010-05-11Convert renderscript from using ACC to LLVM for its compiler.Jason Sams
This will also require application to be updated to support the new compiler and data passing models. Change-Id: If078e3a5148af395ba1b936169a407d8c3ad727f
2010-03-03Improve RS error handling. On errors RS will now store the error and a ↵Jason Sams
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.
2009-09-25Improved object lifecycle tracking and fix leaks.Jason Sams
2009-09-25Improve renderscript context teardown. Track object in the system and then ↵Jason Sams
force their cleanup by releasing all user references once destroy context is called. Java layer will no longer send destroy notifications for objects garbage collected once a context is destroyed.
2009-09-24Fix invokables to make sure script pointers are setup before invoking ↵Jason Sams
function calls. Reduce app startup time up to 1s.
2009-09-16Implement renderscript Invokables.Jason Sams