Convert arrays to pointers in expressions like (a+5)
This was one instance of the C-style array/pointer duality that was missed the first time around.
This commit is contained in:
15
tests/array-pointer-duality-1.ispc
Normal file
15
tests/array-pointer-duality-1.ispc
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
uniform float a[programCount];
|
||||
for (unsigned int i = 0; i < programCount; ++i)
|
||||
a[i] = aFOO[i];
|
||||
|
||||
RET[programIndex] = *(a + 2);
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user