Fix bug with indexing into varying pointer w/uniform index.
Issue #182.
This commit is contained in:
14
tests/ptr-varying-unif-index.ispc
Normal file
14
tests/ptr-varying-unif-index.ispc
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
uniform float buf[programCount];
|
||||
uniform float * varying ptr = &buf[programCount - 1 - programIndex];
|
||||
ptr[0] = programIndex;
|
||||
RET[programIndex] = buf[programIndex];
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = programCount - 1 - programIndex;
|
||||
}
|
||||
Reference in New Issue
Block a user