Sign in
dawn
/
dawn
/
fb981c813468be14c415c0de132ad7c9f8b08aef
/
.
/
test
/
tint
/
expressions
/
binary
/
div_by_zero
/
by_constant
/
scalar-scalar
/
i32.wgsl.expected.fxc.hlsl
blob: 57589da0eb99dcd47c353591deb323416f689d7e [
file
] [
log
] [
blame
]
int
tint_div
(
int
lhs
,
int
rhs
)
{
return
(
lhs
/
(((
rhs
==
0
)
|
((
lhs
==
-
2147483648
)
&
(
rhs
==
-
1
)))
?
1
:
rhs
));
}
[
numthreads
(
1
,
1
,
1
)]
void
f
()
{
const
int
a
=
1
;
const
int
b
=
0
;
const
int
r
=
tint_div
(
a
,
b
);
return
;
}