From cac4d6d96551a756121361df2a83e7580e34a862 Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Wed, 9 Jun 2010 18:03:56 -0700 Subject: [PATCH] To enable the reflection of rs_mesh etc. Side benefit: Better type checking. Double-checked with Nick that the extra "struct" is enabling reflection and type checking without incurring overhead. Change-Id: I624efd9547a8f847d9525906ab3a49278055c9e9 --- libs/rs/scriptc/rs_types.rsh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libs/rs/scriptc/rs_types.rsh b/libs/rs/scriptc/rs_types.rsh index 9984a1d53944d..a8e139a487699 100644 --- a/libs/rs/scriptc/rs_types.rsh +++ b/libs/rs/scriptc/rs_types.rsh @@ -14,16 +14,16 @@ typedef uint16_t ushort; typedef uint32_t uint; typedef uint64_t ulong; -typedef int rs_element; -typedef int rs_type; -typedef int rs_allocation; -typedef int rs_sampler; -typedef int rs_script; -typedef int rs_mesh; -typedef int rs_program_fragment; -typedef int rs_program_vertex; -typedef int rs_program_raster; -typedef int rs_program_store; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_element; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_type; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_allocation; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_sampler; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_script; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_mesh; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_program_fragment; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_program_vertex; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_program_raster; +typedef struct { int* p; } __attribute__((packed, aligned(4))) rs_program_store; typedef float float2 __attribute__((ext_vector_type(2))); typedef float float3 __attribute__((ext_vector_type(3)));