diff --git a/tests/cfor-struct-test-114.ispc b/tests/cfor-struct-test-114.ispc index 0ea2f65a..e7b83a79 100644 --- a/tests/cfor-struct-test-114.ispc +++ b/tests/cfor-struct-test-114.ispc @@ -10,9 +10,9 @@ struct Foo { export void f_fi(uniform float RET[], uniform float aFOO[], uniform int bFOO[]) { float a = aFOO[programIndex]; int b = bFOO[programIndex]; - varying Foo myFoo[17]; + varying Foo myFoo[programCount+1]; uniform int i; - cfor (i = 0; i < 17; ++i) { + cfor (i = 0; i < programCount+1; ++i) { myFoo[i].x = i; myFoo[i].f = 2*i; } diff --git a/tests/cfor-test-134.ispc b/tests/cfor-test-134.ispc index 96493dff..0e8af645 100644 --- a/tests/cfor-test-134.ispc +++ b/tests/cfor-test-134.ispc @@ -17,8 +17,11 @@ export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) { export void result(uniform float RET[]) { - RET[0] = RET[4] = RET[8] = RET[12] = 1; - RET[1] = RET[5] = RET[9] = RET[13] = 3; - RET[2] = RET[6] = RET[10] = RET[14] = 3; - RET[3] = RET[7] = RET[11] = RET[15] = 29; + for (int i = 0; i < programCount; i += 4) + { + RET[i+0] = 1; + RET[i+1] = 3; + RET[i+2] = 3; + RET[i+3] = 29; + } } diff --git a/tests/cfor-test-135.ispc b/tests/cfor-test-135.ispc index 5926ba30..9f17350e 100644 --- a/tests/cfor-test-135.ispc +++ b/tests/cfor-test-135.ispc @@ -17,8 +17,11 @@ export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) { export void result(uniform float RET[]) { - RET[0] = RET[4] = RET[8] = RET[12] = 1; - RET[1] = RET[5] = RET[9] = RET[13] = 3; - RET[2] = RET[6] = RET[10] = RET[14] = 3; - RET[3] = RET[7] = RET[11] = RET[15] = 29; + for (int i = 0; i < programCount; i += 4) + { + RET[i+0] = 1; + RET[i+1] = 3; + RET[i+2] = 3; + RET[i+3] = 29; + } } diff --git a/tests/cfor-test-136.ispc b/tests/cfor-test-136.ispc index 62834f67..e7ac9f75 100644 --- a/tests/cfor-test-136.ispc +++ b/tests/cfor-test-136.ispc @@ -17,8 +17,11 @@ export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) { export void result(uniform float RET[]) { - RET[0] = RET[4] = RET[8] = RET[12] = 1; - RET[1] = RET[5] = RET[9] = RET[13] = 3; - RET[2] = RET[6] = RET[10] = RET[14] = 3; - RET[3] = RET[7] = RET[11] = RET[15] = 29; + for (int i = 0; i < programCount; i += 4) + { + RET[i+0] = 1; + RET[i+1] = 3; + RET[i+2] = 3; + RET[i+3] = 29; + } } diff --git a/tests/cfor-test-64.ispc b/tests/cfor-test-64.ispc index 9c51c9b0..eb2cbec0 100644 --- a/tests/cfor-test-64.ispc +++ b/tests/cfor-test-64.ispc @@ -19,8 +19,11 @@ export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) { export void result(uniform float RET[]) { - RET[0] = RET[4] = RET[8] = RET[12] = 2; - RET[1] = RET[5] = RET[9] = RET[13] = 3; - RET[2] = RET[6] = RET[10] = RET[14] = 5; - RET[3] = RET[7] = RET[11] = RET[15] = 6; + for (int i = 0; i < programCount; i += 4) + { + RET[i+0] = 2; + RET[i+1] = 3; + RET[i+2] = 5; + RET[i+3] = 6; + } } diff --git a/tests/cfor-test-65.ispc b/tests/cfor-test-65.ispc index a3c11c6d..28f82225 100644 --- a/tests/cfor-test-65.ispc +++ b/tests/cfor-test-65.ispc @@ -17,8 +17,11 @@ export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) { export void result(uniform float RET[]) { - RET[0] = RET[4] = RET[8] = RET[12] = 1; - RET[1] = RET[5] = RET[9] = RET[13] = 3; - RET[2] = RET[6] = RET[10] = RET[14] = 3; - RET[3] = RET[7] = RET[11] = RET[15] = 29; + for (int i = 0; i < programCount; i += 4) + { + RET[i+0] = 1; + RET[i+1] = 3; + RET[i+2] = 3; + RET[i+3] = 29; + } } diff --git a/tests/cfor-test-66.ispc b/tests/cfor-test-66.ispc index d3698ffe..e53d2b94 100644 --- a/tests/cfor-test-66.ispc +++ b/tests/cfor-test-66.ispc @@ -18,8 +18,11 @@ export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) { export void result(uniform float RET[]) { - RET[0] = RET[4] = RET[8] = RET[12] = 32; - RET[1] = RET[5] = RET[9] = RET[13] = 32; - RET[2] = RET[6] = RET[10] = RET[14] = 38; - RET[3] = RET[7] = RET[11] = RET[15] = 39; + for (int i = 0; i < programCount; i += 4) + { + RET[i+0] = 32; + RET[i+1] = 32; + RET[i+2] = 38; + RET[i+3] = 39; + } } diff --git a/tests/cfor-unif-struct-test-114.ispc b/tests/cfor-unif-struct-test-114.ispc index 114e826d..59649fd0 100644 --- a/tests/cfor-unif-struct-test-114.ispc +++ b/tests/cfor-unif-struct-test-114.ispc @@ -8,9 +8,9 @@ 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[programCount+1]; uniform int i; - cfor (i = 0; i < 17; ++i) { + cfor (i = 0; i < programCount+1; ++i) { myFoo[i].x = i; myFoo[i].f = 2*i; }