dawn-cmake/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.msl

16 lines
299 B
Plaintext
Raw Normal View History

#include <metal_stdlib>
using namespace metal;
uint3 tint_mod(uint3 lhs, uint rhs) {
uint3 const r = uint3(rhs);
return (lhs % select(r, uint3(1u), (r == uint3(0u))));
}
kernel void f() {
uint3 const a = uint3(1u, 2u, 3u);
uint const b = 4u;
uint3 const r = tint_mod(a, b);
return;
}