Add more tests of basic gather functionality.

This commit is contained in:
Matt Pharr
2012-07-12 13:56:58 -07:00
parent e09e953bbb
commit d180031ef0
48 changed files with 948 additions and 26 deletions

19
tests/gather-float-5.ispc Normal file
View File

@@ -0,0 +1,19 @@
export uniform int width() { return programCount; }
int zero = 0;
void *gptr;
export void f_f(uniform float RET[], uniform float aFOO[]) {
uniform float a[programCount];
for (uniform int i = 0; i < programCount; ++i)
a[i] = aFOO[i];
float *ptr = (aFOO[0] == 1234) ? (float * varying)gptr : (a + programIndex);
int g = *ptr;
RET[programIndex] = g;
}
export void result(uniform float RET[]) {
RET[programIndex] = 1 + programIndex;
}