Handle ConstantExpressions when computing address+offset vectors for scatter/gather.

In particular, this fixes issue #81, where a global variable access was leading to
ConstantExpressions showing up in this code, which it wasn't previously expecting.
This commit is contained in:
Matt Pharr
2011-10-14 11:20:08 -07:00
parent 2460fa5c83
commit 9f2aa8d92a
5 changed files with 163 additions and 15 deletions

15
tests/global-array.ispc Normal file
View File

@@ -0,0 +1,15 @@
uniform float a[100];
export uniform int width() { return programCount; }
export void f_f(uniform float RET[], uniform float aFOO[]) {
for (uniform int i = 0; i < programCount; ++i)
a[i] = i;
RET[programIndex] = a[programIndex];
}
export void result(uniform float RET[]) {
RET[programIndex] = programIndex;
}