diff options
| author | 2011-07-27 14:19:58 -0700 | |
|---|---|---|
| committer | 2011-07-27 14:19:58 -0700 | |
| commit | a12036bc97cd89afa9a6746f5e61ce5e773fb996 (patch) | |
| tree | f7a264198b25eda8d35aed4eaea0bd9787b08207 | |
| parent | ccb722d5aa7b5ac66db2fcf2944fda62a8243f6b (diff) | |
| parent | 4575a8e4de2cd5486dfd5b6afb701c7f167ff508 (diff) | |
Merge "Add const to matrix by vector multiply routines. Cleanup ifdef for rsForEach."
| -rw-r--r-- | libs/rs/scriptc/rs_core.rsh | 20 | ||||
| -rw-r--r-- | libs/rs/scriptc/rs_math.rsh | 21 |
2 files changed, 30 insertions, 11 deletions
diff --git a/libs/rs/scriptc/rs_core.rsh b/libs/rs/scriptc/rs_core.rsh index 4768bbed1f14..d939fb33d6ea 100644 --- a/libs/rs/scriptc/rs_core.rsh +++ b/libs/rs/scriptc/rs_core.rsh @@ -269,6 +269,7 @@ rsMatrixLoadFrustum(rs_matrix4x4 *m, float left, float right, float bottom, floa extern void __attribute__((overloadable)) rsMatrixLoadPerspective(rs_matrix4x4* m, float fovy, float aspect, float near, float far); +#if !defined(RS_VERSION) || (RS_VERSION < 14) _RS_RUNTIME float4 __attribute__((overloadable)) rsMatrixMultiply(rs_matrix4x4 *m, float4 in); @@ -286,6 +287,25 @@ rsMatrixMultiply(rs_matrix3x3 *m, float2 in); _RS_RUNTIME float2 __attribute__((overloadable)) rsMatrixMultiply(rs_matrix2x2 *m, float2 in); +#else +_RS_RUNTIME float4 __attribute__((overloadable)) +rsMatrixMultiply(const rs_matrix4x4 *m, float4 in); + +_RS_RUNTIME float4 __attribute__((overloadable)) +rsMatrixMultiply(const rs_matrix4x4 *m, float3 in); + +_RS_RUNTIME float4 __attribute__((overloadable)) +rsMatrixMultiply(const rs_matrix4x4 *m, float2 in); + +_RS_RUNTIME float3 __attribute__((overloadable)) +rsMatrixMultiply(const rs_matrix3x3 *m, float3 in); + +_RS_RUNTIME float3 __attribute__((overloadable)) +rsMatrixMultiply(const rs_matrix3x3 *m, float2 in); + +_RS_RUNTIME float2 __attribute__((overloadable)) +rsMatrixMultiply(const rs_matrix2x2 *m, float2 in); +#endif // Returns true if the matrix was successfully inversed extern bool __attribute__((overloadable)) rsMatrixInverse(rs_matrix4x4 *m); diff --git a/libs/rs/scriptc/rs_math.rsh b/libs/rs/scriptc/rs_math.rsh index fb5c4f6ddb65..1d36cc6530aa 100644 --- a/libs/rs/scriptc/rs_math.rsh +++ b/libs/rs/scriptc/rs_math.rsh @@ -249,7 +249,16 @@ typedef struct rs_script_call { uint32_t arrayEnd; } rs_script_call_t; -#if 1//(RS_VERSION >= 14) +#if !defined(RS_VERSION) || (RS_VERSION < 14) +extern void __attribute__((overloadable)) + rsForEach(rs_script script, rs_allocation input, + rs_allocation output, const void * usrData, + const rs_script_call_t *); + +extern void __attribute__((overloadable)) + rsForEach(rs_script script, rs_allocation input, + rs_allocation output, const void * usrData); +#else extern void __attribute__((overloadable)) rsForEach(rs_script script, rs_allocation input, rs_allocation output); @@ -260,18 +269,8 @@ extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) rsForEach(rs_script script, rs_allocation input, rs_allocation output, const void * usrData, size_t usrDataLen, const rs_script_call_t *); -#else -extern void __attribute__((overloadable)) - rsForEach(rs_script script, rs_allocation input, - rs_allocation output, const void * usrData, - const rs_script_call_t *); #endif -// Move me once dependant changes are in. -extern void __attribute__((overloadable)) - rsForEach(rs_script script, rs_allocation input, - rs_allocation output, const void * usrData); - /** * Atomic add one to the value at addr. |