59 Commits

Author SHA1 Message Date
Jason Sams
b374a845f0 Unhide RenderScript resize intrinsic
Change-Id: I450c83ad00bcb7d999aaf7d4bd7ea88d63ab8fea
2014-07-10 15:10:42 -07:00
Tim Murray
31e12acca5 Update copyFrom(BaseObj[]) for large objects.
Change-Id: I99cadbd1ad925cad0dd357c9abbd1a49c07785c9
2014-07-09 17:09:33 -07:00
Chris Wailes
949610653f Adds support for multi-input kernels to Frameworks/Base/RS.
* Added a new JNI call to pass arrays of Allocations to the RS runtime.
* Added a new version of ForEach that takes an array of Allocations.
* Added some casts to disambiguate existing calls to forEach.

Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
2014-07-07 12:27:21 -07:00
Jason Sams
7165bd6d74 Merge "Add check and throw for failed Intrinsic init." 2014-06-25 17:35:00 +00:00
Stephen Hines
bc5d3eeedc Switch from size_t -> uint32_t for dimensions array.
Change-Id: I159586e98dd47be9b9f5db0f3e27d1072533134c
2014-06-25 00:03:39 -07:00
Stephen Hines
fcb3161e57 We need to update mPos when we copy a FieldPacker via its data[] member.
Bug: 15756600

This change also adds a TODO/FIXME related to subAlign() and our tracking
mechanism for it. We need to further investigate how to make subAlign() work
properly if a user copies their FieldPacker.

Change-Id: I861e529abd11e378f7c73b510d7f418b940fe480
2014-06-23 17:35:04 -07:00
Jason Sams
1c8da1ccce Add check and throw for failed Intrinsic init.
Change-Id: Icd53b3edd8e887d3692e5815dc0c38cd68b7aeb1
2014-06-23 15:15:08 -07:00
Stephen Hines
b02dadd47c Merge "Create FieldPacker.getPos() to get the actual amount of data used for FP." 2014-06-18 22:48:04 +00:00
Stephen Hines
fa1275a6e7 Create FieldPacker.getPos() to get the actual amount of data used for FP.
We need larger buffers to handle 64-bit RS object types, but 32-bit code
will never fill all of the getData().length bytes. This allows us to retain
our verification code.

We have to modify an existing use of FieldPacker that was doing partial
updates of the underlying buffer. This was really relying on the old data
to be implicitly selected and written back, but that is not guaranteed by
the original API. This also required a fix to the FieldPacker.reset() API,
which was not allowing the FieldPacker to ever point to the final entry in
its buffer.

Change-Id: Idcd52790ac2b0ab1eff3f043e7eec2832953f04b
2014-06-18 00:24:44 -07:00
Jason Sams
b49dfeaea9 Fix element size on 64b
RenderScript Element types know their own size.  This
change properly tracks the new object sizes.

Change-Id: I3cbf76a7ec5f68056ed5599e9406cea05ba86969
2014-06-18 13:17:57 -07:00
Tim Murray
4154bbd69b Move FieldPacker over to use large objects on 64-bit.
Change-Id: I1d4d502a3f9d86c6cf0f516cc087b1457f86ac28
2014-06-12 14:23:19 -07:00
Tim Murray
fdb15a76a3 DO NOT MERGE: Mark new util type functions as @hide in AOSP.
Change-Id: I834e07aef142aa79ed1603535689d0b833357f6c
2014-06-04 10:25:54 -07:00
Tim Murray
1afc29ae38 Merge "Add support for mixed 32/64 APKs using RenderScript." 2014-06-03 21:36:19 +00:00
Tim Murray
f0c62b2676 Add support for mixed 32/64 APKs using RenderScript.
Change-Id: I8901a1547d180c9dcef320f86d07a5b82551fb5c
2014-06-03 12:30:53 -07:00
Ying Wang
4463cbc61d am 3b9600b6: Merge "Remove unused LOCAL_LDLIBS."
* commit '3b9600b673ad6a83481dcf88db6c9b2dc5bc9ba3':
  Remove unused LOCAL_LDLIBS.
2014-05-08 00:21:38 +00:00
Ying Wang
b38e3fdf5a Remove unused LOCAL_LDLIBS.
Change-Id: I01346e76f4ac6402af0ef33e3b2eef4a69e704a2
2014-05-07 15:23:37 -07:00
Stephen Hines
f0aa4cc0f2 am a4898534: Merge "Fix improper use of JNI_ABORT for operations where Java objects are written."
* commit 'a48985349cb26757b6c4be18acc496ab6d1110e5':
  Fix improper use of JNI_ABORT for operations where Java objects are written.
2014-04-17 18:20:47 +00:00
Stephen Hines
a48985349c Merge "Fix improper use of JNI_ABORT for operations where Java objects are written." 2014-04-17 18:15:38 +00:00
Jason Sams
a4af5726c4 am 112d1b94: Merge "Add BiCubic resize instrinsic"
* commit '112d1b94ee8456dba16842e6b964eb35aef95818':
  Add BiCubic resize instrinsic
2014-04-17 17:02:10 +00:00
Stephen Hines
414fa2c93a Fix improper use of JNI_ABORT for operations where Java objects are written.
In these RS API calls, it is possible (and very likely) that some Java objects
are written to via JNI calls into the RS driver. These writes can end up being
discarded if we specify JNI_ABORT, particularly if the Java object has been
moved due to GC. The change introduces a readonly mode for some macro calls
and updates other JNI callers to appropriately skip JNI_ABORT.

Change-Id: I8c5f2ae959b3fbc9008c9d2ac4542f2ebab29b06
2014-04-17 01:02:42 -07:00
Jason Sams
464af41b28 Add BiCubic resize instrinsic
Change-Id: Iafec3f4260bb5d3a3133b034e42dfb0a94ae9f81
2014-04-16 17:13:09 -07:00
Jason Sams
095ece1009 am b3cafa56: Merge "Fix RenderScriptGL setSurfaceTexture problem"
* commit 'b3cafa56205942343930e4fbb0a3d50d6e33a046':
  Fix RenderScriptGL setSurfaceTexture problem
2014-04-01 00:10:55 +00:00
Xiaofei Wan
21e0af987d Fix RenderScriptGL setSurfaceTexture problem
rsnContextSetSurfaceTexture() has no implementation in rs-jni, use nContextSetSurface() in setSurfaceTexture().

Change-Id: I066432575c9e74f21ea3a3776628b572b6e31377
Signed-off-by: Xiaofei Wan <xiaofei.wan@intel.com>
2014-03-31 14:40:08 +08:00
Glenn Kasten
240d563863 am c1f3d4c1: Merge "Fix 64 bit compile failures in renderscript"
* commit 'c1f3d4c1ba7903d1b72c2341b5284da12b79ee46':
  Fix 64 bit compile failures in renderscript
2014-03-19 14:05:20 -07:00
Narayan Kamath
78c0ce5612 Fix 64 bit compile failures in renderscript
Use uintptr_t for pointers (and not uint32_t) and
also don't assume that size_t is 32 bits wide.

Also uses java longs for passing pointers across
JNI boundaries.

Change-Id: Ie52bd8ae967fbddc911eda3a43cc799d53bbce66
2014-03-19 17:14:54 +00:00
Jason Sams
9a9916b58f am 2383f220: Merge "Validate objects are from the correct context."
* commit '2383f2200ab0c2dbd71708b5c1fb6af98db408fa':
  Validate objects are from the correct context.
2014-03-05 16:56:02 -08:00
Jason Sams
678cc7fe9f Validate objects are from the correct context.
Change-Id: I7d87b0e253b8d2e36d1aed790cfe3a7dd23e158f
2014-03-05 16:09:02 -08:00
Tim Murray
fb51a4301c am 8377a4fd: Merge "Fix null check for BaseObj.equals."
* commit '8377a4fd03d4fc367e0cb07af748ae941d9960a9':
  Fix null check for BaseObj.equals.
2014-03-03 11:12:01 -08:00
Tim Murray
8377a4fd03 Merge "Fix null check for BaseObj.equals." 2014-03-03 19:09:08 +00:00
Tim Murray
78214c9531 Fix null check for BaseObj.equals.
Change-Id: I4f060697db175cbf0b5617c1220db853bbe53f1f
2014-02-28 16:57:47 -08:00
Narayan Kamath
d138029d92 am 14420e29: Merge "AArch64: Use long[] for RS id array"
* commit '14420e29abc0f16f818ddaf606515861ba69ae68':
  AArch64: Use long[] for RS id array
2014-02-28 05:26:30 -08:00
Narayan Kamath
14420e29ab Merge "AArch64: Use long[] for RS id array" 2014-02-28 13:22:26 +00:00
Tim Murray
4870c813fe am 7d1a6c5c: Merge "Fix destruction issues relating to AllocationAdapter."
* commit '7d1a6c5cac16795e5953d2b4d34671e34e907632':
  Fix destruction issues relating to AllocationAdapter.
2014-02-14 15:53:59 -08:00
Tim Murray
6d63c84f44 Fix destruction issues relating to AllocationAdapter.
bug 12971201

Change-Id: I3d9f66f527a35837ac866a695bdcc41d908a2562
2014-02-14 15:48:03 -08:00
Tim Murray
b25a6936a1 am d7043f00: Merge "Add hidden minor version ID for support lib workarounds."
* commit 'd7043f0084237200b6aab5d101c8ab6d3ab495c6':
  Add hidden minor version ID for support lib workarounds.
2014-02-14 12:51:32 -08:00
Tim Murray
d7043f0084 Merge "Add hidden minor version ID for support lib workarounds." 2014-02-14 20:47:34 +00:00
Ashok Bhat
9807155b11 AArch64: Use long[] for RS id array
Change-Id: Ia5145a547c0d13c7d6f1bb4d8f5472be62481bd9
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-12 23:09:03 +00:00
Tim Murray
eaf8237418 am 38d799fc: Merge "Generic object based data copy."
* commit '38d799fc7a272c3c6ff7b9bc7b7f9239b45bf98c':
  Generic object based data copy.
2014-02-10 15:29:55 -08:00
Tim Murray
38d799fc7a Merge "Generic object based data copy." 2014-02-10 23:27:06 +00:00
Jason Sams
1136bb91b4 Generic object based data copy.
This change consolidates the copy paths to Object based.
The runtime now uses reflection to identify the type of
array present.  This adds support for long/double and reduces
the amount of code present.  We could also support arrays of vectors
or objects in the future with this mechanism.

Change-Id: I2297c1c01fbe6a64c375d6368f25d7db781ea788
2014-02-10 15:18:56 -08:00
Narayan Kamath
578d4f5f50 am 56062983: Merge "AArch64: Use long for pointers in RS Java/JNI code"
* commit '56062983f1e07295c812fba0e22ce579a35b6f76':
  AArch64: Use long for pointers in RS Java/JNI code
2014-02-10 05:37:18 -08:00
Narayan Kamath
56062983f1 Merge "AArch64: Use long for pointers in RS Java/JNI code" 2014-02-10 13:33:26 +00:00
Jean-Luc Brouillet
8067c9ec87 am 11e6cabc: Merge "Fix a typo."
* commit '11e6cabc66a5ecfc9dadbd68fc0a5ed7d2a4656d':
  Fix a typo.
2014-02-07 11:11:28 -08:00
Jean-Luc Brouillet
d60799ec84 Fix a typo.
Change-Id: I770fe97ab0635de84d15393aca6bca57552f2f10
2014-02-07 11:04:26 -08:00
Tim Murray
67cc2d033e Add hidden minor version ID for support lib workarounds.
Change-Id: I7940e32c78caaab351fb28d92e5fadbea6292b27
2014-02-06 17:07:05 -08:00
Ashok Bhat
0e0c0885ae AArch64: Use long for pointers in RS Java/JNI code
Changes include
[x] Some JNI functions, with return type jlong, casts
    pointer to jint before returning it. This has been fixed.

[x] Minor JNI function prototype changes where
    formal paramter type has been changed to a JNI
    type (int to jint for example).

[x] long is used for ScriptC, Sampler, Font, ProgramStore
    handles as they can be 64-bit.

[x] A new hidden constructor ScriptC(long, RenderScript)
    has been added. This should eventually replace public
    API method ScriptC(int, RenderScript).

[x] Font and FileA3D use getNativeAsset instead of getAssetInt
    to get Asset Handles. The getAssetInt method will be
    deprecated in favor of getNativeAsset, as the former does
    not support 64-bit.

[x] rsnPathCreate method accepts loop as an int. This should
    be long as the underlying RS function assumes this to be
    a pointer.

Change-Id: I919d857e5933febe63966049da83de9f9adee6f5
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-05 11:26:38 +00:00
Tim Murray
b1bec0d916 am 3fb6feac: Merge "Check that bound allocations are 1D"
* commit '3fb6feacc62e1021c705b53d46e915ecf50582d2':
  Check that bound allocations are 1D
2014-02-03 14:41:39 -08:00
Tim Murray
67d9e0be8e am 0cc37f4c: Merge "Fix debug context."
* commit '0cc37f4cdeaed95e4f61f1a6e7b78f07e7025e97':
  Fix debug context.
2014-02-03 14:41:30 -08:00
Tim Murray
42e4aee598 am 0539b7b4: Merge "Enable asynchronous destruction of BaseObjs."
* commit '0539b7b4116622d33c91dbaa9a3040c7a3a703d6':
  Enable asynchronous destruction of BaseObjs.
2014-02-03 14:41:27 -08:00
Tim Murray
42955bab2a am d8b4dd95: Merge "Fix most logging macros for context pointers."
* commit 'd8b4dd9555e987df92206562061080b327598f41':
  Fix most logging macros for context pointers.
2014-02-03 14:41:24 -08:00