Files
ispc/tests/ptr-math-variability.ispc
Matt Pharr f9dc621ebe Fix bug when doing pointer math with varying integer offsets.
We were incorrectly trying to type convert the varying offset to a
uniform value, which in turn led to an incorrect compile-time error.

Fixes issue #201.
2012-03-27 09:17:40 -07:00

13 lines
292 B
Plaintext

export uniform int width() { return programCount; }
export void f_f(uniform float RET[], uniform float aFOO[]) {
uniform float * uniform ptr = aFOO;
RET[programIndex] = *(ptr + programIndex) - 1;
}
export void result(uniform float RET[]) {
RET[programIndex] = programIndex;
}