Sign in
dawn
/
dawn
/
240a934d0f6aa2970aa58e44c85a6bfdf3d6895e
/
.
/
test
/
tint
/
expressions
/
binary
/
div
/
scalar-scalar
/
i32.wgsl.expected.dxc.hlsl
blob: 9a4fe9bbe1bb7c8a7e492e8b4bd05d77c1f94c97 [
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
=
2
;
const
int
r
=
tint_div
(
a
,
b
);
return
;
}