1be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# 2be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# Copyright (C) 2014 The Android Open Source Project 3be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# 4be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# Licensed under the Apache License, Version 2.0 (the "License"); 5be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# you may not use this file except in compliance with the License. 6be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# You may obtain a copy of the License at 7be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# 8be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# http://www.apache.org/licenses/LICENSE-2.0 9be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# 10be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# Unless required by applicable law or agreed to in writing, software 11be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# distributed under the License is distributed on an "AS IS" BASIS, 12be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# See the License for the specific language governing permissions and 14be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# limitations under the License. 15be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet# 16be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 17be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletheader: 1820b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouilletsummary: Object Characteristics Functions 19be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 206386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet The functions below can be used to query the characteristics of an Allocation, Element, 216386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet or Sampler object. These objects are created from Java. You can't create them from a 226386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet script. 2320b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 246386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet <h5>Allocations:</h5> 256386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 266386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Allocations are the primary method used to pass data to and from RenderScript kernels. 276386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 286386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet They are a structured collection of cells that can be used to store bitmaps, textures, 296386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet arbitrary data points, etc. 306386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 316386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet This collection of cells may have many dimensions (X, Y, Z, Array0, Array1, Array2, Array3), 326386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet faces (for cubemaps), and level of details (for mipmapping). 336386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 346386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet See the <a href='http://developer.android.com/reference/android/renderscript/Allocation.html'>android.renderscript.Allocation</a> for details on to create Allocations. 356386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 366386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet <h5>Elements:</h5> 376386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 386386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet The term "element" is used a bit ambiguously in RenderScript, as both type information 396386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet for the cells of an Allocation and the instantiation of that type. For example:<ul> 40be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet <li>@rs_element is a handle to a type specification, and</li> 416386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet <li>In functions like @rsGetElementAt(), "element" means the instantiation of the type, 426386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet i.e. a cell of an Allocation.</li></ul> 43be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 44be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet The functions below let you query the characteristics of the type specificiation. 45be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 466386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet An Element can specify a simple data types as found in C, e.g. an integer, float, or 476386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet boolean. It can also specify a handle to a RenderScript object. See @rs_data_type for 486386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet a list of basic types. 49be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 506386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Elements can specify fixed size vector (of size 2, 3, or 4) versions of the basic types. 516386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Elements can be grouped together into complex Elements, creating the equivalent of 526386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet C structure definitions. 53be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 546386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Elements can also have a kind, which is semantic information used to interpret pixel 556386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet data. See @rs_data_kind. 566386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 576386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet When creating Allocations of common elements, you can simply use one of the many predefined 586386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Elements like <a href='http://developer.android.com/reference/android/renderscript/Element.html#F32_2(android.renderscript.RenderScript)'>F32_2</a>. 596386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 606386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet To create complex Elements, use the <a href='http://developer.android.com/reference/android/renderscript/Element.Builder.html'>Element.Builder</a> Java class. 616386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 626386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet <h5>Samplers:</h5> 636386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 646386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Samplers objects define how Allocations can be read as structure within a kernel. 656386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>. 66be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 67be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 68be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsAllocationGetDimFaces 69be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: uint32_t, "Returns 1 if more than one face is present, 0 otherwise." 70be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: rs_allocation a 71be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletsummary: Presence of more than one face 72be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 736386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet If the Allocation is a cubemap, this function returns 1 if there's more than one face 746386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet present. In all other cases, it returns 0. 7520b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 7620b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet Use @rsGetDimHasFaces() to get the dimension of a currently running kernel. 77be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 78be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 79be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 80be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsAllocationGetDimLOD 81be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: uint32_t, "Returns 1 if more than one LOD is present, 0 otherwise." 82be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: rs_allocation a 8320b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouilletsummary: Presence of levels of detail 84be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 856386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Query an Allocation for the presence of more than one Level Of Detail. This is useful 866386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet for mipmaps. 8720b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 8820b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet Use @rsGetDimLod() to get the dimension of a currently running kernel. 89be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 90be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 91be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 92be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsAllocationGetDimX 936386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "X dimension of the Allocation." 94be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: rs_allocation a 95be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletsummary: Size of the X dimension 96be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 976386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Returns the size of the X dimension of the Allocation. 9820b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 9920b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet Use @rsGetDimX() to get the dimension of a currently running kernel. 100be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 101be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 102be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 103be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsAllocationGetDimY 1046386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "Y dimension of the Allocation." 105be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: rs_allocation a 106be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletsummary: Size of the Y dimension 107be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 1086386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Returns the size of the Y dimension of the Allocation. If the Allocation has less 1096386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet than two dimensions, returns 0. 11020b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 11120b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet Use @rsGetDimY() to get the dimension of a currently running kernel. 112be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 113be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 114be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 115be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsAllocationGetDimZ 1166386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "Z dimension of the Allocation." 117be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: rs_allocation a 118be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletsummary: Size of the Z dimension 119be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 1206386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Returns the size of the Z dimension of the Allocation. If the Allocation has less 1216386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet than three dimensions, returns 0. 12220b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 12320b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet Use @rsGetDimZ() to get the dimension of a currently running kernel. 124be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 125be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 126be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 127be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsAllocationGetElement 1286386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: rs_element, "Element describing Allocation layout." 1296386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_allocation a, "Allocation to get data from." 1306386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Get the object that describes the cell of an Allocation 131be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 1326386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Get the Element object describing the type, kind, and other characteristics of a cell 1336386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet of an Allocation. See the rsElement* functions below. 134be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 135be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 136be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 137be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsClearObject 138be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillett: rs_element, rs_type, rs_allocation, rs_sampler, rs_script 139be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: void 140be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: #1* dst 14120b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouilletsummary: Release an object 142be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 1436386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Tells the run time that this handle will no longer be used to access the the related 1446386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet object. If this was the last handle to that object, resource recovery may happen. 14520b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 1466386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet After calling this function, *dst will be set to an empty handle. See @rsIsObject(). 147be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 148be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 149be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 150be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsIsObject 151be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillett: rs_element, rs_type, rs_allocation, rs_sampler, rs_script 152be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: bool 153be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: #1 v 15420b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouilletsummary: Check for an empty handle 155be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 15620b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet Returns true if the handle contains a non-null reference. 15720b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 15820b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet This function does not validate that the internal pointer used in the handle 15920b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet points to an actual valid object; it only checks for null. 16020b27d602a4778ed50a83df2147416a35b7c92beJean-Luc Brouillet 1616386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet This function can be used to check the Element returned by @rsElementGetSubElement() 1626386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet or see if @rsClearObject() has been called on a handle. 163be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 164be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 165be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 166be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetBytesSize 167be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 168be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: uint32_t 169be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: rs_element e 1706386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Size of an Element 171be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 1726386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Returns the size in bytes that an instantiation of this Element will occupy. 173be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 174be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 175be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 176be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetDataKind 177be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 178be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: rs_data_kind 179be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: rs_element e 1806386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Kind of an Element 181be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 1826386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Returns the Element's data kind. This is used to interpret pixel data. 183be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 184be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet See @rs_data_kind. 185be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 186be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 187be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 188be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetDataType 189be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 190be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: rs_data_type 191be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: rs_element e 1926386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Data type of an Element 193be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 1946386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Returns the Element's base data type. This can be a type similar to C/C++ (e.g. 1956386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet RS_TYPE_UNSIGNED_8), a handle (e.g. RS_TYPE_ALLOCATION and RS_TYPE_ELEMENT), or a 1966386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet more complex numerical type (e.g. RS_TYPE_UNSIGNED_5_6_5 and RS_TYPE_MATRIX_4X4). 1976386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet See @rs_data_type. 198be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 1996386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet If the Element describes a vector, this function returns the data type of one of its items. 2006386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Use @rsElementGetVectorSize to get the size of the vector. 201be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 2026386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet If the Element describes a structure, RS_TYPE_NONE is returned. Use the rsElementGetSub* 2036386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet functions to explore this complex Element. 204be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 205be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 206be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 207be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetSubElement 208be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 2096386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: rs_element, "Sub-element at the given index." 2106386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_element e, "Element to query." 2116386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: uint32_t index, "Index of the sub-element to return." 2126386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Sub-element of a complex Element 213be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 2146386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet For Elements that represents a structure, this function returns the sub-element at the 2156386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet specified index. 216be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 2176386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet If the Element is not a structure or the index is greater or equal to the number of 2186386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet sub-elements, an invalid handle is returned. 219be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 220be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 221be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 222be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetSubElementArraySize 223be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 2246386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "Array size of the sub-element." 2256386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_element e, "Element to query." 2266386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: uint32_t index, "Index of the sub-element." 2276386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Array size of a sub-element of a complex Element 228be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 2296386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet For complex Elements, sub-elements can be statically sized arrays. This function 2306386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet returns the array size of the sub-element at the index. This sub-element repetition 2316386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet is different than fixed size vectors. 232be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 233be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 234be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 235be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetSubElementCount 236be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 2376386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "Number of sub-elements." 2386386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_element e, "Element to get data from." 2396386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Number of sub-elements 240be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 2416386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Elements can be simple, such as an int or a float, or a structure with multiple 2426386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet sub-elements. This function returns zero for simple Elements and the number of 2436386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet sub-elements for complex Elements. 244be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 245be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 246be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 247be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetSubElementName 248be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 2496386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "Number of characters copied, excluding the null terminator." 2506386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_element e, "Element to get data from." 2516386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: uint32_t index, "Index of the sub-element." 2526386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: char* name, "Address of the array to store the name into." 2536386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: uint32_t nameLength, "Length of the provided name array." 2546386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Name of a sub-element 255be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 2566386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet For complex Elements, this function returns the name of the sub-element at the 2576386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet specified index. 258be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 259be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 260be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 261be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetSubElementNameLength 262be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 2636386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "Length of the sub-element name including the null terminator." 2646386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_element e, "Element to get data from." 2656386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: uint32_t index, "Index of the sub-element." 2666386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Length of the name of a sub-element 267be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 2686386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet For complex Elements, this function returns the length of the name of the sub-element 2696386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet at the specified index. 270be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 271be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 272be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 273be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetSubElementOffsetBytes 274be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 2756386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "Offset in bytes." 2766386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_element e, "Element to get data from." 2776386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: uint32_t index, "Index of the sub-element." 2786386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Offset of the instantiated sub-element 279be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 2806386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet This function returns the relative position of the instantiation of the specified 2816386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet sub-element within the instantiation of the Element. 2826386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 2836386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet For example, if the Element describes a 32 bit float followed by a 32 bit integer, 2846386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet the offset return for the first will be 0 and the second 4. 285be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 286be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 287be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 288be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsElementGetVectorSize 289be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 2906386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: uint32_t, "Length of the element vector." 2916386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_element e, "Element to get data from." 2926386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Vector size of the Element 293be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 2946386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Returns the Element's vector size. If the Element does not represent a vector, 2956386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 1 is returned. 296be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 297be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 298be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 299be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsGetAllocation 300be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: rs_allocation 301be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: const void* p 30236e2be56cd398bf4a318114bbc9fa3f4573c158fJean-Luc Brouilletdeprecated: 22, This function is deprecated and will be removed from the SDK in a future release. 3036386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Return the Allocation for a given pointer 304be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 3056386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Returns the Allocation for a given pointer. The pointer should point within a valid 3066386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet allocation. The results are undefined if the pointer is not from a valid Allocation. 307be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 308be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 309be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 310be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsSamplerGetAnisotropy 311be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 3126386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: float 3136386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_sampler s 3146386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Anisotropy of the Sampler 315be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 3166386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Get the Sampler's anisotropy. 3176386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 3186386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>. 319be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 320be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 321be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 322be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsSamplerGetMagnification 323be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 3246386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: rs_sampler_value 3256386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_sampler s 3266386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Sampler magnification value 327be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 3286386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Get the Sampler's magnification value. 3296386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 3306386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>. 331be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 332be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 333be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 334be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsSamplerGetMinification 335be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 3366386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: rs_sampler_value 3376386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_sampler s 3386386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Sampler minification value 339be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 3406386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Get the Sampler's minification value. 3416386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 3426386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>. 343be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 344be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 345be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 346be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsSamplerGetWrapS 347be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 3486386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: rs_sampler_value 3496386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_sampler s 3506386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Sampler wrap S value 351be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 3526386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Get the Sampler's wrap S value. 3536386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 3546386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>. 355be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 356be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 357be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 358be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsSamplerGetWrapT 359be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletversion: 16 3606386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletret: rs_sampler_value 3616386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletarg: rs_sampler s 3626386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouilletsummary: Sampler wrap T value 363be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 3646386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet Get the sampler's wrap T value. 3656386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet 3666386ceb3bf25e442513224aaa45691dfe49562d9Jean-Luc Brouillet See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>. 367be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 368be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 369be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillet 370be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletfunction: rsSetObject 371be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillett: rs_element, rs_type, rs_allocation, rs_sampler, rs_script 372be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletret: void 373be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: #1* dst 374be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletarg: #1 src 375be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillethidden: 376be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletsummary: For internal use. 377be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletdescription: 378be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouillettest: none 379be2163801c33d6849ae580d42b919b8803d55095Jean-Luc Brouilletend: 380