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,17 @@
export uniform int width() { return programCount; }
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
uniform int a[4][4][4];
for (uniform int i = 0; i < 4; ++i)
for (uniform int j = 0; j < 4; ++j)
for (uniform int k = 0; k < 4; ++k)
a[i][j][k] = 100*i+10*j+k;
RET[programIndex] = *(a[2][3] + 1);
}
export void result(uniform float RET[]) {
RET[programIndex] = 231;
}