Files
UnrealEngine/Engine/Source/ThirdParty/Intel/ISPC/ispc-1.24.0/tests/ref-vec-param-index.ispc
2025-05-18 13:04:45 +08:00

17 lines
462 B
Plaintext

#include "../test_static.isph"
float foo(uniform float<4> &vec) {
#pragma ignore warning(perf)
return vec[programIndex & 3];
}
task 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);
}
task void result(uniform float RET[]) {
uniform float a[4] = { 5, -1, 10, -5 };
#pragma ignore warning(perf)
RET[programIndex] = a[programIndex & 3];
}