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:
15
tests/global-array-3.ispc
Normal file
15
tests/global-array-3.ispc
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
float a[100];
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
for (uniform int i = 0; i < programCount; ++i)
|
||||
a[i] = i*programCount+programIndex;
|
||||
RET[programIndex] = a[b-5];
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = programIndex;
|
||||
}
|
||||
Reference in New Issue
Block a user