Sign in
dawn
/
dawn
/
6ad78e82fbd5ae3128df32e467221326685d9d0d
/
.
/
test
/
tint
/
expressions
/
binary
/
div
/
scalar-scalar
/
u32.wgsl.expected.msl
blob: 679758c7824548f29bfca32d2198d5d13d674766 [
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
=
2u
;
uint
const
r
=
tint_div
(
a
,
b
);
return
;
}