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

16 lines
301 B
Plaintext
Raw Normal View History

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