Add test for the bug in issue #204.
This commit is contained in:
16
tests/ref-vec-param-index.ispc
Normal file
16
tests/ref-vec-param-index.ispc
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
float foo(uniform float<4> &vec) {
|
||||
return vec[programIndex & 3];
|
||||
}
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
uniform float<4> vec = { b, -1, 2*b, -b };
|
||||
RET[programIndex] = foo(vec);
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
uniform float a[4] = { 5, -1, 10, -5 };
|
||||
RET[programIndex] = a[programIndex & 3];
|
||||
}
|
||||
Reference in New Issue
Block a user