Files
ispc/tests/scatter-mask-1.ispc
Matt Pharr 198aa9620e Fix bug with mask used for gather/scatter code generation.
We should always use the full mask for this, never the internal mask.
Added tests for this.
2011-12-06 15:51:56 -08:00

16 lines
368 B
Plaintext

export uniform int width() { return programCount; }
uniform float a[programCount];
export void f_f(uniform float RET[], uniform float aFOO[]) {
int index = aFOO[programIndex]-1;
if (index & 1)
a[index] = 1;
RET[programIndex] = a[programIndex];
}
export void result(uniform float RET[]) {
RET[programIndex] = (programIndex & 1) ? 1 : 0;
}