blob: 1d8f1bdacbc764d812fecb079cf2a1930587fff4 [file] [log] [blame]
Jason Sams717e34a2010-03-16 15:35:57 -07001
2typedef char int8_t;
3typedef short int16_t;
4typedef int int32_t;
Jason Sams22fa3712010-05-19 17:22:57 -07005typedef long long int64_t;
Jason Sams717e34a2010-03-16 15:35:57 -07006
7typedef unsigned char uint8_t;
8typedef unsigned short uint16_t;
9typedef unsigned int uint32_t;
Jason Sams22fa3712010-05-19 17:22:57 -070010typedef unsigned long long uint64_t;
Jason Sams717e34a2010-03-16 15:35:57 -070011
12typedef uint8_t uchar;
13typedef uint16_t ushort;
14typedef uint32_t uint;
Jason Sams22fa3712010-05-19 17:22:57 -070015typedef uint64_t ulong;
Jason Sams717e34a2010-03-16 15:35:57 -070016
Shih-wei Liaoefa17602010-06-09 18:03:56 -070017typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_element;
18typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_type;
19typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_allocation;
20typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_sampler;
21typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_script;
22typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_mesh;
23typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_program_fragment;
24typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_program_vertex;
25typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_program_raster;
26typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_program_store;
Jason Sams717e34a2010-03-16 15:35:57 -070027
28typedef float float2 __attribute__((ext_vector_type(2)));
29typedef float float3 __attribute__((ext_vector_type(3)));
30typedef float float4 __attribute__((ext_vector_type(4)));
Jason Sams717e34a2010-03-16 15:35:57 -070031
32typedef uchar uchar2 __attribute__((ext_vector_type(2)));
33typedef uchar uchar3 __attribute__((ext_vector_type(3)));
34typedef uchar uchar4 __attribute__((ext_vector_type(4)));
Jason Sams717e34a2010-03-16 15:35:57 -070035
36typedef ushort ushort2 __attribute__((ext_vector_type(2)));
37typedef ushort ushort3 __attribute__((ext_vector_type(3)));
38typedef ushort ushort4 __attribute__((ext_vector_type(4)));
Jason Sams717e34a2010-03-16 15:35:57 -070039
40typedef uint uint2 __attribute__((ext_vector_type(2)));
41typedef uint uint3 __attribute__((ext_vector_type(3)));
42typedef uint uint4 __attribute__((ext_vector_type(4)));
Jason Sams717e34a2010-03-16 15:35:57 -070043
44typedef char char2 __attribute__((ext_vector_type(2)));
45typedef char char3 __attribute__((ext_vector_type(3)));
46typedef char char4 __attribute__((ext_vector_type(4)));
Jason Sams717e34a2010-03-16 15:35:57 -070047
48typedef short short2 __attribute__((ext_vector_type(2)));
49typedef short short3 __attribute__((ext_vector_type(3)));
50typedef short short4 __attribute__((ext_vector_type(4)));
Jason Sams717e34a2010-03-16 15:35:57 -070051
52typedef int int2 __attribute__((ext_vector_type(2)));
53typedef int int3 __attribute__((ext_vector_type(3)));
54typedef int int4 __attribute__((ext_vector_type(4)));
Jason Sams717e34a2010-03-16 15:35:57 -070055
56
Jason Sams22fa3712010-05-19 17:22:57 -070057typedef struct {
58 float m[16];
59} rs_matrix4x4;
60
Jason Sams7fe6bce2010-06-24 13:54:11 -070061typedef struct {
62 float m[9];
63} rs_matrix3x3;
64
65typedef struct {
66 float m[4];
67} rs_matrix2x2;
68
69
Jason Sams97589cb2010-06-17 15:55:00 -070070#define RS_PACKED __attribute__((packed, aligned(4)))
71