Initial commit.
This commit is contained in:
31
tests/cfor-c-for-unif-test-vary-break.ispc
Normal file
31
tests/cfor-c-for-unif-test-vary-break.ispc
Normal file
@@ -0,0 +1,31 @@
|
||||
static float float4(uniform float a, uniform float b, uniform float c,
|
||||
uniform float d) {
|
||||
float ret = 0;
|
||||
cfor (uniform int i = 0; i < programCount; i += 4) {
|
||||
ret = insert(ret, i + 0, a);
|
||||
ret = insert(ret, i + 1, b);
|
||||
ret = insert(ret, i + 2, c);
|
||||
ret = insert(ret, i + 3, d);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
float a = aFOO[programIndex&0x3];
|
||||
uniform int x;
|
||||
float aa = a;
|
||||
cfor (x = 0; x < 99999; ++x) {
|
||||
if (x == a) cbreak;
|
||||
++aa;
|
||||
}
|
||||
RET[programIndex] = aa;
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
uniform float ret[4] = { 2,4,6,8 };
|
||||
RET[programIndex] = ret[programIndex & 0x3];
|
||||
}
|
||||
Reference in New Issue
Block a user