Jason Sams | 41371c7 | 2015-03-26 20:46:57 +0000 | [diff] [blame] | 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 | |
| 17 | header: |
| 18 | summary: Standard RenderScript types |
| 19 | description: |
| 20 | Integers:<ul> |
| 21 | <li>8 bit: char, int8_t</li> |
| 22 | <li>16 bit: short, int16_t</li> |
| 23 | <li>32 bit: int, in32_t</li> |
| 24 | <li>64 bit: long, long long, int64_t</li></ul> |
| 25 | |
| 26 | Unsigned integers:<ul> |
| 27 | <li>8 bit: uchar, uint8_t</li> |
| 28 | <li>16 bit: ushort, uint16_t</li> |
| 29 | <li>32 bit: uint, uint32_t</li> |
| 30 | <li>64 bit: ulong, uint64_t</li></ul> |
| 31 | |
| 32 | Floating point:<ul> |
| 33 | <li>32 bit: float</li> |
| 34 | <li>64 bit: double</li></ul> |
| 35 | |
| 36 | Vectors of length 2, 3, and 4 are supported for all the types above. |
| 37 | include: |
| 38 | #include "stdbool.h" |
| 39 | |
| 40 | #define RS_PACKED __attribute__((packed, aligned(4))) |
| 41 | #define NULL ((void *)0) |
| 42 | |
| 43 | // Opaque handle to a RenderScript object. Do not use this directly. |
| 44 | #ifndef __LP64__ |
| 45 | #define _RS_HANDLE \ |
| 46 | struct {\ |
| 47 | const int* const p;\ |
| 48 | } __attribute__((packed, aligned(4))) |
| 49 | #else |
| 50 | #define _RS_HANDLE \ |
| 51 | struct {\ |
| 52 | const long* const p;\ |
| 53 | const long* const r;\ |
| 54 | const long* const v1;\ |
| 55 | const long* const v2;\ |
| 56 | } |
| 57 | #endif |
| 58 | end: |
| 59 | |
| 60 | constant: M_1_PI |
| 61 | value: 0.318309886183790671537767526745028724f |
| 62 | summary: 1 / pi, as a 32 bit float |
| 63 | description: |
| 64 | The inverse of pi, as a 32 bit float. |
| 65 | end: |
| 66 | |
| 67 | constant: M_2_PI |
| 68 | value: 0.636619772367581343075535053490057448f |
| 69 | summary: 2 / pi, as a 32 bit float |
| 70 | description: |
| 71 | 2 divided by pi, as a 32 bit float. |
| 72 | end: |
| 73 | |
| 74 | constant: M_2_PIl |
| 75 | value: 0.636619772367581343075535053490057448f |
| 76 | hidden: |
| 77 | summary: Deprecated. Use M_2_PI instead. |
| 78 | description: |
| 79 | end: |
| 80 | |
| 81 | constant: M_2_SQRTPI |
| 82 | value: 1.128379167095512573896158903121545172f |
| 83 | summary: 2 / sqrt(pi), as a 32 bit float |
| 84 | description: |
| 85 | 2 divided by the square root of pi, as a 32 bit float. |
| 86 | end: |
| 87 | |
| 88 | constant: M_E |
| 89 | value: 2.718281828459045235360287471352662498f |
| 90 | summary: e, as a 32 bit float |
| 91 | description: |
| 92 | The number e, the base of the natural logarithm, as a 32 bit float. |
| 93 | end: |
| 94 | |
| 95 | constant: M_LN10 |
| 96 | value: 2.302585092994045684017991454684364208f |
| 97 | summary: log_e(10), as a 32 bit float |
| 98 | description: |
| 99 | The natural logarithm of 10, as a 32 bit float. |
| 100 | end: |
| 101 | |
| 102 | constant: M_LN2 |
| 103 | value: 0.693147180559945309417232121458176568f |
| 104 | summary: log_e(2), as a 32 bit float |
| 105 | description: |
| 106 | The natural logarithm of 2, as a 32 bit float. |
| 107 | end: |
| 108 | |
| 109 | constant: M_LOG10E |
| 110 | value: 0.434294481903251827651128918916605082f |
| 111 | summary: log_10(e), as a 32 bit float |
| 112 | description: |
| 113 | The logarithm base 10 of e, as a 32 bit float. |
| 114 | end: |
| 115 | |
| 116 | constant: M_LOG2E |
| 117 | value: 1.442695040888963407359924681001892137f |
| 118 | summary: log_2(e), as a 32 bit float |
| 119 | description: |
| 120 | The logarithm base 2 of e, as a 32 bit float. |
| 121 | end: |
| 122 | |
| 123 | constant: M_PI |
| 124 | value: 3.141592653589793238462643383279502884f |
| 125 | summary: pi, as a 32 bit float |
| 126 | description: |
| 127 | The constant pi, as a 32 bit float. |
| 128 | end: |
| 129 | |
| 130 | constant: M_PI_2 |
| 131 | value: 1.570796326794896619231321691639751442f |
| 132 | summary: pi / 2, as a 32 bit float |
| 133 | description: |
| 134 | Pi divided by 2, as a 32 bit float. |
| 135 | end: |
| 136 | |
| 137 | constant: M_PI_4 |
| 138 | value: 0.785398163397448309615660845819875721f |
| 139 | summary: pi / 4, as a 32 bit float |
| 140 | description: |
| 141 | Pi divided by 4, as a 32 bit float. |
| 142 | end: |
| 143 | |
| 144 | constant: M_SQRT1_2 |
| 145 | value: 0.707106781186547524400844362104849039f |
| 146 | summary: 1 / sqrt(2), as a 32 bit float |
| 147 | description: |
| 148 | The inverse of the square root of 2, as a 32 bit float. |
| 149 | end: |
| 150 | |
| 151 | constant: M_SQRT2 |
| 152 | value: 1.414213562373095048801688724209698079f |
| 153 | summary: sqrt(2), as a 32 bit float |
| 154 | description: |
| 155 | The square root of 2, as a 32 bit float. |
| 156 | end: |
| 157 | |
| 158 | type: int8_t |
| 159 | simple: char |
| 160 | summary: 8 bit signed integer |
| 161 | description: |
| 162 | 8 bit integer type |
| 163 | end: |
| 164 | |
| 165 | type: int16_t |
| 166 | simple: short |
| 167 | summary: 16 bit signed integer |
| 168 | description: |
| 169 | 16 bit integer type |
| 170 | end: |
| 171 | |
| 172 | type: int32_t |
| 173 | simple: int |
| 174 | summary: 32 bit signed integer |
| 175 | description: |
| 176 | 32 bit integer type |
| 177 | end: |
| 178 | |
| 179 | type: int64_t |
| 180 | version: 9 20 |
| 181 | simple: long long |
| 182 | summary: 64 bit signed integer |
| 183 | description: |
| 184 | 64 bit integer type |
| 185 | end: |
| 186 | |
| 187 | type: int64_t |
| 188 | version: 21 |
| 189 | simple: long |
| 190 | end: |
| 191 | |
| 192 | type: uint8_t |
| 193 | simple: unsigned char |
| 194 | summary: 8 bit unsigned integer |
| 195 | description: |
| 196 | 8 bit unsigned integer type |
| 197 | end: |
| 198 | |
| 199 | type: uint16_t |
| 200 | simple: unsigned short |
| 201 | summary: 16 bit unsigned integer |
| 202 | description: |
| 203 | 16 bit unsigned integer type |
| 204 | end: |
| 205 | |
| 206 | type: uint32_t |
| 207 | simple: unsigned int |
| 208 | summary: 32 bit unsigned integer |
| 209 | description: |
| 210 | 32 bit unsigned integer type |
| 211 | end: |
| 212 | |
| 213 | type: uint64_t |
| 214 | version: 9 20 |
| 215 | simple: unsigned long long |
| 216 | summary: 64 bit unsigned integer |
| 217 | description: |
| 218 | 64 bit unsigned integer type |
| 219 | end: |
| 220 | |
| 221 | type: uint64_t |
| 222 | version: 21 |
| 223 | simple: unsigned long |
| 224 | end: |
| 225 | |
| 226 | type: uchar |
| 227 | simple: uint8_t |
| 228 | summary: 8 bit unsigned integer |
| 229 | description: |
| 230 | 8 bit unsigned integer type |
| 231 | end: |
| 232 | |
| 233 | type: ushort |
| 234 | simple: uint16_t |
| 235 | summary: 16 bit unsigned integer |
| 236 | description: |
| 237 | 16 bit unsigned integer type |
| 238 | end: |
| 239 | |
| 240 | type: uint |
| 241 | simple: uint32_t |
| 242 | summary: 32 bit unsigned integer |
| 243 | description: |
| 244 | 32 bit unsigned integer type |
| 245 | end: |
| 246 | |
| 247 | type: ulong |
| 248 | simple: uint64_t |
| 249 | summary: 64 bit unsigned integer |
| 250 | description: |
| 251 | Typedef for unsigned long (use for 64-bit unsigned integers) |
| 252 | end: |
| 253 | |
| 254 | type: size_t |
| 255 | size: 64 |
| 256 | simple: uint64_t |
| 257 | summary: Unsigned size type |
| 258 | description: |
| 259 | Typedef for size_t |
| 260 | end: |
| 261 | |
| 262 | type: size_t |
| 263 | size: 32 |
| 264 | simple: uint32_t |
| 265 | end: |
| 266 | |
| 267 | type: ssize_t |
| 268 | size: 64 |
| 269 | simple: int64_t |
| 270 | summary: Signed size type |
| 271 | description: |
| 272 | Typedef for ssize_t |
| 273 | end: |
| 274 | |
| 275 | type: ssize_t |
| 276 | size: 32 |
| 277 | simple: int32_t |
| 278 | end: |
| 279 | |
| 280 | type: rs_element |
| 281 | simple: _RS_HANDLE |
| 282 | summary: Handle to an element |
| 283 | description: |
| 284 | Opaque handle to a RenderScript element. |
| 285 | See: android.renderscript.Element |
| 286 | end: |
| 287 | |
| 288 | type: rs_type |
| 289 | simple: _RS_HANDLE |
| 290 | summary: Handle to a Type |
| 291 | description: |
| 292 | Opaque handle to a RenderScript type. |
| 293 | See: android.renderscript.Type |
| 294 | end: |
| 295 | |
| 296 | type: rs_allocation |
| 297 | simple: _RS_HANDLE |
| 298 | summary: Handle to an allocation |
| 299 | description: |
| 300 | Opaque handle to a RenderScript allocation. |
| 301 | See: android.renderscript.Allocation |
| 302 | end: |
| 303 | |
| 304 | type: rs_sampler |
| 305 | simple: _RS_HANDLE |
| 306 | summary: Handle to a Sampler |
| 307 | description: |
| 308 | Opaque handle to a RenderScript sampler object. |
| 309 | See: android.renderscript.Sampler |
| 310 | end: |
| 311 | |
| 312 | type: rs_script |
| 313 | simple: _RS_HANDLE |
| 314 | summary: Handle to a Script |
| 315 | description: |
| 316 | Opaque handle to a RenderScript script object. |
| 317 | See: android.renderscript.ScriptC |
| 318 | end: |
| 319 | |
| 320 | |
| 321 | type: rs_mesh |
| 322 | size: 32 |
| 323 | simple: _RS_HANDLE |
| 324 | summary: Handle to a Mesh |
| 325 | description: |
| 326 | Opaque handle to a RenderScript mesh object. |
| 327 | See: android.renderscript.Mesh |
| 328 | end: |
| 329 | |
| 330 | type: rs_program_fragment |
| 331 | size: 32 |
| 332 | simple: _RS_HANDLE |
| 333 | summary: Handle to a ProgramFragment |
| 334 | description: |
| 335 | Opaque handle to a RenderScript ProgramFragment object. |
| 336 | See: android.renderscript.ProgramFragment |
| 337 | end: |
| 338 | |
| 339 | type: rs_program_vertex |
| 340 | size: 32 |
| 341 | simple: _RS_HANDLE |
| 342 | summary: Handle to a ProgramVertex |
| 343 | description: |
| 344 | Opaque handle to a RenderScript ProgramVertex object. |
| 345 | See: android.renderscript.ProgramVertex |
| 346 | end: |
| 347 | |
| 348 | type: rs_program_raster |
| 349 | size: 32 |
| 350 | simple: _RS_HANDLE |
| 351 | summary: Handle to a ProgramRaster |
| 352 | description: |
| 353 | Opaque handle to a RenderScript ProgramRaster object. |
| 354 | See: android.renderscript.ProgramRaster |
| 355 | end: |
| 356 | |
| 357 | type: rs_program_store |
| 358 | size: 32 |
| 359 | simple: _RS_HANDLE |
| 360 | summary: Handle to a ProgramStore |
| 361 | description: |
| 362 | Opaque handle to a RenderScript ProgramStore object. |
| 363 | See: android.renderscript.ProgramStore |
| 364 | end: |
| 365 | |
| 366 | type: rs_font |
| 367 | size: 32 |
| 368 | simple: _RS_HANDLE |
| 369 | summary: Handle to a Font |
| 370 | description: |
| 371 | Opaque handle to a RenderScript font object. |
| 372 | See: android.renderscript.Font |
| 373 | end: |
| 374 | |
| 375 | type: float2 |
| 376 | simple: float __attribute__((ext_vector_type(2))) |
| 377 | summary: Two 32 bit floats |
| 378 | description: |
| 379 | Vector version of the basic float type. |
| 380 | Provides two float fields packed into a single 64 bit field with 64 bit alignment. |
| 381 | end: |
| 382 | |
| 383 | type: float3 |
| 384 | simple: float __attribute__((ext_vector_type(3))) |
| 385 | summary: Three 32 bit floats |
| 386 | description: |
| 387 | Vector version of the basic float type. |
| 388 | Provides three float fields packed into a single 128 bit field with 128 bit alignment. |
| 389 | end: |
| 390 | |
| 391 | type: float4 |
| 392 | simple: float __attribute__((ext_vector_type(4))) |
| 393 | summary: Four 32 bit floats |
| 394 | description: |
| 395 | Vector version of the basic float type. |
| 396 | Provides four float fields packed into a single 128 bit field with 128 bit alignment. |
| 397 | end: |
| 398 | |
| 399 | |
| 400 | type: double2 |
| 401 | simple: double __attribute__((ext_vector_type(2))) |
| 402 | summary: Two 64 bit floats |
| 403 | description: |
| 404 | Vector version of the basic double type. Provides two double fields packed |
| 405 | into a single 128 bit field with 128 bit alignment. |
| 406 | end: |
| 407 | |
| 408 | type: double3 |
| 409 | simple: double __attribute__((ext_vector_type(3))) |
| 410 | summary: Three 64 bit floats |
| 411 | description: |
| 412 | Vector version of the basic double type. Provides three double fields packed |
| 413 | into a single 256 bit field with 256 bit alignment. |
| 414 | end: |
| 415 | |
| 416 | type: double4 |
| 417 | simple: double __attribute__((ext_vector_type(4))) |
| 418 | summary: Four 64 bit floats |
| 419 | description: |
| 420 | Vector version of the basic double type. Provides four double fields packed |
| 421 | into a single 256 bit field with 256 bit alignment. |
| 422 | end: |
| 423 | |
| 424 | |
| 425 | type: uchar2 |
| 426 | simple: uchar __attribute__((ext_vector_type(2))) |
| 427 | summary: Two 8 bit unsigned integers |
| 428 | description: |
| 429 | Vector version of the basic uchar type. Provides two uchar fields packed |
| 430 | into a single 16 bit field with 16 bit alignment. |
| 431 | end: |
| 432 | |
| 433 | type: uchar3 |
| 434 | simple: uchar __attribute__((ext_vector_type(3))) |
| 435 | summary: Three 8 bit unsigned integers |
| 436 | description: |
| 437 | Vector version of the basic uchar type. Provides three uchar fields packed |
| 438 | into a single 32 bit field with 32 bit alignment. |
| 439 | end: |
| 440 | |
| 441 | type: uchar4 |
| 442 | simple: uchar __attribute__((ext_vector_type(4))) |
| 443 | summary: Four 8 bit unsigned integers |
| 444 | description: |
| 445 | Vector version of the basic uchar type. Provides four uchar fields packed |
| 446 | into a single 32 bit field with 32 bit alignment. |
| 447 | end: |
| 448 | |
| 449 | |
| 450 | type: ushort2 |
| 451 | simple: ushort __attribute__((ext_vector_type(2))) |
| 452 | summary: Two 16 bit unsigned integers |
| 453 | description: |
| 454 | Vector version of the basic ushort type. Provides two ushort fields packed |
| 455 | into a single 32 bit field with 32 bit alignment. |
| 456 | end: |
| 457 | |
| 458 | type: ushort3 |
| 459 | simple: ushort __attribute__((ext_vector_type(3))) |
| 460 | summary: Three 16 bit unsigned integers |
| 461 | description: |
| 462 | Vector version of the basic ushort type. Provides three ushort fields packed |
| 463 | into a single 64 bit field with 64 bit alignment. |
| 464 | end: |
| 465 | |
| 466 | type: ushort4 |
| 467 | simple: ushort __attribute__((ext_vector_type(4))) |
| 468 | summary: Four 16 bit unsigned integers |
| 469 | description: |
| 470 | Vector version of the basic ushort type. Provides four ushort fields packed |
| 471 | into a single 64 bit field with 64 bit alignment. |
| 472 | end: |
| 473 | |
| 474 | |
| 475 | type: uint2 |
| 476 | simple: uint __attribute__((ext_vector_type(2))) |
| 477 | summary: Two 32 bit unsigned integers |
| 478 | description: |
| 479 | Vector version of the basic uint type. Provides two uint fields packed into a |
| 480 | single 64 bit field with 64 bit alignment. |
| 481 | end: |
| 482 | |
| 483 | type: uint3 |
| 484 | simple: uint __attribute__((ext_vector_type(3))) |
| 485 | summary: Three 32 bit unsigned integers |
| 486 | description: |
| 487 | Vector version of the basic uint type. Provides three uint fields packed into |
| 488 | a single 128 bit field with 128 bit alignment. |
| 489 | end: |
| 490 | |
| 491 | type: uint4 |
| 492 | simple: uint __attribute__((ext_vector_type(4))) |
| 493 | summary: Four 32 bit unsigned integers |
| 494 | description: |
| 495 | Vector version of the basic uint type. Provides four uint fields packed into |
| 496 | a single 128 bit field with 128 bit alignment. |
| 497 | end: |
| 498 | |
| 499 | |
| 500 | type: ulong2 |
| 501 | simple: ulong __attribute__((ext_vector_type(2))) |
| 502 | summary: Two 64 bit unsigned integers |
| 503 | description: |
| 504 | Vector version of the basic ulong type. Provides two ulong fields packed into |
| 505 | a single 128 bit field with 128 bit alignment. |
| 506 | end: |
| 507 | |
| 508 | type: ulong3 |
| 509 | simple: ulong __attribute__((ext_vector_type(3))) |
| 510 | summary: Three 64 bit unsigned integers |
| 511 | description: |
| 512 | Vector version of the basic ulong type. Provides three ulong fields packed |
| 513 | into a single 256 bit field with 256 bit alignment. |
| 514 | end: |
| 515 | |
| 516 | type: ulong4 |
| 517 | simple: ulong __attribute__((ext_vector_type(4))) |
| 518 | summary: Four 64 bit unsigned integers |
| 519 | description: |
| 520 | Vector version of the basic ulong type. Provides four ulong fields packed |
| 521 | into a single 256 bit field with 256 bit alignment. |
| 522 | end: |
| 523 | |
| 524 | |
| 525 | type: char2 |
| 526 | simple: char __attribute__((ext_vector_type(2))) |
| 527 | summary: Two 8 bit signed integers |
| 528 | description: |
| 529 | Vector version of the basic char type. Provides two char fields packed into a |
| 530 | single 16 bit field with 16 bit alignment. |
| 531 | end: |
| 532 | |
| 533 | type: char3 |
| 534 | simple: char __attribute__((ext_vector_type(3))) |
| 535 | summary: Three 8 bit signed integers |
| 536 | description: |
| 537 | Vector version of the basic char type. Provides three char fields packed into |
| 538 | a single 32 bit field with 32 bit alignment. |
| 539 | end: |
| 540 | |
| 541 | type: char4 |
| 542 | simple: char __attribute__((ext_vector_type(4))) |
| 543 | summary: Four 8 bit signed integers |
| 544 | description: |
| 545 | Vector version of the basic char type. Provides four char fields packed into |
| 546 | a single 32 bit field with 32 bit alignment. |
| 547 | end: |
| 548 | |
| 549 | type: short2 |
| 550 | simple: short __attribute__((ext_vector_type(2))) |
| 551 | summary: Two 16 bit signed integers |
| 552 | description: |
| 553 | Vector version of the basic short type. Provides two short fields packed into |
| 554 | a single 32 bit field with 32 bit alignment. |
| 555 | end: |
| 556 | |
| 557 | type: short3 |
| 558 | simple: short __attribute__((ext_vector_type(3))) |
| 559 | summary: Three 16 bit signed integers |
| 560 | description: |
| 561 | Vector version of the basic short type. Provides three short fields packed |
| 562 | into a single 64 bit field with 64 bit alignment. |
| 563 | end: |
| 564 | |
| 565 | type: short4 |
| 566 | simple: short __attribute__((ext_vector_type(4))) |
| 567 | summary: Four 16 bit signed integers |
| 568 | description: |
| 569 | Vector version of the basic short type. Provides four short fields packed |
| 570 | into a single 64 bit field with 64 bit alignment. |
| 571 | end: |
| 572 | |
| 573 | |
| 574 | type: int2 |
| 575 | simple: int __attribute__((ext_vector_type(2))) |
| 576 | summary: Two 32 bit signed integers |
| 577 | description: |
| 578 | Vector version of the basic int type. Provides two int fields packed into a |
| 579 | single 64 bit field with 64 bit alignment. |
| 580 | end: |
| 581 | |
| 582 | type: int3 |
| 583 | simple: int __attribute__((ext_vector_type(3))) |
| 584 | summary: Three 32 bit signed integers |
| 585 | description: |
| 586 | Vector version of the basic int type. Provides three int fields packed into a |
| 587 | single 128 bit field with 128 bit alignment. |
| 588 | end: |
| 589 | |
| 590 | type: int4 |
| 591 | simple: int __attribute__((ext_vector_type(4))) |
| 592 | summary: Four 32 bit signed integers |
| 593 | description: |
| 594 | Vector version of the basic int type. Provides two four fields packed into a |
| 595 | single 128 bit field with 128 bit alignment. |
| 596 | end: |
| 597 | |
| 598 | |
| 599 | type: long2 |
| 600 | simple: long __attribute__((ext_vector_type(2))) |
| 601 | summary: Two 64 bit signed integers |
| 602 | description: |
| 603 | Vector version of the basic long type. Provides two long fields packed into a |
| 604 | single 128 bit field with 128 bit alignment. |
| 605 | end: |
| 606 | |
| 607 | type: long3 |
| 608 | simple: long __attribute__((ext_vector_type(3))) |
| 609 | summary: Three 64 bit signed integers |
| 610 | description: |
| 611 | Vector version of the basic long type. Provides three long fields packed into |
| 612 | a single 256 bit field with 256 bit alignment. |
| 613 | end: |
| 614 | |
| 615 | type: long4 |
| 616 | simple: long __attribute__((ext_vector_type(4))) |
| 617 | summary: Four 64 bit signed integers |
| 618 | description: |
| 619 | Vector version of the basic long type. Provides four long fields packed into |
| 620 | a single 256 bit field with 256 bit alignment. |
| 621 | end: |
| 622 | |
| 623 | type: rs_matrix4x4 |
| 624 | struct: |
| 625 | field: float m[16] |
| 626 | summary: 4x4 matrix of 32 bit floats |
| 627 | description: |
| 628 | Native holder for RS matrix. Elements are stored in the array at the |
| 629 | location [row*4 + col] |
| 630 | end: |
| 631 | |
| 632 | type: rs_matrix3x3 |
| 633 | struct: |
| 634 | field: float m[9] |
| 635 | summary: 3x3 matrix of 32 bit floats |
| 636 | description: |
| 637 | Native holder for RS matrix. Elements are stored in the array at the |
| 638 | location [row*3 + col] |
| 639 | end: |
| 640 | |
| 641 | type: rs_matrix2x2 |
| 642 | struct: |
| 643 | field: float m[4] |
| 644 | summary: 2x2 matrix of 32 bit floats |
| 645 | description: |
| 646 | Native holder for RS matrix. Elements are stored in the array at the |
| 647 | location [row*2 + col] |
| 648 | end: |
| 649 | |
| 650 | type: rs_quaternion |
| 651 | simple: float4 |
| 652 | summary: Quarternion |
| 653 | description: |
| 654 | Quaternion type for use with the quaternion functions |
| 655 | end: |
| 656 | |
| 657 | type: rs_allocation_cubemap_face |
| 658 | version: 14 |
| 659 | enum: |
| 660 | value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0 |
| 661 | value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1 |
| 662 | value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2 |
| 663 | value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3 |
| 664 | value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4 |
| 665 | value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5 |
| 666 | summary: Enum for selecting cube map faces |
| 667 | description: |
| 668 | end: |
| 669 | |
| 670 | type: rs_allocation_usage_type |
| 671 | version: 14 |
| 672 | enum: |
| 673 | value: RS_ALLOCATION_USAGE_SCRIPT = 0x0001 |
| 674 | value: RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002, "Deprecated." |
| 675 | value: RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004, "Deprecated." |
| 676 | value: RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008, "Deprecated." |
| 677 | value: RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010, "Deprecated." |
| 678 | summary: Bitfield to specify the usage types for an allocation |
| 679 | description: |
| 680 | These values are ORed together to specify which usages or memory spaces are |
| 681 | relevant to an allocation or an operation on an allocation. |
| 682 | end: |
| 683 | |
| 684 | type: rs_primitive |
| 685 | version: 16 |
| 686 | size: 32 |
| 687 | enum: |
| 688 | value: RS_PRIMITIVE_POINT = 0, "Vertex data will be rendered as a series of points" |
| 689 | value: RS_PRIMITIVE_LINE = 1, "Vertex pairs will be rendered as lines" |
| 690 | value: RS_PRIMITIVE_LINE_STRIP = 2, "Vertex data will be rendered as a connected line strip" |
| 691 | value: RS_PRIMITIVE_TRIANGLE = 3, "Vertices will be rendered as individual triangles" |
| 692 | value: RS_PRIMITIVE_TRIANGLE_STRIP = 4, "Vertices will be rendered as a connected triangle strip defined by the first three vertices with each additional triangle defined by a new vertex" |
| 693 | value: RS_PRIMITIVE_TRIANGLE_FAN = 5, "Vertices will be rendered as a sequence of triangles that all share first vertex as the origin" |
| 694 | value: RS_PRIMITIVE_INVALID = 100, "Invalid primitive" |
| 695 | summary: How to intepret mesh vertex data |
| 696 | description: |
| 697 | Describes the way mesh vertex data is interpreted when rendering |
| 698 | end: |
| 699 | |
| 700 | type: rs_data_type |
| 701 | version: 16 |
| 702 | enum: |
| 703 | value: RS_TYPE_NONE = 0 |
| 704 | value: RS_TYPE_FLOAT_32 = 2 |
| 705 | value: RS_TYPE_FLOAT_64 = 3 |
| 706 | value: RS_TYPE_SIGNED_8 = 4 |
| 707 | value: RS_TYPE_SIGNED_16 = 5 |
| 708 | value: RS_TYPE_SIGNED_32 = 6 |
| 709 | value: RS_TYPE_SIGNED_64 = 7 |
| 710 | value: RS_TYPE_UNSIGNED_8 = 8 |
| 711 | value: RS_TYPE_UNSIGNED_16 = 9 |
| 712 | value: RS_TYPE_UNSIGNED_32 = 10 |
| 713 | value: RS_TYPE_UNSIGNED_64 = 11 |
| 714 | value: RS_TYPE_BOOLEAN = 12 |
| 715 | value: RS_TYPE_UNSIGNED_5_6_5 = 13 |
| 716 | value: RS_TYPE_UNSIGNED_5_5_5_1 = 14 |
| 717 | value: RS_TYPE_UNSIGNED_4_4_4_4 = 15 |
| 718 | value: RS_TYPE_MATRIX_4X4 = 16 |
| 719 | value: RS_TYPE_MATRIX_3X3 = 17 |
| 720 | value: RS_TYPE_MATRIX_2X2 = 18 |
| 721 | value: RS_TYPE_ELEMENT = 1000 |
| 722 | value: RS_TYPE_TYPE = 1001 |
| 723 | value: RS_TYPE_ALLOCATION = 1002 |
| 724 | value: RS_TYPE_SAMPLER = 1003 |
| 725 | value: RS_TYPE_SCRIPT = 1004 |
| 726 | value: RS_TYPE_MESH = 1005 |
| 727 | value: RS_TYPE_PROGRAM_FRAGMENT = 1006 |
| 728 | value: RS_TYPE_PROGRAM_VERTEX = 1007 |
| 729 | value: RS_TYPE_PROGRAM_RASTER = 1008 |
| 730 | value: RS_TYPE_PROGRAM_STORE = 1009 |
| 731 | value: RS_TYPE_FONT = 1010 |
| 732 | value: RS_TYPE_INVALID = 10000 |
| 733 | summary: Element data types |
| 734 | description: |
| 735 | DataType represents the basic type information for a basic element. The |
| 736 | naming convention follows. For numeric types it is FLOAT, |
| 737 | SIGNED, or UNSIGNED followed by the _BITS where BITS is the |
| 738 | size of the data. BOOLEAN is a true / false (1,0) |
| 739 | represented in an 8 bit container. The UNSIGNED variants |
| 740 | with multiple bit definitions are for packed graphical data |
| 741 | formats and represent vectors with per vector member sizes |
| 742 | which are treated as a single unit for packing and alignment |
| 743 | purposes. |
| 744 | |
| 745 | MATRIX the three matrix types contain FLOAT_32 elements and are treated |
| 746 | as 32 bits for alignment purposes. |
| 747 | |
| 748 | RS_* objects. 32 bit opaque handles. |
| 749 | end: |
| 750 | |
| 751 | type: rs_data_kind |
| 752 | version: 16 |
| 753 | enum: |
| 754 | value: RS_KIND_USER = 0 |
| 755 | value: RS_KIND_PIXEL_L = 7 |
| 756 | value: RS_KIND_PIXEL_A = 8 |
| 757 | value: RS_KIND_PIXEL_LA = 9 |
| 758 | value: RS_KIND_PIXEL_RGB = 10 |
| 759 | value: RS_KIND_PIXEL_RGBA = 11 |
| 760 | value: RS_KIND_PIXEL_DEPTH = 12 |
| 761 | value: RS_KIND_PIXEL_YUV = 13 |
| 762 | value: RS_KIND_INVALID = 100 |
| 763 | summary: Element data kind |
| 764 | description: |
| 765 | The special interpretation of the data if required. This is primarly |
| 766 | useful for graphical data. USER indicates no special interpretation is |
| 767 | expected. PIXEL is used in conjunction with the standard data types for |
| 768 | representing texture formats. |
| 769 | end: |
| 770 | |
| 771 | type: rs_depth_func |
| 772 | version: 16 |
| 773 | size: 32 |
| 774 | enum: |
| 775 | value: RS_DEPTH_FUNC_ALWAYS = 0, "Always drawn" |
| 776 | value: RS_DEPTH_FUNC_LESS = 1, "Drawn if the incoming depth value is less than that in the depth buffer" |
| 777 | value: RS_DEPTH_FUNC_LEQUAL = 2, "Drawn if the incoming depth value is less or equal to that in the depth buffer" |
| 778 | value: RS_DEPTH_FUNC_GREATER = 3, "Drawn if the incoming depth value is greater than that in the depth buffer" |
| 779 | value: RS_DEPTH_FUNC_GEQUAL = 4, "Drawn if the incoming depth value is greater or equal to that in the depth buffer" |
| 780 | value: RS_DEPTH_FUNC_EQUAL = 5, "Drawn if the incoming depth value is equal to that in the depth buffer" |
| 781 | value: RS_DEPTH_FUNC_NOTEQUAL = 6, "Drawn if the incoming depth value is not equal to that in the depth buffer" |
| 782 | value: RS_DEPTH_FUNC_INVALID = 100, "Invalid depth function" |
| 783 | summary: Depth function |
| 784 | description: |
| 785 | Specifies conditional drawing depending on the comparison of the incoming |
| 786 | depth to that found in the depth buffer. |
| 787 | end: |
| 788 | |
| 789 | type: rs_blend_src_func |
| 790 | version: 16 |
| 791 | size: 32 |
| 792 | enum: |
| 793 | value: RS_BLEND_SRC_ZERO = 0 |
| 794 | value: RS_BLEND_SRC_ONE = 1 |
| 795 | value: RS_BLEND_SRC_DST_COLOR = 2 |
| 796 | value: RS_BLEND_SRC_ONE_MINUS_DST_COLOR = 3 |
| 797 | value: RS_BLEND_SRC_SRC_ALPHA = 4 |
| 798 | value: RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA = 5 |
| 799 | value: RS_BLEND_SRC_DST_ALPHA = 6 |
| 800 | value: RS_BLEND_SRC_ONE_MINUS_DST_ALPHA = 7 |
| 801 | value: RS_BLEND_SRC_SRC_ALPHA_SATURATE = 8 |
| 802 | value: RS_BLEND_SRC_INVALID = 100 |
| 803 | summary: Blend source function |
| 804 | description: |
| 805 | end: |
| 806 | |
| 807 | type: rs_blend_dst_func |
| 808 | version: 16 |
| 809 | size: 32 |
| 810 | enum: |
| 811 | value: RS_BLEND_DST_ZERO = 0 |
| 812 | value: RS_BLEND_DST_ONE = 1 |
| 813 | value: RS_BLEND_DST_SRC_COLOR = 2 |
| 814 | value: RS_BLEND_DST_ONE_MINUS_SRC_COLOR = 3 |
| 815 | value: RS_BLEND_DST_SRC_ALPHA = 4 |
| 816 | value: RS_BLEND_DST_ONE_MINUS_SRC_ALPHA = 5 |
| 817 | value: RS_BLEND_DST_DST_ALPHA = 6 |
| 818 | value: RS_BLEND_DST_ONE_MINUS_DST_ALPHA = 7 |
| 819 | value: RS_BLEND_DST_INVALID = 100 |
| 820 | summary: Blend destination function |
| 821 | description: |
| 822 | end: |
| 823 | |
| 824 | type: rs_cull_mode |
| 825 | version: 16 |
| 826 | size: 32 |
| 827 | enum: |
| 828 | value: RS_CULL_BACK = 0 |
| 829 | value: RS_CULL_FRONT = 1 |
| 830 | value: RS_CULL_NONE = 2 |
| 831 | value: RS_CULL_INVALID = 100 |
| 832 | summary: Culling mode |
| 833 | description: |
| 834 | end: |
| 835 | |
| 836 | type: rs_sampler_value |
| 837 | version: 16 |
| 838 | enum: |
| 839 | value: RS_SAMPLER_NEAREST = 0 |
| 840 | value: RS_SAMPLER_LINEAR = 1 |
| 841 | value: RS_SAMPLER_LINEAR_MIP_LINEAR = 2 |
| 842 | value: RS_SAMPLER_WRAP = 3 |
| 843 | value: RS_SAMPLER_CLAMP = 4 |
| 844 | value: RS_SAMPLER_LINEAR_MIP_NEAREST = 5 |
| 845 | value: RS_SAMPLER_MIRRORED_REPEAT = 6 |
| 846 | value: RS_SAMPLER_INVALID = 100 |
| 847 | summary: Sampler wrap T value |
| 848 | description: |
| 849 | end: |