Sign in
dawn
/
dawn
/
5cf943e7972c52547ce3b2d581bd208ce2e18886
/
.
/
test
/
tint
/
expressions
/
binary
/
mod_by_zero
/
by_constant
/
scalar-scalar
/
u32.wgsl.expected.msl
blob: 5ab74b7d874460b78f0adb9f74900392e43490bd [
file
] [
log
] [
blame
]
#include
<metal_stdlib>
using
namespace
metal
;
uint
tint_mod
(
uint
lhs
,
uint
rhs
)
{
return
(
lhs
%
select
(
rhs
,
1u
,
(
rhs
==
0u
)));
}
kernel
void
f
()
{
uint
const
a
=
1u
;
uint
const
b
=
0u
;
uint
const
r
=
tint_mod
(
a
,
b
);
return
;
}