Sign in
dawn
/
dawn
/
da3f1e395c8050d2b16c35e5e7e0a23e5a40a215
/
.
/
test
/
tint
/
expressions
/
binary
/
div_by_zero
/
by_constant
/
scalar-scalar
/
u32.wgsl.expected.msl
blob: 5247453310a8a4df9c91e5448cf0920657d3ed76 [
file
] [
log
] [
blame
]
#include
<metal_stdlib>
using
namespace
metal
;
uint
tint_div
(
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_div
(
a
,
b
);
return
;
}