Sign in
dawn
/
dawn
/
2a7005f4161fe3088544faa6557aaaa85a9cbf77
/
.
/
test
/
tint
/
expressions
/
binary
/
mod_by_zero
/
by_expression
/
scalar-scalar
/
u32.wgsl.expected.msl
blob: 96b1555cb80d3df0eb590d11512748978d1ffb20 [
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
a
=
1u
;
uint
b
=
0u
;
uint
const
r
=
tint_mod
(
a
,
(
b
+
b
));
return
;
}