diff options
-rw-r--r-- | libs/rs/java/tests/src/com/android/rs/test/fp_mad.rs | 9 | ||||
-rw-r--r-- | libs/rs/rsScriptC.cpp | 2 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_cl.rsh | 2 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_types.rsh | 8 |
4 files changed, 15 insertions, 6 deletions
diff --git a/libs/rs/java/tests/src/com/android/rs/test/fp_mad.rs b/libs/rs/java/tests/src/com/android/rs/test/fp_mad.rs index 4133fda..b02f85d 100644 --- a/libs/rs/java/tests/src/com/android/rs/test/fp_mad.rs +++ b/libs/rs/java/tests/src/com/android/rs/test/fp_mad.rs @@ -102,7 +102,8 @@ static void test_clamp(uint32_t index) { start(); // Do ~100 M ops - for (int ct=0; ct < 1000 * 100; ct++) { + int ct; + for (ct=0; ct < 1000 * 100; ct++) { for (int i=0; i < (1000); i++) { data_f1[i] = clamp(data_f1[i], -1.f, 1.f); } @@ -129,7 +130,8 @@ static void test_clamp4(uint32_t index) { float total = 0; // Do ~100 M ops - for (int ct=0; ct < 1000 * 100 /4; ct++) { + int ct; + for (ct=0; ct < 1000 * 100 /4; ct++) { for (int i=0; i < (1000); i++) { data_f4[i] = clamp(data_f4[i], -1.f, 1.f); } @@ -140,7 +142,8 @@ static void test_clamp4(uint32_t index) { } void fp_mad_test(uint32_t index, int test_num) { - for (int x=0; x < 1025; x++) { + int x; + for (x=0; x < 1025; x++) { data_f1[x] = (x & 0xf) * 0.1f; data_f4[x].x = (x & 0xf) * 0.1f; data_f4[x].y = (x & 0xf0) * 0.1f; diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 1b879bd..9f730bf 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -485,7 +485,7 @@ void ScriptCState::runCompiler(Context *rsc, // Handle Fatal Error } -#if 0 +#if 1 if (bccLinkBC(s->mBccScript, resName, NULL /*rs_runtime_lib_bc*/, diff --git a/libs/rs/scriptc/rs_cl.rsh b/libs/rs/scriptc/rs_cl.rsh index 1ca093f..ab8270f 100644 --- a/libs/rs/scriptc/rs_cl.rsh +++ b/libs/rs/scriptc/rs_cl.rsh @@ -7,8 +7,6 @@ #define _RS_STATIC static #endif -#define M_PI 3.14159265358979323846264338327950288f /* pi */ - // Conversions #define CVT_FUNC_2(typeout, typein) \ _RS_STATIC typeout##2 __attribute__((overloadable)) convert_##typeout##2(typein##2 v) { \ diff --git a/libs/rs/scriptc/rs_types.rsh b/libs/rs/scriptc/rs_types.rsh index 212eb83..0f8717f 100644 --- a/libs/rs/scriptc/rs_types.rsh +++ b/libs/rs/scriptc/rs_types.rsh @@ -1,6 +1,14 @@ #ifndef __RS_TYPES_RSH__ #define __RS_TYPES_RSH__ +#define M_PI 3.14159265358979323846264338327950288f /* pi */ + +//#include "external/clang/lib/Headers/stdbool.h" +#define bool _Bool +#define true 1 +#define false 0 +#define __bool_true_false_are_defined 1 + typedef char int8_t; typedef short int16_t; typedef int int32_t; |