Generalize the lScalarizeVector() utility routine (used in determining when we can change gathers/scatters into vector loads/stores, respectively) to handle vector shuffles and vector loads. This fixes issue #79, which provided a case where a gather was being performed even though a vector load was possible.
18 lines
422 B
Plaintext
18 lines
422 B
Plaintext
|
|
export uniform int width() { return programCount; }
|
|
|
|
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
|
int tmp1 = shuffle(programIndex, 0, programIndex);
|
|
|
|
RET[programIndex] = 10;
|
|
if (programIndex < 1) {
|
|
uniform int foo = extract(tmp1, 0);
|
|
RET[programIndex] = aFOO[foo + programIndex];
|
|
}
|
|
}
|
|
|
|
export void result(uniform float RET[]) {
|
|
RET[programIndex] = 10;
|
|
RET[0] = 1;
|
|
}
|