diff --git a/tests/coalesce-1.ispc b/tests/coalesce-1.ispc index 205f8d05..acfe8cdf 100644 --- a/tests/coalesce-1.ispc +++ b/tests/coalesce-1.ispc @@ -5,7 +5,8 @@ export void f_f(uniform float RET[], uniform float aFOO[]) { uniform float * uniform buf = uniform new uniform float[32*32]; for (uniform int i = 0; i < 32*32; ++i) buf[i] = i; - + + assert(programIndex <= 64); RET[programIndex] = buf[64-programIndex]; } diff --git a/tests/count-leading-trailing-zeros-4.ispc b/tests/count-leading-trailing-zeros-4.ispc index 5cef2b7a..475c18ca 100644 --- a/tests/count-leading-trailing-zeros-4.ispc +++ b/tests/count-leading-trailing-zeros-4.ispc @@ -3,10 +3,10 @@ export uniform int width() { return programCount; } export void f_f(uniform float RET[], uniform float aFOO[]) { - int32 i = (1 << programIndex); + int32 i = (1 << (programIndex % 28)); RET[programIndex] = count_leading_zeros(i); } export void result(uniform float RET[]) { - RET[programIndex] = 31-programIndex; + RET[programIndex] = 31-(programIndex%28); } diff --git a/tests/count-leading-trailing-zeros-5.ispc b/tests/count-leading-trailing-zeros-5.ispc index d68dc5e4..2fe8161e 100644 --- a/tests/count-leading-trailing-zeros-5.ispc +++ b/tests/count-leading-trailing-zeros-5.ispc @@ -3,10 +3,10 @@ export uniform int width() { return programCount; } export void f_f(uniform float RET[], uniform float aFOO[]) { - unsigned int64 i = ((unsigned int64)1 << (40+programIndex)); + unsigned int64 i = ((unsigned int64)1 << min(63, 40+programIndex)); RET[programIndex] = count_trailing_zeros(i); } export void result(uniform float RET[]) { - RET[programIndex] = 40+programIndex; + RET[programIndex] = min(63, 40+programIndex); } diff --git a/tests/transcendentals-0-2.ispc b/tests/transcendentals-0-2.ispc index 43ebca6a..dad39715 100644 --- a/tests/transcendentals-0-2.ispc +++ b/tests/transcendentals-0-2.ispc @@ -14,7 +14,7 @@ export uniform int width() { return programCount; } bool ok(float x, float ref) { - bool r = (abs(x - ref) < 1e-6) || abs((x-ref)/ref) < 1e-5; + bool r = (abs(x - ref) < 1e-4) || abs((x-ref)/ref) < 1e-4; if (any(r == false)) print("mismatch got %, expected %\n", x, ref); return r; diff --git a/tests/transcendentals-1-3.ispc b/tests/transcendentals-1-3.ispc index f9cdc5fe..a4167e89 100644 --- a/tests/transcendentals-1-3.ispc +++ b/tests/transcendentals-1-3.ispc @@ -14,7 +14,7 @@ export uniform int width() { return programCount; } bool ok(float x, float ref) { - bool r = (abs(x - ref) < 1e-6) || abs((x-ref)/ref) < 1e-5; + bool r = (abs(x - ref) < 1e-5) || abs((x-ref)/ref) < 1e-5; if (any(r == false)) print("mismatch got %, expected %\n", x, ref); return r; diff --git a/tests/unif-struct-test-114.ispc b/tests/unif-struct-test-114.ispc index d5c2e08a..dbee219c 100644 --- a/tests/unif-struct-test-114.ispc +++ b/tests/unif-struct-test-114.ispc @@ -8,12 +8,13 @@ struct Foo { }; export void f_fi(uniform float RET[], uniform float a[], uniform int bFOO[]) { int b = bFOO[programIndex]; - uniform struct Foo myFoo[17]; + uniform struct Foo myFoo[256]; uniform int i; - for (i = 0; i < 17; ++i) { + for (i = 0; i < 256; ++i) { myFoo[i].x = i; myFoo[i].f = 17+2*i; } + assert(b/2 < 256); RET[programIndex] = myFoo[b/2].f; }