mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 23:11:01 +01:00
20 lines
373 B
Plaintext
20 lines
373 B
Plaintext
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
|
|
metal::float4 splat(
|
|
) {
|
|
metal::float2 a = ((metal::float2(1.0) + metal::float2(2.0)) - metal::float2(3.0)) / metal::float2(4.0);
|
|
metal::int4 b = metal::int4(5) % metal::int4(2);
|
|
return a.xyxy + static_cast<float4>(b);
|
|
}
|
|
|
|
int unary(
|
|
) {
|
|
if (!true) {
|
|
return 1;
|
|
} else {
|
|
return !1;
|
|
}
|
|
}
|