mirror of
https://github.com/storytold/wgpu.git
synced 2026-12-01 10:34:57 +01:00
* [Metal] Impl `Expression::Splat` * Add changes to the snapshots * Apply suggestions
13 lines
343 B
Plaintext
13 lines
343 B
Plaintext
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
|
|
struct splatOutput {
|
|
metal::float4 member [[position]];
|
|
};
|
|
vertex splatOutput splat(
|
|
) {
|
|
metal::float2 _e10 = ((float2(1.0) + float2(2.0)) - float2(3.0)) / float2(4.0);
|
|
return splatOutput { metal::float4(_e10.x, _e10.y, _e10.x, _e10.y) + static_cast<float4>(int4(5) % int4(2)) };
|
|
}
|