Sign in
dawn
/
dawn
/
da2acafcd691e6e6de648a1c7408c6c662cb6943
/
.
/
test
/
tint
/
expressions
/
binary
/
mod
/
scalar-scalar
/
i32.wgsl.expected.ir.fxc.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
);
}