Fix bug with initializer expression lists for globlal/static array-typed variables.

This commit is contained in:
Matt Pharr
2011-07-28 11:38:56 +01:00
parent 7f662de6e3
commit 158bd6ef9e
3 changed files with 32 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
static uniform float foo[4] = { 1, 2, 3, 4 };
export uniform int width() { return programCount; }
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
RET[programIndex] = foo[b-3];
}
export void result(uniform float RET[]) {
RET[programIndex] = 3;
}

View File

@@ -0,0 +1,13 @@
static uniform int foo[4] = { 1, 2, 3, 4 };
export uniform int width() { return programCount; }
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
RET[programIndex] = foo[b-3];
}
export void result(uniform float RET[]) {
RET[programIndex] = 3;
}