Sign in
dawn
/
dawn
/
7efe4860c97b491c8bb2480ca4fcff3f8372cab9
/
.
/
test
/
tint
/
expressions
/
binary
/
div_by_zero
/
by_expression
/
scalar-scalar
/
u32.wgsl.expected.msl
blob: 64d213b188213d079b71506bc53f46491261d71a [
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
a
=
1u
;
uint
b
=
0u
;
uint
const
r
=
tint_div
(
a
,
(
b
+
b
));
return
;
}