Sign in
dawn
/
dawn
/
7efe4860c97b491c8bb2480ca4fcff3f8372cab9
/
.
/
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
;
}