Sign in
dawn
/
dawn
/
2d245581d702e6d94de066f8d53a3f8b5aa263e2
/
.
/
test
/
tint
/
expressions
/
binary
/
mod
/
scalar-scalar
/
i32.wgsl.expected.ir.dxc.hlsl
blob: d944b2b42b7b5a61adc108c718df4e748334098c [
file
] [
log
] [
blame
]
int
tint_mod_i32
(
int
lhs
,
int
rhs
)
{
int
v
=
((((
rhs
==
0
)
|
((
lhs
==
-
2147483648
)
&
(
rhs
==
-
1
))))
?
(
1
)
:
(
rhs
));
return
(
lhs
-
((
lhs
/
v
)
*
v
));
}
[
numthreads
(
1
,
1
,
1
)]
void
f
()
{
int
a
=
1
;
int
b
=
2
;
int
r
=
tint_mod_i32
(
a
,
b
);
}