Sign in
dawn
/
dawn
/
2a7005f4161fe3088544faa6557aaaa85a9cbf77
/
.
/
test
/
tint
/
expressions
/
binary
/
div_by_zero
/
by_identifier
/
scalar-scalar
/
i32.wgsl.expected.fxc.hlsl
blob: dcf5a24f5e0e151a8ef3172253e880434d07a17d [
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
()
{
int
a
=
1
;
int
b
=
0
;
const
int
r
=
tint_div
(
a
,
b
);
return
;
}