Add more tests of basic gather functionality.
This commit is contained in:
23
tests/gather-int8-8.ispc
Normal file
23
tests/gather-int8-8.ispc
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
int64 zero = 0;
|
||||
void *gptr;
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
uniform int8 a[programCount];
|
||||
for (uniform int i = 0; i < programCount; ++i)
|
||||
a[i] = aFOO[i];
|
||||
|
||||
int g = 0;
|
||||
int8 *ptr = (aFOO[0] == 1234) ? (int8 * varying)gptr : (a + programIndex);
|
||||
if (programIndex < 2)
|
||||
g = *ptr;
|
||||
RET[programIndex] = g;
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 0;
|
||||
RET[0] = 1;
|
||||
RET[1] = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user