Initial commit.

This commit is contained in:
Matt Pharr
2011-06-21 06:23:29 -07:00
commit 18af5226ba
587 changed files with 45117 additions and 0 deletions

19
tests/short-vec-4.ispc Normal file
View File

@@ -0,0 +1,19 @@
typedef int<3> int3;
export uniform int width() { return programCount; }
export void f_fu(uniform float ret[], uniform float aa[], uniform float b) {
float a = aa[programIndex];
int3 v0 = { b, 2*b, 3*b };
int3 v1 = { a, 2*a, 3*a };
if (programIndex & 1)
ret[programIndex] = (v0+v1).y;
else
ret[programIndex] = (v0+v1).z;
}
export void result(uniform float ret[]) {
ret[programIndex] = (programIndex & 1) ? 10 + 2 * (programIndex+1) :
15 + 3 * (programIndex+1);
}