Fix bugs that broke typedefs in function definitions.

Issue #118.
This commit is contained in:
Matt Pharr
2011-12-03 15:15:06 -08:00
parent a1c0b4f95a
commit d492ba08e6
3 changed files with 26 additions and 1 deletions

14
tests/typedef-3.ispc Normal file
View File

@@ -0,0 +1,14 @@
export uniform int width() { return programCount; }
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
typedef float Float[3];
float a = aFOO[programIndex];
Float x;
x[0] = 1;
x[1] = a;
x[2] = 2;
RET[programIndex] = x[b-4];
}
export void result(uniform float RET[]) { RET[programIndex] = 1+programIndex; }