Sign in
dawn
/
dawn
/
81d11b3cf1d5d10427b3ee5ac08f3e209d37a97f
/
.
/
test
/
tint
/
expressions
/
binary
/
mod
/
scalar-scalar
/
u32.wgsl.expected.msl
blob: 89b2a107c7f825cd810e36e4a5561bd92c9daaca [
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
=
2u
;
uint
const
r
=
tint_mod
(
a
,
b
);
return
;
}