Files
ispc/tests/aossoa-1.ispc
Matt Pharr d86653668e Fix a number of tests to work correctly with 32/64-wide targets.
Still to be reviewed/fixed: tests/test-*, tests/[cfrs]*
2012-05-29 10:16:43 -07:00

30 lines
739 B
Plaintext

export uniform int width() { return programCount; }
export void f_v(uniform float RET[]) {
#define width 3
#define maxProgramCount 64
assert(programCount <= maxProgramCount);
//CO const uniform int width = 3;
//CO const uniform int maxProgramCount = 16;
uniform float a[width*maxProgramCount], r[width*maxProgramCount];
for (uniform int i = 0; i < width*maxProgramCount; ++i)
a[i] = i;
float x=-1, y=-1, z=-1;
aos_to_soa3(a, &x, &y, &z);
int errs = 0;
if (x != width * programIndex) ++errs;
if (y != 1 + width * programIndex) ++errs;
if (z != 2 + width * programIndex) ++errs;
RET[programIndex] = errs;
}
export void result(uniform float RET[]) {
RET[programIndex] = 0;
}