unhide J API
Change-Id: Ied1465f2b4a237b9724caa5fc1dcc6f3d22640ac
diff --git a/scriptc/rs_allocation.rsh b/scriptc/rs_allocation.rsh
index c6a0d6e..caf93da 100644
--- a/scriptc/rs_allocation.rsh
+++ b/scriptc/rs_allocation.rsh
@@ -143,22 +143,26 @@
extern const void * __attribute__((overloadable))
rsGetElementAt(rs_allocation, uint32_t x, uint32_t y, uint32_t z);
+// New API's
#if (defined(RS_VERSION) && (RS_VERSION >= 16))
/**
* Send the contents of the Allocation to the queue.
+ * @param a allocation to work on
*/
extern const void __attribute__((overloadable))
- rsAllocationIoSend(rs_allocation);
+ rsAllocationIoSend(rs_allocation a);
/**
* Receive a new set of contents from the queue.
+ * @param a allocation to work on
*/
extern const void __attribute__((overloadable))
- rsAllocationIoReceive(rs_allocation);
+ rsAllocationIoReceive(rs_allocation a);
/**
+ * Get the element object describing the allocation's layout
* @param a allocation to get data from
* @return element describing allocation layout
*/
diff --git a/scriptc/rs_element.rsh b/scriptc/rs_element.rsh
index 1a4cdb7..0230f10 100644
--- a/scriptc/rs_element.rsh
+++ b/scriptc/rs_element.rsh
@@ -23,9 +23,15 @@
#ifndef __RS_ELEMENT_RSH__
#define __RS_ELEMENT_RSH__
+// New API's
#if (defined(RS_VERSION) && (RS_VERSION >= 16))
/**
+ * Elements could be simple, such as an int or a float, or a
+ * structure with multiple sub elements, such as a collection of
+ * floats, float2, float4. This function returns zero for simple
+ * elements or the number of sub-elements otherwise.
+ *
* @param e element to get data from
* @return number of sub-elements in this element
*/
@@ -33,6 +39,9 @@
rsElementGetSubElementCount(rs_element e);
/**
+ * For complex elements, this function will return the
+ * sub-element at index
+ *
* @param e element to get data from
* @param index index of the sub-element to return
* @return sub-element in this element at given index
@@ -41,6 +50,9 @@
rsElementGetSubElement(rs_element, uint32_t index);
/**
+ * For complex elements, this function will return the length of
+ * sub-element name at index
+ *
* @param e element to get data from
* @param index index of the sub-element to return
* @return length of the sub-element name including the null
@@ -50,6 +62,9 @@
rsElementGetSubElementNameLength(rs_element e, uint32_t index);
/**
+ * For complex elements, this function will return the
+ * sub-element name at index
+ *
* @param e element to get data from
* @param index index of the sub-element
* @param name array to store the name into
@@ -61,6 +76,10 @@
rsElementGetSubElementName(rs_element e, uint32_t index, char *name, uint32_t nameLength);
/**
+ * For complex elements, some sub-elements could be statically
+ * sized arrays. This function will return the array size for
+ * sub-element at index
+ *
* @param e element to get data from
* @param index index of the sub-element
* @return array size of sub-element in this element at given
@@ -70,6 +89,9 @@
rsElementGetSubElementArraySize(rs_element e, uint32_t index);
/**
+ * This function specifies the location of a sub-element within
+ * the element
+ *
* @param e element to get data from
* @param index index of the sub-element
* @return offset in bytes of sub-element in this element at
@@ -79,13 +101,17 @@
rsElementGetSubElementOffsetBytes(rs_element e, uint32_t index);
/**
+ * Returns the size of element in bytes
+ *
* @param e element to get data from
* @return total size of the element in bytes
*/
extern uint32_t __attribute__((overloadable))
- rsElementGetSizeBytes(rs_element e);
+ rsElementGetBytesSize(rs_element e);
/**
+ * Returns the element's data type
+ *
* @param e element to get data from
* @return element's data type
*/
@@ -93,6 +119,8 @@
rsElementGetDataType(rs_element e);
/**
+ * Returns the element's data kind
+ *
* @param e element to get data from
* @return element's data size
*/
@@ -100,6 +128,8 @@
rsElementGetDataKind(rs_element e);
/**
+ * Returns the element's vector size
+ *
* @param e element to get data from
* @return length of the element vector (for float2, float3,
* etc.)
diff --git a/scriptc/rs_mesh.rsh b/scriptc/rs_mesh.rsh
index 87ffd33..0ecd786 100644
--- a/scriptc/rs_mesh.rsh
+++ b/scriptc/rs_mesh.rsh
@@ -23,9 +23,13 @@
#ifndef __RS_MESH_RSH__
#define __RS_MESH_RSH__
+// New API's
#if (defined(RS_VERSION) && (RS_VERSION >= 16))
/**
+ * Returns the number of allocations in the mesh that contain
+ * vertex data
+ *
* @param m mesh to get data from
* @return number of allocations in the mesh that contain vertex
* data
@@ -34,6 +38,9 @@
rsgMeshGetVertexAllocationCount(rs_mesh m);
/**
+ * Meshes could have multiple index sets, this function returns
+ * the number.
+ *
* @param m mesh to get data from
* @return number of primitive groups in the mesh. This would
* include simple primitives as well as allocations
@@ -43,6 +50,9 @@
rsgMeshGetPrimitiveCount(rs_mesh m);
/**
+ * Returns an allocation that is part of the mesh and contains
+ * vertex data, e.g. positions, normals, texcoords
+ *
* @param m mesh to get data from
* @param index index of the vertex allocation
* @return allocation containing vertex data
@@ -51,6 +61,9 @@
rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index);
/**
+ * Returns an allocation containing index data or a null
+ * allocation if only the primitive is specified
+ *
* @param m mesh to get data from
* @param index index of the index allocation
* @return allocation containing index data
@@ -59,6 +72,9 @@
rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index);
/**
+ * Returns the primitive describing how a part of the mesh is
+ * rendered
+ *
* @param m mesh to get data from
* @param index index of the primitive
* @return primitive describing how the mesh is rendered
diff --git a/scriptc/rs_program.rsh b/scriptc/rs_program.rsh
index 6a9929e..299aae6 100644
--- a/scriptc/rs_program.rsh
+++ b/scriptc/rs_program.rsh
@@ -26,99 +26,88 @@
#if (defined(RS_VERSION) && (RS_VERSION >= 16))
/**
- * @hide
* Get program store depth function
*
- * @param ps
+ * @param ps program store to query
*/
extern rs_depth_func __attribute__((overloadable))
rsgProgramStoreGetDepthFunc(rs_program_store ps);
/**
- * @hide
* Get program store depth mask
*
- * @param ps
+ * @param ps program store to query
*/
extern bool __attribute__((overloadable))
- rsgProgramStoreGetDepthMask(rs_program_store ps);
+ rsgProgramStoreIsDepthMaskEnabled(rs_program_store ps);
/**
- * @hide
* Get program store red component color mask
*
- * @param ps
+ * @param ps program store to query
*/
extern bool __attribute__((overloadable))
- rsgProgramStoreGetColorMaskR(rs_program_store ps);
+ rsgProgramStoreIsColorMaskRedEnabled(rs_program_store ps);
/**
- * @hide
* Get program store green component color mask
*
- * @param ps
+ * @param ps program store to query
*/
extern bool __attribute__((overloadable))
- rsgProgramStoreGetColorMaskG(rs_program_store ps);
+ rsgProgramStoreIsColorMaskGreenEnabled(rs_program_store ps);
/**
- * @hide
* Get program store blur component color mask
*
- * @param ps
+ * @param ps program store to query
*/
extern bool __attribute__((overloadable))
- rsgProgramStoreGetColorMaskB(rs_program_store ps);
+ rsgProgramStoreIsColorMaskBlueEnabled(rs_program_store ps);
/**
- * @hide
* Get program store alpha component color mask
*
- * @param ps
+ * @param ps program store to query
*/
extern bool __attribute__((overloadable))
- rsgProgramStoreGetColorMaskA(rs_program_store ps);
+ rsgProgramStoreIsColorMaskAlphaEnabled(rs_program_store ps);
/**
- * @hide
* Get program store blend source function
*
- * @param ps
+ * @param ps program store to query
*/
extern rs_blend_src_func __attribute__((overloadable))
rsgProgramStoreGetBlendSrcFunc(rs_program_store ps);
/**
- * @hide
* Get program store blend destination function
*
- * @param ps
+ * @param ps program store to query
*/
extern rs_blend_dst_func __attribute__((overloadable))
rsgProgramStoreGetBlendDstFunc(rs_program_store ps);
/**
- * @hide
* Get program store dither state
*
- * @param ps
+ * @param ps program store to query
*/
extern bool __attribute__((overloadable))
- rsgProgramStoreGetDitherEnabled(rs_program_store ps);
+ rsgProgramStoreIsDitherEnabled(rs_program_store ps);
/**
- * @hide
* Get program raster point sprite state
*
- * @param pr
+ * @param pr program raster to query
*/
extern bool __attribute__((overloadable))
- rsgProgramRasterGetPointSpriteEnabled(rs_program_raster pr);
+ rsgProgramRasterIsPointSpriteEnabled(rs_program_raster pr);
/**
- * @hide
* Get program raster cull mode
*
- * @param pr
+ * @param pr program raster to query
*/
extern rs_cull_mode __attribute__((overloadable))
rsgProgramRasterGetCullMode(rs_program_raster pr);
diff --git a/scriptc/rs_sampler.rsh b/scriptc/rs_sampler.rsh
index c8948c7..2ff426c 100644
--- a/scriptc/rs_sampler.rsh
+++ b/scriptc/rs_sampler.rsh
@@ -23,49 +23,50 @@
#ifndef __RS_SAMPLER_RSH__
#define __RS_SAMPLER_RSH__
+// New API's
#if (defined(RS_VERSION) && (RS_VERSION >= 16))
/**
- * @hide
* Get sampler minification value
*
- * @param pr
+ * @param s sampler to query
+ * @return minification value
*/
extern rs_sampler_value __attribute__((overloadable))
rsSamplerGetMinification(rs_sampler s);
/**
- * @hide
* Get sampler magnification value
*
- * @param pr
+ * @param s sampler to query
+ * @return magnification value
*/
extern rs_sampler_value __attribute__((overloadable))
rsSamplerGetMagnification(rs_sampler s);
/**
- * @hide
* Get sampler wrap S value
*
- * @param pr
+ * @param s sampler to query
+ * @return wrap S value
*/
extern rs_sampler_value __attribute__((overloadable))
rsSamplerGetWrapS(rs_sampler s);
/**
- * @hide
* Get sampler wrap T value
*
- * @param pr
+ * @param s sampler to query
+ * @return wrap T value
*/
extern rs_sampler_value __attribute__((overloadable))
rsSamplerGetWrapT(rs_sampler s);
/**
- * @hide
- * Get sampler anisotropy
+ Get sampler anisotropy
*
- * @param pr
+ * @param s sampler to query
+ * @return anisotropy
*/
extern float __attribute__((overloadable))
rsSamplerGetAnisotropy(rs_sampler s);
diff --git a/scriptc/rs_types.rsh b/scriptc/rs_types.rsh
index 397caae..04099cd 100644
--- a/scriptc/rs_types.rsh
+++ b/scriptc/rs_types.rsh
@@ -402,6 +402,7 @@
#endif //defined(RS_VERSION) && (RS_VERSION >= 14)
+// New API's
#if (defined(RS_VERSION) && (RS_VERSION >= 16))
/**
@@ -409,13 +410,37 @@
*
**/
typedef enum {
+ /**
+ * Vertex data will be rendered as a series of points
+ */
RS_PRIMITIVE_POINT = 0,
+ /**
+ * Vertex pairs will be rendered as lines
+ */
RS_PRIMITIVE_LINE = 1,
+ /**
+ * Vertex data will be rendered as a connected line strip
+ */
RS_PRIMITIVE_LINE_STRIP = 2,
+ /**
+ * Vertices will be rendered as individual triangles
+ */
RS_PRIMITIVE_TRIANGLE = 3,
+ /**
+ * Vertices will be rendered as a connected triangle strip
+ * defined by the first three vertices with each additional
+ * triangle defined by a new vertex
+ */
RS_PRIMITIVE_TRIANGLE_STRIP = 4,
+ /**
+ * Vertices will be rendered as a sequence of triangles that all
+ * share first vertex as the origin
+ */
RS_PRIMITIVE_TRIANGLE_FAN = 5,
+ /**
+ * Invalid primitive
+ */
RS_PRIMITIVE_INVALID = 100,
} rs_primitive;
@@ -439,7 +464,6 @@
*/
typedef enum {
RS_TYPE_NONE = 0,
- //RS_TYPE_FLOAT_16,
RS_TYPE_FLOAT_32 = 2,
RS_TYPE_FLOAT_64 = 3,
RS_TYPE_SIGNED_8 = 4,
@@ -498,14 +522,43 @@
} rs_data_kind;
typedef enum {
+ /**
+ * Always drawn
+ */
RS_DEPTH_FUNC_ALWAYS = 0,
+ /**
+ * Drawn if the incoming depth value is less than that in the
+ * depth buffer
+ */
RS_DEPTH_FUNC_LESS = 1,
+ /**
+ * Drawn if the incoming depth value is less or equal to that in
+ * the depth buffer
+ */
RS_DEPTH_FUNC_LEQUAL = 2,
+ /**
+ * Drawn if the incoming depth value is greater than that in the
+ * depth buffer
+ */
RS_DEPTH_FUNC_GREATER = 3,
+ /**
+ * Drawn if the incoming depth value is greater or equal to that
+ * in the depth buffer
+ */
RS_DEPTH_FUNC_GEQUAL = 4,
+ /**
+ * Drawn if the incoming depth value is equal to that in the
+ * depth buffer
+ */
RS_DEPTH_FUNC_EQUAL = 5,
+ /**
+ * Drawn if the incoming depth value is not equal to that in the
+ * depth buffer
+ */
RS_DEPTH_FUNC_NOTEQUAL = 6,
-
+ /**
+ * Invalid depth function
+ */
RS_DEPTH_FUNC_INVALID = 100,
} rs_depth_func;