Fix bugs in tests.
These two tests were walking past the end of the aFOO[] array, which in turn was leading to failures with the generic-16/c++ output path.
This commit is contained in:
@@ -10,8 +10,10 @@ export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
|
||||
// make sure we reset the func mask in the foreach loop...
|
||||
if ((int)aFOO[programIndex] & 1)
|
||||
foreach (i = 0 ... programCount+3)
|
||||
val[i] += aFOO[i] - 1;
|
||||
foreach (i = 0 ... programCount+3) {
|
||||
int ic = min(i, programCount-1);
|
||||
val[i] += aFOO[ic] - 1 + i-ic;
|
||||
}
|
||||
|
||||
RET[programIndex] = val[3+programIndex];
|
||||
}
|
||||
|
||||
@@ -5,8 +5,10 @@ export uniform int width() { return programCount; }
|
||||
// make sure we reset the func mask in the foreach loop...
|
||||
|
||||
void update(uniform float val[], const uniform float a[]) {
|
||||
foreach (i = 0 ... programCount+3)
|
||||
val[i] += a[i] - 1;
|
||||
foreach (i = 0 ... programCount+3) {
|
||||
int ic = min(i, programCount-1);
|
||||
val[i] += a[ic] - 1 + i-ic;
|
||||
}
|
||||
}
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
|
||||
Reference in New Issue
Block a user