Files
ispc/tests/array-gather-simple.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

22 lines
554 B
Plaintext

export uniform int width() { return programCount; }
struct Foo { float f; };
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
float a = aFOO[programIndex];
float foo[5] = { 0, a, 0, 2 * a, 3 };
uniform int offset[4] = { 1,2,3,4 };
int x = offset[programIndex & 0x3];
RET[programIndex] = foo[x];
}
export void result(uniform float RET[]) {
for (uniform int i = 0; i < programCount; i += 4) {
RET[i] = i+1;
RET[i+1] = 0;
RET[i+2] = 2 * (i+3);
RET[i+3] = 3;
}
}