Constant fold in SelectExpr::Optimize().

Resolves issue #170.
This commit is contained in:
Matt Pharr
2012-01-31 12:22:11 -08:00
parent dac091552d
commit 8d1631b714
3 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
export uniform int width() { return programCount; }
export void f_f(uniform float RET[], uniform float aFOO[]) {
RET[programIndex] = (programIndex >= 0) ? 1 : 0;
}
export void result(uniform float RET[]) {
RET[programIndex] = 1;
}

View File

@@ -0,0 +1,10 @@
export uniform int width() { return programCount; }
export void f_f(uniform float RET[], uniform float aFOO[]) {
RET[programIndex] = (programCount < 10000) ? 1 : 0;
}
export void result(uniform float RET[]) {
RET[programIndex] = 1;
}