Initial commit.
This commit is contained in:
22
tests/short-vec-6.ispc
Normal file
22
tests/short-vec-6.ispc
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
typedef int<4> int4;
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
void inc(reference int4 v) {
|
||||
int4 delta = { 1, 1, 1, 1 };
|
||||
v += delta;
|
||||
}
|
||||
|
||||
export void f_fu(uniform float ret[], uniform float aa[], uniform float b) {
|
||||
float a = aa[programIndex];
|
||||
int4 v0 = { b, 2*b, 3*b, 2 };
|
||||
inc(v0);
|
||||
if (programIndex & 1) inc(v0);
|
||||
ret[programIndex] = v0.z;
|
||||
}
|
||||
|
||||
export void result(uniform float ret[]) {
|
||||
ret[programIndex] = 16;
|
||||
if (programIndex & 1) ++ret[programIndex];
|
||||
}
|
||||
Reference in New Issue
Block a user