213 Commits

Author SHA1 Message Date
Jason Sams
a15ac5fea3 am adb52ef7: Merge "Implement finalizer for RS contexts."
* commit 'adb52ef7034d4d3e0eee58cedae2a343d29771b9':
  Implement finalizer for RS contexts.
2015-02-20 20:00:40 +00:00
Jason Sams
d22a6f09dc Implement finalizer for RS contexts.
Fixes memory leak when apps forget to call .destroy() on the context.

Change-Id: Ida4685768e92cfe3875da38846d17b86cc386cd0
2015-02-19 17:19:52 -08:00
Bill Yi
4fecab570d Merge commit '32acf753e8989766f67fd5300d3eb467f707cc79' into HEAD 2015-02-19 14:31:36 -08:00
Tim Murray
25207df658 Add BLAS intrinsic.
Change-Id: I95ddc46cb3f6217d2ead1091fd47450389544324
2015-02-17 13:10:25 -08:00
Jason Sams
ec10f833b4 am 2a3cdf57: Merge "Implement array types"
automerge: 6e0ad25

* commit '6e0ad25ca8def88a48c9cc6436b12da7ff4600c2':
  Implement array types
2015-02-10 01:44:11 +00:00
Jason Sams
46ba27e3fd Implement array types
Change-Id: I1b83f21ea2aeaa4b9f5934aadcb69d4a1c1fea20
2015-02-06 17:45:15 -08:00
Yang Ni
b457258b5a am da91dfbd: am 1269ff96: Merge "Adds invocable functions to ScriptGroup"
* commit 'da91dfbdf20271dffce5357195800cf36183ad97':
  Adds invocable functions to ScriptGroup
2015-02-05 02:31:46 +00:00
Yang Ni
1269ff9610 Merge "Adds invocable functions to ScriptGroup" 2015-02-05 01:05:08 +00:00
Miao Wang
4bd2c00d8d Merge "make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)" automerge: 9a55cbc
automerge: 58fd96c

* commit '58fd96c607de7f7f821a0b15fd37bc28323fcfde':
  make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)
2015-02-05 00:27:49 +00:00
Yang Ni
be392ad35e Adds invocable functions to ScriptGroup
This also includes InvokeID support

Change-Id: I5b59df166ea30b309b8dd9623825ac0e72d03856
2015-02-04 16:24:48 -08:00
Miao Wang
f0f6e80bae make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT
(Native RS)

Change-Id: I23041da03c2c928ceec76037804abb5dc7e6eb64
2015-02-03 17:16:43 -08:00
Yang Ni
712e38eaba Merge "Pass in code cache directory when creating a script group." automerge: 9559ce7
automerge: 29fe5ef

* commit '29fe5ef179a4a7de15360650353c6196f9350b07':
  Pass in code cache directory when creating a script group.
2015-02-03 06:27:39 +00:00
Yang Ni
ebf63408d2 Pass in code cache directory when creating a script group.
Change-Id: Ia73ea917a126a5055ec97f13d90a5feaafd6a2f5
2015-01-29 08:46:46 -08:00
Miao Wang
2fd1a8b6ca am 2772ee6d: Merge "[RenderScript] Allow U8_2 & U8_3 input allocation for Histogram Intrinsic" into lmp-mr1-dev
automerge: 1446eb8

* commit '1446eb8f6130e4833ca2b74331b867d30445aca3':
  [RenderScript] Allow U8_2 & U8_3 input allocation for Histogram Intrinsic
2015-01-23 19:34:48 +00:00
Miao Wang
8a1265384b [RenderScript] Allow U8_2 & U8_3 input allocation for Histogram
Intrinsic

Bug: 19035242
Bug: 19124958
Change-Id: I9e806d7a0786e728c5f23607dc67ca5d755e12ed
2015-01-23 19:15:57 +00:00
Jason Sams
cf109c5905 am de56e38e: Merge "Fix default compute thread priority" automerge: 231df77
* commit 'de56e38e9e8f7f4a54633b66e2952cea776d6ab5':
  Fix default compute thread priority
2015-01-22 21:18:16 +00:00
Jason Sams
305b8c4737 am 712b05d0: Merge "Add FP16 types to the list of RenderScript types." automerge: 081cda8
* commit '712b05d00b00a6148852e153ef76dfb5960623e9':
  Add FP16 types to the list of RenderScript types.
2015-01-22 21:18:02 +00:00
Jason Sams
231df77eff Merge "Fix default compute thread priority" 2015-01-22 21:08:44 +00:00
Miao Wang
118245d939 Merge "[Renderscript] Add check for Allocation.copyTo(Array) and Fix the input allocation type check for Histogram Intrinsic." into lmp-mr1-dev automerge: dbfcf3f
automerge: a710b83

* commit 'a710b839a23633bb049a6f91ccd7e17261e406a4':
  [Renderscript] Add check for Allocation.copyTo(Array) and Fix the input allocation type check for Histogram Intrinsic.
2015-01-22 01:26:24 +00:00
Jason Sams
c9870c145f Fix default compute thread priority
bug 16651474

Compute inherited graphics default thread priority of Display.  This
was not intended.

Change-Id: I0dd9a230ce8ceba64e971b024cbe518927cd2550
2015-01-21 16:12:37 -08:00
Miao Wang
b590b354ef [Renderscript] Add check for Allocation.copyTo(Array) and
Fix the input allocation type check for Histogram Intrinsic.

Bug: 19035242
Change-Id: I0ef2672bf816854db90fc92dc9ef51d1d231c246
2015-01-21 21:17:19 +00:00
Jason Sams
a5835a2e5f Add FP16 types to the list of RenderScript types.
Change-Id: Ibf9a6d391fb4d6a5c4b4e05ab73fb58bd74dc586
2015-01-20 12:51:14 -08:00
Yang Ni
281c325251 New Script Group API.
Change-Id: I73d3572276a38dac775025b472ba229ad8770c84
2015-01-07 15:07:16 -08:00
Tim Murray
c13160a5c1 Fix typo with register native allocation.
bug 18579193

Change-Id: I42d30709b79a37d6a4126559a511e98e9c8d4808
2014-12-16 10:13:05 -08:00
Tim Murray
d11a658db1 Fix typo with register native allocation.
bug 18579193

Change-Id: I42d30709b79a37d6a4126559a511e98e9c8d4808
2014-12-16 09:59:09 -08:00
Tim Murray
eae2472985 Enable native tracking for RS contexts to improve GC behavior.
This should prevent apps from leaking RS contexts as easily.

bug 18579193

Change-Id: I2d943ce4443ce7cb90ebdd3dd37d338eda6df3a2
2014-12-12 13:30:15 -08:00
Tim Murray
aefbd5f97c Enable native tracking for RS contexts to improve GC behavior.
This should prevent apps from leaking RS contexts as easily.

bug 18579193

Change-Id: I2d943ce4443ce7cb90ebdd3dd37d338eda6df3a2
2014-12-12 11:34:48 -08:00
Miao Wang
8f3cc4582d Add Float32 suppor for IntrinsicResize. base part.
Change-Id: I37e8826cfab92512cc641b106a42723162bffe58
2014-11-13 15:32:18 -08:00
Tim Murray
d0080ee004 am 7fa25bc1: am 3c02b020: Merge "Fix IO_INPUT with 64-bit." into lmp-dev
* commit '7fa25bc1269d3ba2db79f32acb17d80194cbadce':
  Fix IO_INPUT with 64-bit.
2014-08-19 21:07:42 +00:00
Tim Murray
b730d866a0 Fix IO_INPUT with 64-bit.
bug 16846318
bug 17006933

Change-Id: Ic13ef26875d8a6fab1ffb542d62038b768a536ff
2014-08-18 18:14:32 -07:00
Stephen Hines
93697c5f8e am 4ae9a6d5: am 42895561: Merge "Collapse code paths for single- and multi-input kernels."
* commit '4ae9a6d5c517f67d9929cc43568c6b7e3b4dfe23':
  Collapse code paths for single- and multi-input kernels.
2014-08-18 20:00:34 +00:00
Chris Wailes
be7b1defb6 Collapse code paths for single- and multi-input kernels.
This patch simplifies the RenderScript JNI layer by replacing six functions
with a single funciton.  This new function now handles all previous cases.
Functions in android.renderscript.script have been updated to use this new JNI
function.

Change-Id: I6cd5448534c38123d51a589339bbeb7e98453e73
2014-08-18 08:03:52 -07:00
Tim Murray
cd38b763d5 Allocation.resize() should throw an exception in API 21+.
bug 16846318

Change-Id: I852331ec226e4cad8be79aa27c4b51183e97cc1d
2014-08-14 13:41:02 -07:00
Stephen Hines
c9c7daf69b Revert "Collapse code paths for single- and multi-input kernels."
This reverts commit eb3470219dea322efa93eb4b5457813ce71d0c5d.

Change-Id: Id943abf953e832ef831318e6699d4b46e9b46201
2014-08-13 17:32:19 +00:00
Chris Wailes
eb3470219d Collapse code paths for single- and multi-input kernels.
This patch simplifies the RenderScript JNI layer by replacing six functions
with a single funciton.  This new function now handles all previous cases.
Functions in android.renderscript.script have been updated to use this new JNI
function.

Change-Id: I77e4b155cc7ca1581b05bf901c70ae53a9ff0b12
2014-08-07 14:57:22 -07:00
Tim Murray
8fdcf4a08a Fix broken blend intrinsic.
Change-Id: I3a1749aed701e17b48c267ca749c9cf29ca12e43
2014-07-10 13:00:10 -07:00
Tim Murray
3de3dc79e5 Update copyFrom(BaseObj[]) for large objects.
Change-Id: I99cadbd1ad925cad0dd357c9abbd1a49c07785c9
2014-07-09 15:30: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
Stephen Hines
48ba506dfa resolved conflicts for merge of 31012e2c to master
Change-Id: I2e24e0457570d7d856293637a553f0242a97a83b
2014-07-09 07:39:38 -07:00
Jason Sams
7165bd6d74 Merge "Add check and throw for failed Intrinsic init." 2014-06-25 17:35:00 +00:00
Jason Sams
346d97112e am 6b52ca59: am 89e4c715: am 7165bd6d: Merge "Add check and throw for failed Intrinsic init."
* commit '6b52ca5949545dcb654672663e2187a70b04f442':
  Add check and throw for failed Intrinsic init.
2014-06-26 00:32:03 +00:00
Tim Murray
6e45f30718 Remove @hide for new RS constructors.
Change-Id: I015f36e8c54663472f236e311fe279ce06261ff0
2014-06-25 09:20:57 -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
71b676bc95 am ed24d3f2: am db3bcfb8: am 44023a4f: Merge "We need to update mPos when we copy a FieldPacker via its data[] member."
* commit 'ed24d3f2e991906973afce8aa6a3fa54f4a3e4df':
  We need to update mPos when we copy a FieldPacker via its data[] member.
2014-06-24 10:38:45 +00: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
Stephen Hines
7f22d01545 am c5b11fcc: am ff83ed2d: am b02dadd4: Merge "Create FieldPacker.getPos() to get the actual amount of data used for FP."
* commit 'c5b11fcc1f4fc4fba988218d0a99a19690398a56':
  Create FieldPacker.getPos() to get the actual amount of data used for FP.
2014-06-19 03:26:15 +00:00