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