Jason Sams | 717e34a | 2010-03-16 15:35:57 -0700 | [diff] [blame] | 1 | |
| 2 | typedef char int8_t; |
| 3 | typedef short int16_t; |
| 4 | typedef int int32_t; |
| 5 | //typedef long int64_t; |
| 6 | |
| 7 | typedef unsigned char uint8_t; |
| 8 | typedef unsigned short uint16_t; |
| 9 | typedef unsigned int uint32_t; |
| 10 | //typedef long uint64_t; |
| 11 | |
| 12 | typedef uint8_t uchar; |
| 13 | typedef uint16_t ushort; |
| 14 | typedef uint32_t uint; |
| 15 | //typedef uint64_t ulong; |
| 16 | |
Jason Sams | fcee14d | 2010-03-18 16:29:59 -0700 | [diff] [blame] | 17 | typedef int rs_element; |
| 18 | typedef int rs_type; |
| 19 | typedef int rs_allocation; |
| 20 | typedef int rs_sampler; |
| 21 | typedef int rs_script; |
| 22 | typedef int rs_mesh; |
| 23 | typedef int rs_program_fragment; |
| 24 | typedef int rs_program_vertex; |
| 25 | typedef int rs_program_raster; |
| 26 | typedef int rs_program_store; |
Jason Sams | 717e34a | 2010-03-16 15:35:57 -0700 | [diff] [blame] | 27 | |
| 28 | typedef float float2 __attribute__((ext_vector_type(2))); |
| 29 | typedef float float3 __attribute__((ext_vector_type(3))); |
| 30 | typedef float float4 __attribute__((ext_vector_type(4))); |
| 31 | typedef float float8 __attribute__((ext_vector_type(8))); |
| 32 | typedef float float16 __attribute__((ext_vector_type(16))); |
| 33 | |
| 34 | typedef uchar uchar2 __attribute__((ext_vector_type(2))); |
| 35 | typedef uchar uchar3 __attribute__((ext_vector_type(3))); |
| 36 | typedef uchar uchar4 __attribute__((ext_vector_type(4))); |
| 37 | typedef uchar uchar8 __attribute__((ext_vector_type(8))); |
| 38 | typedef uchar uchar16 __attribute__((ext_vector_type(16))); |
| 39 | |
| 40 | typedef ushort ushort2 __attribute__((ext_vector_type(2))); |
| 41 | typedef ushort ushort3 __attribute__((ext_vector_type(3))); |
| 42 | typedef ushort ushort4 __attribute__((ext_vector_type(4))); |
| 43 | typedef ushort ushort8 __attribute__((ext_vector_type(8))); |
| 44 | typedef ushort ushort16 __attribute__((ext_vector_type(16))); |
| 45 | |
| 46 | typedef uint uint2 __attribute__((ext_vector_type(2))); |
| 47 | typedef uint uint3 __attribute__((ext_vector_type(3))); |
| 48 | typedef uint uint4 __attribute__((ext_vector_type(4))); |
| 49 | typedef uint uint8 __attribute__((ext_vector_type(8))); |
| 50 | typedef uint uint16 __attribute__((ext_vector_type(16))); |
| 51 | |
| 52 | typedef char char2 __attribute__((ext_vector_type(2))); |
| 53 | typedef char char3 __attribute__((ext_vector_type(3))); |
| 54 | typedef char char4 __attribute__((ext_vector_type(4))); |
| 55 | typedef char char8 __attribute__((ext_vector_type(8))); |
| 56 | typedef char char16 __attribute__((ext_vector_type(16))); |
| 57 | |
| 58 | typedef short short2 __attribute__((ext_vector_type(2))); |
| 59 | typedef short short3 __attribute__((ext_vector_type(3))); |
| 60 | typedef short short4 __attribute__((ext_vector_type(4))); |
| 61 | typedef short short8 __attribute__((ext_vector_type(8))); |
| 62 | typedef short short16 __attribute__((ext_vector_type(16))); |
| 63 | |
| 64 | typedef int int2 __attribute__((ext_vector_type(2))); |
| 65 | typedef int int3 __attribute__((ext_vector_type(3))); |
| 66 | typedef int int4 __attribute__((ext_vector_type(4))); |
| 67 | typedef int int8 __attribute__((ext_vector_type(8))); |
| 68 | typedef int int16 __attribute__((ext_vector_type(16))); |
| 69 | |
| 70 | |
Jason Sams | f2bcce7 | 2010-03-26 15:33:42 -0700 | [diff] [blame] | 71 | // RS_KIND_POSITION |
| 72 | typedef float rs_position1; |
| 73 | typedef float2 rs_position2; |
| 74 | typedef float3 rs_position3; |
| 75 | typedef float4 rs_position4; |
| 76 | |
| 77 | // RS_KIND_COLOR |
| 78 | typedef float3 rs_color3f; |
| 79 | typedef float4 rs_color4f; |
| 80 | typedef uchar4 rs_color4u; |
| 81 | |
| 82 | // RS_KIND_NORMAL |
| 83 | typedef float3 rs_normal; |
| 84 | |
| 85 | // RS_KIND_POINT_SIZE |
| 86 | typedef float rs_point_size; |
| 87 | |
| 88 | // RS_KIND_TEXTURE |
| 89 | typedef float rs_texture_coord1; |
| 90 | typedef float2 rs_texture_coord2; |
| 91 | typedef float3 rs_texture_coord3; |
| 92 | typedef float4 rs_texture_coord4; |
| 93 | |
| 94 | // RS_KIND_INDEX |
| 95 | typedef ushort rs_index; |
Jason Sams | 717e34a | 2010-03-16 15:35:57 -0700 | [diff] [blame] | 96 | |