Initial commit.
This commit is contained in:
23
tests/struct-gather-3.ispc
Normal file
23
tests/struct-gather-3.ispc
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
|
||||
struct Foo {
|
||||
float f;
|
||||
};
|
||||
|
||||
float func(uniform Foo foo[], int offset) {
|
||||
return foo[offset].f;
|
||||
}
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
float a = aFOO[programIndex];
|
||||
uniform Foo foo[17];
|
||||
uniform int i;
|
||||
for (i = 0; i < 17; ++i)
|
||||
foo[i].f = i*a;
|
||||
RET[programIndex] = func(foo, (int)a);
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) { RET[programIndex] = (1+programIndex)*(1+programIndex); }
|
||||
Reference in New Issue
Block a user