rs_object_types.spec revision be2163801c33d6849ae580d42b919b8803d55095
1# 2# Copyright (C) 2015 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17header: 18summary: Standard RenderScript types 19description: 20 TODO desc. 21include: 22 #define NULL ((void *)0) 23 24 // Opaque handle to a RenderScript object. Do not use this directly. 25 #ifndef __LP64__ 26 #define _RS_HANDLE \ 27 struct {\ 28 const int* const p;\ 29 } __attribute__((packed, aligned(4))) 30 #else 31 #define _RS_HANDLE \ 32 struct {\ 33 const long* const p;\ 34 const long* const r;\ 35 const long* const v1;\ 36 const long* const v2;\ 37 } 38 #endif 39end: 40 41type: rs_element 42simple: _RS_HANDLE 43summary: Handle to an element 44description: 45 Opaque handle to a RenderScript element. 46 See: android.renderscript.Element 47end: 48 49type: rs_type 50simple: _RS_HANDLE 51summary: Handle to a Type 52description: 53 Opaque handle to a RenderScript type. 54 See: android.renderscript.Type 55end: 56 57type: rs_allocation 58simple: _RS_HANDLE 59summary: Handle to an allocation 60description: 61 Opaque handle to a RenderScript allocation. 62 See: android.renderscript.Allocation 63end: 64 65type: rs_sampler 66simple: _RS_HANDLE 67summary: Handle to a Sampler 68description: 69 Opaque handle to a RenderScript sampler object. 70 See: android.renderscript.Sampler 71end: 72 73type: rs_script 74simple: _RS_HANDLE 75summary: Handle to a Script 76description: 77 Opaque handle to a RenderScript script object. 78 See: android.renderscript.ScriptC 79end: 80 81type: rs_matrix4x4 82struct: 83field: float m[16] 84summary: 4x4 matrix of 32 bit floats 85description: 86 Native holder for RS matrix. Elements are stored in the array at the 87 location [row*4 + col] 88end: 89 90type: rs_matrix3x3 91struct: 92field: float m[9] 93summary: 3x3 matrix of 32 bit floats 94description: 95 Native holder for RS matrix. Elements are stored in the array at the 96 location [row*3 + col] 97end: 98 99type: rs_matrix2x2 100struct: 101field: float m[4] 102summary: 2x2 matrix of 32 bit floats 103description: 104 Native holder for RS matrix. Elements are stored in the array at the 105 location [row*2 + col] 106end: 107 108type: rs_quaternion 109simple: float4 110summary: Quarternion 111description: 112 Quaternion type for use with the quaternion functions 113end: 114 115type: rs_allocation_cubemap_face 116version: 14 117enum: 118value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0 119value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1 120value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2 121value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3 122value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4 123value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5 124summary: Enum for selecting cube map faces 125description: 126end: 127 128type: rs_allocation_usage_type 129version: 14 130enum: 131value: RS_ALLOCATION_USAGE_SCRIPT = 0x0001 132value: RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002, "Deprecated." 133value: RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004, "Deprecated." 134value: RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008, "Deprecated." 135value: RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010, "Deprecated." 136summary: Bitfield to specify the usage types for an allocation 137description: 138 These values are ORed together to specify which usages or memory spaces are 139 relevant to an allocation or an operation on an allocation. 140end: 141 142type: rs_data_type 143version: 16 144enum: 145value: RS_TYPE_NONE = 0 146value: RS_TYPE_FLOAT_32 = 2 147value: RS_TYPE_FLOAT_64 = 3 148value: RS_TYPE_SIGNED_8 = 4 149value: RS_TYPE_SIGNED_16 = 5 150value: RS_TYPE_SIGNED_32 = 6 151value: RS_TYPE_SIGNED_64 = 7 152value: RS_TYPE_UNSIGNED_8 = 8 153value: RS_TYPE_UNSIGNED_16 = 9 154value: RS_TYPE_UNSIGNED_32 = 10 155value: RS_TYPE_UNSIGNED_64 = 11 156value: RS_TYPE_BOOLEAN = 12 157value: RS_TYPE_UNSIGNED_5_6_5 = 13 158value: RS_TYPE_UNSIGNED_5_5_5_1 = 14 159value: RS_TYPE_UNSIGNED_4_4_4_4 = 15 160value: RS_TYPE_MATRIX_4X4 = 16 161value: RS_TYPE_MATRIX_3X3 = 17 162value: RS_TYPE_MATRIX_2X2 = 18 163value: RS_TYPE_ELEMENT = 1000 164value: RS_TYPE_TYPE = 1001 165value: RS_TYPE_ALLOCATION = 1002 166value: RS_TYPE_SAMPLER = 1003 167value: RS_TYPE_SCRIPT = 1004 168value: RS_TYPE_MESH = 1005 169value: RS_TYPE_PROGRAM_FRAGMENT = 1006 170value: RS_TYPE_PROGRAM_VERTEX = 1007 171value: RS_TYPE_PROGRAM_RASTER = 1008 172value: RS_TYPE_PROGRAM_STORE = 1009 173value: RS_TYPE_FONT = 1010 174value: RS_TYPE_INVALID = 10000 175summary: Element data types 176description: 177 DataType represents the basic type information for a basic element. The 178 naming convention follows. For numeric types it is FLOAT, 179 SIGNED, or UNSIGNED followed by the _BITS where BITS is the 180 size of the data. BOOLEAN is a true / false (1,0) 181 represented in an 8 bit container. The UNSIGNED variants 182 with multiple bit definitions are for packed graphical data 183 formats and represent vectors with per vector member sizes 184 which are treated as a single unit for packing and alignment 185 purposes. 186 187 MATRIX the three matrix types contain FLOAT_32 elements and are treated 188 as 32 bits for alignment purposes. 189 190 RS_* objects. 32 bit opaque handles. 191end: 192 193type: rs_data_kind 194version: 16 195enum: 196value: RS_KIND_USER = 0 197value: RS_KIND_PIXEL_L = 7 198value: RS_KIND_PIXEL_A = 8 199value: RS_KIND_PIXEL_LA = 9 200value: RS_KIND_PIXEL_RGB = 10 201value: RS_KIND_PIXEL_RGBA = 11 202value: RS_KIND_PIXEL_DEPTH = 12 203value: RS_KIND_PIXEL_YUV = 13 204value: RS_KIND_INVALID = 100 205summary: Element data kind 206description: 207 The special interpretation of the data if required. This is primarly 208 useful for graphical data. USER indicates no special interpretation is 209 expected. PIXEL is used in conjunction with the standard data types for 210 representing texture formats. 211end: 212 213type: rs_sampler_value 214version: 16 215enum: 216value: RS_SAMPLER_NEAREST = 0 217value: RS_SAMPLER_LINEAR = 1 218value: RS_SAMPLER_LINEAR_MIP_LINEAR = 2 219value: RS_SAMPLER_WRAP = 3 220value: RS_SAMPLER_CLAMP = 4 221value: RS_SAMPLER_LINEAR_MIP_NEAREST = 5 222value: RS_SAMPLER_MIRRORED_REPEAT = 6 223value: RS_SAMPLER_INVALID = 100 224summary: Sampler wrap T value 225description: 226end: 227