Improve gather->vector load optimization to detect <linear sequence>-<uniform> case.

Previously, we didn't handle subtraction ops when deciphering offsets in order to
try to change gathers t evictor loads.
This commit is contained in:
Matt Pharr
2011-10-11 13:24:40 -07:00
parent 06d70376ea
commit 1198520029
2 changed files with 67 additions and 23 deletions

View File

@@ -0,0 +1,13 @@
export uniform int width() { return programCount; }
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
float a = aFOO[programIndex];
int index = programIndex + 5;
RET[index-b] = a;
}
export void result(uniform float RET[]) {
RET[programIndex] = 1 + programIndex;
}