Add some additional tests
This commit is contained in:
17
tests/vector-varying-scatter-2.ispc
Normal file
17
tests/vector-varying-scatter-2.ispc
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
float aa = aFOO[programIndex];
|
||||
float<4> a = { -1, -2, -3, -4 };
|
||||
if (programIndex < 4)
|
||||
a[3-programIndex] = aa;
|
||||
//CO print("%\n%\n%\n%\n", a[0], a[1], a[2], a[3]);
|
||||
int i = clamp(3-programIndex, 0, 3);
|
||||
//CO print("%\n%\n", i, a[i]);
|
||||
RET[programIndex] = a[i];
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = (programIndex < 4) ? 1+programIndex : -1;
|
||||
}
|
||||
Reference in New Issue
Block a user