From 5f785909f3c1a571f81f1cfd543308980a6edd79 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Wed, 26 Aug 2015 19:29:16 -0700 Subject: [PATCH] Update RS docs for M-related changes. This includes FP16 and the rs_kernel_context object. Change-Id: If5574bba85060e2bfe6c4d8f2b3cc1b49827a05a --- .../topics/renderscript/reference/index.jd | 160 +++++ .../topics/renderscript/reference/overview.jd | 169 ++++- .../reference/rs_allocation_data.jd | 146 ++++- .../renderscript/reference/rs_convert.jd | 11 +- .../topics/renderscript/reference/rs_debug.jd | 18 + .../renderscript/reference/rs_for_each.jd | 590 +++++++++++++++++- .../renderscript/reference/rs_graphics.jd | 160 +++-- .../topics/renderscript/reference/rs_math.jd | 30 + .../renderscript/reference/rs_matrix.jd | 12 +- .../renderscript/reference/rs_object_info.jd | 39 +- .../renderscript/reference/rs_value_types.jd | 99 ++- 11 files changed, 1336 insertions(+), 98 deletions(-) diff --git a/docs/html/guide/topics/renderscript/reference/index.jd b/docs/html/guide/topics/renderscript/reference/index.jd index 9221bfc833a53..16745b2e9fd16 100644 --- a/docs/html/guide/topics/renderscript/reference/index.jd +++ b/docs/html/guide/topics/renderscript/reference/index.jd @@ -184,6 +184,38 @@ page.title=RenderScript Index Four 32 bit floats + + + half + + + 16 bit floating point value + + + + + half2 + + + Two 16 bit floats + + + + + half3 + + + Three 16 bit floats + + + + + half4 + + + Four 16 bit floats + + int16_t @@ -320,6 +352,14 @@ page.title=RenderScript Index Suggested cell processing order + + + rs_kernel_context + + + Handle to a kernel invocation context + + rs_matrix2x2 @@ -1803,6 +1843,110 @@ page.title=RenderScript Index Invoke the root kernel of a script + + + rsGetArray0 + + + Index in the Array0 dimension for the specified kernel context + + + + + rsGetArray1 + + + Index in the Array1 dimension for the specified kernel context + + + + + rsGetArray2 + + + Index in the Array2 dimension for the specified kernel context + + + + + rsGetArray3 + + + Index in the Array3 dimension for the specified kernel context + + + + + rsGetDimArray0 + + + Size of the Array0 dimension for the specified kernel context + + + + + rsGetDimArray1 + + + Size of the Array1 dimension for the specified kernel context + + + + + rsGetDimArray2 + + + Size of the Array2 dimension for the specified kernel context + + + + + rsGetDimArray3 + + + Size of the Array3 dimension for the specified kernel context + + + + + rsGetDimHasFaces + + + Presence of more than one face for the specified kernel context + + + + + rsGetDimLod + + + Number of levels of detail for the specified kernel context + + + + + rsGetDimX + + + Size of the X dimension for the specified kernel context + + + + + rsGetDimY + + + Size of the Y dimension for the specified kernel context + + + + + rsGetDimZ + + + Size of the Z dimension for the specified kernel context + + rsGetDt @@ -1843,6 +1987,22 @@ page.title=RenderScript Index Get the Y component of an allocation of YUVs + + + rsGetFace + + + Coordinate of the Face for the specified kernel context + + + + + rsGetLod + + + Index in the Levels of Detail dimension for the specified kernel context + + rsIsObject diff --git a/docs/html/guide/topics/renderscript/reference/overview.jd b/docs/html/guide/topics/renderscript/reference/overview.jd index 169b32016f8c3..5e824ee2b7e51 100644 --- a/docs/html/guide/topics/renderscript/reference/overview.jd +++ b/docs/html/guide/topics/renderscript/reference/overview.jd @@ -30,7 +30,7 @@ framework APIs interact, see the rsGetDimX() and rsGetArray0() for examples. +

+ + +

@@ -120,13 +273,13 @@ over cells 4, 5, 6, and 7 in the X dimension, set xStart to 4 and xEnd to 8. void rsForEach(rs_script script, rs_allocation input, rs_allocation output, const void* usrData); - Removed from API level 14 + Removed from API level 14 and higher void rsForEach(rs_script script, rs_allocation input, rs_allocation output, const void* usrData, const rs_script_call_t* sc); - Removed from API level 14 + Removed from API level 14 and higher @@ -180,4 +333,437 @@ void specializedProcessing(rs_allocation in) {

+ +
+

+ rsGetArray0 + : Index in the Array0 dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetArray0(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the index in the Array0 dimension of the cell being processed, as specified +by the supplied kernel context. +

+ +

The kernel context contains common characteristics of the allocations being iterated +over and rarely used indices, like the Array0 index. +

+ +

You can access the kernel context by adding a special parameter named "context" of +type rs_kernel_context to your kernel function. E.g.
+short RS_KERNEL myKernel(short value, uint32_t x, rs_kernel_context context) {
+  // The current index in the common x, y, z dimensions are accessed by
+  // adding these variables as arguments. For the more rarely used indices
+  // to the other dimensions, extract them from the kernel context:
+  uint32_t index_a0 = rsGetArray0(context);
+  //...
+}
+

+ +

This function returns 0 if the Array0 dimension is not present. +

+
+
+ + +
+

+ rsGetArray1 + : Index in the Array1 dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetArray1(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the index in the Array1 dimension of the cell being processed, as specified +by the supplied kernel context. See rsGetArray0() for an explanation of the context. +

+ +

Returns 0 if the Array1 dimension is not present. +

+
+
+ + +
+

+ rsGetArray2 + : Index in the Array2 dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetArray2(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the index in the Array2 dimension of the cell being processed, +as specified by the supplied kernel context. See rsGetArray0() for an explanation +of the context. +

+ +

Returns 0 if the Array2 dimension is not present. +

+
+
+ + +
+

+ rsGetArray3 + : Index in the Array3 dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetArray3(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the index in the Array3 dimension of the cell being processed, as specified +by the supplied kernel context. See rsGetArray0() for an explanation of the context. +

+ +

Returns 0 if the Array3 dimension is not present. +

+
+
+ + +
+

+ rsGetDimArray0 + : Size of the Array0 dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetDimArray0(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the size of the Array0 dimension for the specified kernel context. +See rsGetDimX() for an explanation of the context. +

+ +

Returns 0 if the Array0 dimension is not present. +

+
+
+ + +
+

+ rsGetDimArray1 + : Size of the Array1 dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetDimArray1(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the size of the Array1 dimension for the specified kernel context. +See rsGetDimX() for an explanation of the context. +

+ +

Returns 0 if the Array1 dimension is not present. +

+
+
+ + +
+

+ rsGetDimArray2 + : Size of the Array2 dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetDimArray2(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the size of the Array2 dimension for the specified kernel context. +See rsGetDimX() for an explanation of the context. +

+ +

Returns 0 if the Array2 dimension is not present. +

+
+
+ + +
+

+ rsGetDimArray3 + : Size of the Array3 dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetDimArray3(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the size of the Array3 dimension for the specified kernel context. +See rsGetDimX() for an explanation of the context. +

+ +

Returns 0 if the Array3 dimension is not present. +

+
+
+ + +
+

+ rsGetDimHasFaces + : Presence of more than one face for the specified kernel context +

+
+ + + + + +
bool rsGetDimHasFaces(rs_kernel_context context); + Added in API level 23 +
+
+
Returns
+ + +
Returns true if more than one face is present, false otherwise.
+
+
+

If the kernel is iterating over a cubemap, this function returns true if there's more +than one face present. In all other cases, it returns false. See rsGetDimX() for an +explanation of the context. +

+ +

rsAllocationGetDimFaces() is similar but returns 0 or 1 instead of a bool. +

+
+
+ + +
+

+ rsGetDimLod + : Number of levels of detail for the specified kernel context +

+
+ + + + + +
uint32_t rsGetDimLod(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the number of levels of detail for the specified kernel context. This is useful +for mipmaps. See rsGetDimX() for an explanation of the context. +

+ +

Returns 0 if Level of Detail is not used. +

+ +

rsAllocationGetDimLOD() is similar but returns 0 or 1 instead the actual +number of levels. +

+
+
+ + +
+

+ rsGetDimX + : Size of the X dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetDimX(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the size of the X dimension for the specified kernel context. +

+ +

The kernel context contains common characteristics of the allocations being iterated +over and rarely used indices, like the Array0 index. +

+ +

You can access it by adding a special parameter named "context" of +type rs_kernel_context to your kernel function. E.g.
+int4 RS_KERNEL myKernel(int4 value, rs_kernel_context context) {
+  uint32_t size = rsGetDimX(context); //...
+

+ +

To get the dimension of specific allocation, use rsAllocationGetDimX(). +

+
+
+ + +
+

+ rsGetDimY + : Size of the Y dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetDimY(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the size of the X dimension for the specified kernel context. +See rsGetDimX() for an explanation of the context. +

+ +

Returns 0 if the Y dimension is not present. +

+ +

To get the dimension of specific allocation, use rsAllocationGetDimY(). +

+
+
+ + +
+

+ rsGetDimZ + : Size of the Z dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetDimZ(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the size of the Z dimension for the specified kernel context. +See rsGetDimX() for an explanation of the context. +

+ +

Returns 0 if the Z dimension is not present. +

+ +

To get the dimension of specific allocation, use rsAllocationGetDimZ(). +

+
+
+ + +
+

+ rsGetFace + : Coordinate of the Face for the specified kernel context +

+
+ + + + + +
rs_allocation_cubemap_face rsGetFace(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the face on which the cell being processed is found, as specified by the +supplied kernel context. See rsGetArray0() for an explanation of the context. +

+ +

Returns RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X if the face dimension is not +present. +

+
+
+ + +
+

+ rsGetLod + : Index in the Levels of Detail dimension for the specified kernel context +

+
+ + + + + +
uint32_t rsGetLod(rs_kernel_context context); + Added in API level 23 +
+
+
+

Returns the index in the Levels of Detail dimension of the cell being processed, +as specified by the supplied kernel context. See rsGetArray0() for an explanation of +the context. +

+ +

Returns 0 if the Levels of Detail dimension is not present. +

+
+
+ diff --git a/docs/html/guide/topics/renderscript/reference/rs_graphics.jd b/docs/html/guide/topics/renderscript/reference/rs_graphics.jd index ee50184977d52..1b115fe9a7931 100644 --- a/docs/html/guide/topics/renderscript/reference/rs_graphics.jd +++ b/docs/html/guide/topics/renderscript/reference/rs_graphics.jd @@ -4,7 +4,7 @@ page.title=RenderScript Graphics Functions and Types

Overview

-

The graphics subsystem of RenderScript has been deprecated. +

The graphics subsystem of RenderScript was removed at API level 23.

Summary

@@ -502,7 +502,7 @@ page.title=RenderScript Graphics Functions and Types

An enum with the following values:      - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22

@@ -527,7 +527,7 @@ page.title=RenderScript Graphics Functions and Types

An enum with the following values:      - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22

RS_BLEND_DST_ZERO = 0
@@ -553,7 +553,7 @@ page.title=RenderScript Graphics Functions and Types

An enum with the following values:      - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22

RS_BLEND_SRC_ZERO = 0
@@ -573,7 +573,7 @@ page.title=RenderScript Graphics Functions and Types

An enum with the following values:      - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22

RS_CULL_BACK = 0
@@ -599,7 +599,11 @@ depth to that found in the depth buffer. : Handle to a Font
-

A typedef of: _RS_HANDLE      When compiling for 32 bits. +

A typedef of: _RS_HANDLE __attribute__(( +#if (defined(RS_VERSION) && (RS_VERSION >= 1)) +deprecated +#endif +))      When compiling for 32 bits. Removed from API level 23 and higher

Deprecated. Do not use.

Opaque handle to a RenderScript font object. @@ -615,7 +619,11 @@ See: android.renderscript.Font : Handle to a Mesh

-

A typedef of: _RS_HANDLE      When compiling for 32 bits. +

A typedef of: _RS_HANDLE __attribute__(( +#if (defined(RS_VERSION) && (RS_VERSION >= 1)) +deprecated +#endif +))      When compiling for 32 bits. Removed from API level 23 and higher

Deprecated. Do not use.

Opaque handle to a RenderScript mesh object. @@ -632,7 +640,7 @@ See: android.renderscript.Mesh

An enum with the following values:      - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22

RS_DEPTH_FUNC_ALWAYS = 0Always drawn
@@ -656,7 +664,11 @@ See: android.renderscript.Mesh : Handle to a ProgramFragment
-

A typedef of: _RS_HANDLE      When compiling for 32 bits. +

A typedef of: _RS_HANDLE __attribute__(( +#if (defined(RS_VERSION) && (RS_VERSION >= 1)) +deprecated +#endif +))      When compiling for 32 bits. Removed from API level 23 and higher

Deprecated. Do not use.

Opaque handle to a RenderScript ProgramFragment object. @@ -672,7 +684,11 @@ See: android.renderscript.ProgramFragment : Handle to a ProgramRaster

-

A typedef of: _RS_HANDLE      When compiling for 32 bits. +

A typedef of: _RS_HANDLE __attribute__(( +#if (defined(RS_VERSION) && (RS_VERSION >= 1)) +deprecated +#endif +))      When compiling for 32 bits. Removed from API level 23 and higher

Deprecated. Do not use.

Opaque handle to a RenderScript ProgramRaster object. @@ -688,7 +704,11 @@ See: android.renderscript.ProgramRaster : Handle to a ProgramStore

-

A typedef of: _RS_HANDLE      When compiling for 32 bits. +

A typedef of: _RS_HANDLE __attribute__(( +#if (defined(RS_VERSION) && (RS_VERSION >= 1)) +deprecated +#endif +))      When compiling for 32 bits. Removed from API level 23 and higher

Deprecated. Do not use.

Opaque handle to a RenderScript ProgramStore object. @@ -704,7 +724,11 @@ See: android.renderscript.ProgramStore : Handle to a ProgramVertex

-

A typedef of: _RS_HANDLE      When compiling for 32 bits. +

A typedef of: _RS_HANDLE __attribute__(( +#if (defined(RS_VERSION) && (RS_VERSION >= 1)) +deprecated +#endif +))      When compiling for 32 bits. Removed from API level 23 and higher

Deprecated. Do not use.

Opaque handle to a RenderScript ProgramVertex object. @@ -725,13 +749,13 @@ See: android.renderscript.ProgramVertex

- -
RS_PRIMITIVE_POINT = 0Vertex data will be rendered as a series of points
void rsgAllocationSyncAll(rs_allocation alloc); When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher
void rsgAllocationSyncAll(rs_allocation alloc, rs_allocation_usage_type source); When compiling for 32 bits. Added in API level 14 + When compiling for 32 bits. API level 14 - 22
@@ -761,7 +785,7 @@ memory spaces. void rsgBindColorTarget(rs_allocation colorTarget, uint slot); - When compiling for 32 bits. Added in API level 14 + When compiling for 32 bits. API level 14 - 22 @@ -784,13 +808,13 @@ memory spaces. void rsgBindConstant(rs_program_fragment ps, uint slot, rs_allocation c); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsgBindConstant(rs_program_vertex pv, uint slot, rs_allocation c); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -822,7 +846,7 @@ The Allocation must be a valid constant input for the Program. void rsgBindDepthTarget(rs_allocation depthTarget); - When compiling for 32 bits. Added in API level 14 + When compiling for 32 bits. API level 14 - 22 @@ -845,7 +869,7 @@ The Allocation must be a valid constant input for the Program. void rsgBindFont(rs_font font); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -873,7 +897,7 @@ The Allocation must be a valid constant input for the Program. void rsgBindProgramFragment(rs_program_fragment pf); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -896,7 +920,7 @@ The Allocation must be a valid constant input for the Program. void rsgBindProgramRaster(rs_program_raster pr); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -919,7 +943,7 @@ The Allocation must be a valid constant input for the Program. void rsgBindProgramStore(rs_program_store ps); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -942,7 +966,7 @@ The Allocation must be a valid constant input for the Program. void rsgBindProgramVertex(rs_program_vertex pv); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -965,7 +989,7 @@ The Allocation must be a valid constant input for the Program. void rsgBindSampler(rs_program_fragment fragment, uint slot, rs_sampler sampler); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -989,7 +1013,7 @@ operate on the texture bound at the matching slot. void rsgBindTexture(rs_program_fragment v, uint slot, rs_allocation alloc); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1015,7 +1039,7 @@ matching slot. void rsgClearAllRenderTargets(); - When compiling for 32 bits. Added in API level 14 + When compiling for 32 bits. API level 14 - 22 @@ -1039,7 +1063,7 @@ the framebuffer void rsgClearColor(float r, float g, float b, float a); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1062,7 +1086,7 @@ the framebuffer void rsgClearColorTarget(uint slot); - When compiling for 32 bits. Added in API level 14 + When compiling for 32 bits. API level 14 - 22 @@ -1085,7 +1109,7 @@ the framebuffer void rsgClearDepth(float value); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1108,7 +1132,7 @@ the framebuffer void rsgClearDepthTarget(); - When compiling for 32 bits. Added in API level 14 + When compiling for 32 bits. API level 14 - 22 @@ -1131,19 +1155,19 @@ the framebuffer void rsgDrawMesh(rs_mesh ism); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsgDrawMesh(rs_mesh ism, uint primitiveIndex); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsgDrawMesh(rs_mesh ism, uint primitiveIndex, uint start, uint len); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1183,7 +1207,7 @@ the framebuffer void rsgDrawQuad(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1207,7 +1231,7 @@ drawing large quantities of geometry. void rsgDrawQuadTexCoords(float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2, float x3, float y3, float z3, float u3, float v3, float x4, float y4, float z4, float u4, float v4); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1231,7 +1255,7 @@ for drawing large quantities of geometry. void rsgDrawRect(float x1, float y1, float x2, float y2, float z); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1255,7 +1279,7 @@ intended for drawing large quantities of geometry. void rsgDrawSpriteScreenspace(float x, float y, float z, float w, float h); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1281,13 +1305,13 @@ for drawing in shipping applications. void rsgDrawText(const char* text, int x, int y); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsgDrawText(rs_allocation alloc, int x, int y); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1310,7 +1334,7 @@ for drawing in shipping applications. uint rsgFinish(); - When compiling for 32 bits. Added in API level 14 + When compiling for 32 bits. API level 14 - 22 @@ -1333,7 +1357,7 @@ for drawing in shipping applications. void rsgFontColor(float r, float g, float b, float a); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1364,7 +1388,7 @@ for drawing in shipping applications. uint rsgGetHeight(); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1387,7 +1411,7 @@ for drawing in shipping applications. uint rsgGetWidth(); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1410,13 +1434,13 @@ for drawing in shipping applications. void rsgMeasureText(const char* text, int* left, int* right, int* top, int* bottom); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsgMeasureText(rs_allocation alloc, int* left, int* right, int* top, int* bottom); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1440,13 +1464,13 @@ Any of left, right, top, bottom could be NULL void rsgMeshComputeBoundingBox(rs_mesh mesh, float* minX, float* minY, float* min, float* maxX, float* maxY, float* maxZ); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsgMeshComputeBoundingBox(rs_mesh mesh, float3* bBoxMin, float3* bBoxMax); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1469,7 +1493,7 @@ Any of left, right, top, bottom could be NULL rs_allocation rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1504,7 +1528,7 @@ allocation if only the primitive is specified rs_primitive rsgMeshGetPrimitive(rs_mesh m, uint32_t index); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1539,7 +1563,7 @@ rendered uint32_t rsgMeshGetPrimitiveCount(rs_mesh m); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1573,7 +1597,7 @@ the number. rs_allocation rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1608,7 +1632,7 @@ vertex data, e.g. positions, normals, texcoords uint32_t rsgMeshGetVertexAllocationCount(rs_mesh m); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1642,7 +1666,7 @@ vertex data void rsgProgramFragmentConstantColor(rs_program_fragment pf, float r, float g, float b, float a); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -1665,7 +1689,7 @@ vertex data rs_cull_mode rsgProgramRasterGetCullMode(rs_program_raster pr); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1693,7 +1717,7 @@ vertex data bool rsgProgramRasterIsPointSpriteEnabled(rs_program_raster pr); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1721,7 +1745,7 @@ vertex data rs_blend_dst_func rsgProgramStoreGetBlendDstFunc(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1749,7 +1773,7 @@ vertex data rs_blend_src_func rsgProgramStoreGetBlendSrcFunc(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1777,7 +1801,7 @@ vertex data rs_depth_func rsgProgramStoreGetDepthFunc(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1805,7 +1829,7 @@ vertex data bool rsgProgramStoreIsColorMaskAlphaEnabled(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1833,7 +1857,7 @@ vertex data bool rsgProgramStoreIsColorMaskBlueEnabled(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1861,7 +1885,7 @@ vertex data bool rsgProgramStoreIsColorMaskGreenEnabled(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1889,7 +1913,7 @@ vertex data bool rsgProgramStoreIsColorMaskRedEnabled(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1917,7 +1941,7 @@ vertex data bool rsgProgramStoreIsDepthMaskEnabled(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1945,7 +1969,7 @@ vertex data bool rsgProgramStoreIsDitherEnabled(rs_program_store ps); - When compiling for 32 bits. Added in API level 16 + When compiling for 32 bits. API level 16 - 22 @@ -1973,7 +1997,7 @@ vertex data void rsgProgramVertexGetProjectionMatrix(rs_matrix4x4* proj); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -2003,7 +2027,7 @@ would result in an error. void rsgProgramVertexLoadModelMatrix(const rs_matrix4x4* model); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -2033,7 +2057,7 @@ would result in an error. void rsgProgramVertexLoadProjectionMatrix(const rs_matrix4x4* proj); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -2063,7 +2087,7 @@ would result in an error. void rsgProgramVertexLoadTextureMatrix(const rs_matrix4x4* tex); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher diff --git a/docs/html/guide/topics/renderscript/reference/rs_math.jd b/docs/html/guide/topics/renderscript/reference/rs_math.jd index 13513e9a0ca5f..e1e78051df6e7 100644 --- a/docs/html/guide/topics/renderscript/reference/rs_math.jd +++ b/docs/html/guide/topics/renderscript/reference/rs_math.jd @@ -3964,16 +3964,31 @@ In rs_fp_relaxed mode, mad() may not do the rounding after multiplicaiton. float max(float a, float b); + + + + + float2 max(float2 a, float b); float2 max(float2 a, float2 b); + + + + + float3 max(float3 a, float b); float3 max(float3 a, float3 b); + + + + + float4 max(float4 a, float b); @@ -4168,16 +4183,31 @@ In rs_fp_relaxed mode, mad() may not do the rounding after multiplicaiton. float min(float a, float b); + + + + + float2 min(float2 a, float b); float2 min(float2 a, float2 b); + + + + + float3 min(float3 a, float b); float3 min(float3 a, float3 b); + + + + + float4 min(float4 a, float b); diff --git a/docs/html/guide/topics/renderscript/reference/rs_matrix.jd b/docs/html/guide/topics/renderscript/reference/rs_matrix.jd index 5d0df18fe10fb..a92c225490836 100644 --- a/docs/html/guide/topics/renderscript/reference/rs_matrix.jd +++ b/docs/html/guide/topics/renderscript/reference/rs_matrix.jd @@ -752,7 +752,7 @@ a vector. float2 rsMatrixMultiply(rs_matrix2x2* m, float2 in); - Removed from API level 14 + Removed from API level 14 and higher @@ -770,13 +770,13 @@ a vector. float3 rsMatrixMultiply(rs_matrix3x3* m, float2 in); - Removed from API level 14 + Removed from API level 14 and higher float3 rsMatrixMultiply(rs_matrix3x3* m, float3 in); - Removed from API level 14 + Removed from API level 14 and higher @@ -800,19 +800,19 @@ a vector. float4 rsMatrixMultiply(rs_matrix4x4* m, float2 in); - Removed from API level 14 + Removed from API level 14 and higher float4 rsMatrixMultiply(rs_matrix4x4* m, float3 in); - Removed from API level 14 + Removed from API level 14 and higher float4 rsMatrixMultiply(rs_matrix4x4* m, float4 in); - Removed from API level 14 + Removed from API level 14 and higher diff --git a/docs/html/guide/topics/renderscript/reference/rs_object_info.jd b/docs/html/guide/topics/renderscript/reference/rs_object_info.jd index 192df54af786d..111d8fd6e581a 100644 --- a/docs/html/guide/topics/renderscript/reference/rs_object_info.jd +++ b/docs/html/guide/topics/renderscript/reference/rs_object_info.jd @@ -289,6 +289,9 @@ See

If the Allocation is a cubemap, this function returns 1 if there's more than one face present. In all other cases, it returns 0. +

+ +

Use rsGetDimHasFaces() to get the dimension of a currently running kernel.

@@ -316,6 +319,9 @@ present. In all other cases, it returns 0.

Query an Allocation for the presence of more than one Level Of Detail. This is useful for mipmaps. +

+ +

Use rsGetDimLod() to get the dimension of a currently running kernel.

@@ -342,6 +348,9 @@ for mipmaps.

Returns the size of the X dimension of the Allocation. +

+ +

Use rsGetDimX() to get the dimension of a currently running kernel.

@@ -369,6 +378,9 @@ for mipmaps.

Returns the size of the Y dimension of the Allocation. If the Allocation has less than two dimensions, returns 0. +

+ +

Use rsGetDimY() to get the dimension of a currently running kernel.

@@ -396,6 +408,9 @@ than two dimensions, returns 0.

Returns the size of the Z dimension of the Allocation. If the Allocation has less than three dimensions, returns 0. +

+ +

Use rsGetDimZ() to get the dimension of a currently running kernel.

@@ -453,37 +468,37 @@ of an Allocation. See the rsElement* functions below. void rsClearObject(rs_font* dst); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsClearObject(rs_mesh* dst); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsClearObject(rs_program_fragment* dst); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsClearObject(rs_program_raster* dst); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsClearObject(rs_program_store* dst); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher void rsClearObject(rs_program_vertex* dst); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher @@ -885,37 +900,37 @@ allocation. The results are undefined if the pointer is not from a valid Alloca bool rsIsObject(rs_font v); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher bool rsIsObject(rs_mesh v); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher bool rsIsObject(rs_program_fragment v); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher bool rsIsObject(rs_program_raster v); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher bool rsIsObject(rs_program_store v); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher bool rsIsObject(rs_program_vertex v); - When compiling for 32 bits. + When compiling for 32 bits. Removed from API level 23 and higher diff --git a/docs/html/guide/topics/renderscript/reference/rs_value_types.jd b/docs/html/guide/topics/renderscript/reference/rs_value_types.jd index a7caf1064431b..d53caf92d74a4 100644 --- a/docs/html/guide/topics/renderscript/reference/rs_value_types.jd +++ b/docs/html/guide/topics/renderscript/reference/rs_value_types.jd @@ -12,7 +12,7 @@ page.title=RenderScript Numerical Types 8 bits 16 bits 32 bits 64 bits Integer: char, int8_t short, int16_t int32_t long, long long, int64_t Unsigned integer: uchar, uint8_t ushort, uint16_t uint, uint32_t ulong, uint64_t -Floating point: float double +Floating point: half float double

@@ -25,7 +25,7 @@ E.g. float4, + + half + + + 16 bit floating point value + + + + + half2 + + + Two 16 bit floats + + + + + half3 + + + Three 16 bit floats + + + + + half4 + + + Four 16 bit floats + + int16_t @@ -605,6 +637,65 @@ with a 128 bit alignment. + +
+

+ half + : 16 bit floating point value +

+
+

A typedef of: __fp16      Added in API level 23 +

+

A 16 bit floating point value. +

+
+
+ + +
+

+ half2 + : Two 16 bit floats +

+
+

A typedef of: half __attribute__((ext_vector_type(2)))      Added in API level 23 +

+

Vector version of the half float type. Provides two half fields packed +into a single 32 bit field with 32 bit alignment. +

+
+
+ + +
+

+ half3 + : Three 16 bit floats +

+
+

A typedef of: half __attribute__((ext_vector_type(3)))      Added in API level 23 +

+

Vector version of the half float type. Provides three half fields packed +into a single 64 bit field with 64 bit alignment. +

+
+
+ + +
+

+ half4 + : Four 16 bit floats +

+
+

A typedef of: half __attribute__((ext_vector_type(4)))      Added in API level 23 +

+

Vector version of the half float type. Provides four half fields packed +into a single 64 bit field with 64 bit alignment. +

+
+
+

@@ -680,7 +771,7 @@ with a 128 bit alignment. : 64 bit signed integer

-

A typedef of: long long      Removed from API level 21 +

A typedef of: long long      Removed from API level 21 and higher

A typedef of: long      Added in API level 21

@@ -1037,7 +1128,7 @@ with a 128 bit alignment. : 64 bit unsigned integer
-

A typedef of: unsigned long long      Removed from API level 21 +

A typedef of: unsigned long long      Removed from API level 21 and higher

A typedef of: unsigned long      Added in API level 21