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:
Matt Pharr
2011-11-29 17:41:00 -08:00
parent e780662a3f
commit a3641d7691
3 changed files with 69 additions and 18 deletions

View 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;
}