blob: d7c8be15da7c7b0446325577d28c9b8e1f073194 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
uint tint_mod_u32(uint lhs, uint rhs) {
uint const v = select(rhs, 1u, (rhs == 0u));
return (lhs - ((lhs / v) * v));
}
kernel void f() {
uint const a = 1u;
uint const b = 0u;
uint const r = tint_mod_u32(a, b);
}