mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
spv-out: use OpFRem instead of OpFMod
This commit is contained in:
committed by
Dzmitry Malyshau
parent
a8929603ac
commit
70b5ddaaad
@@ -20,7 +20,7 @@ bitflags = "1"
|
||||
bit-set = "0.5"
|
||||
codespan-reporting = { version = "0.11.0", optional = true }
|
||||
rustc-hash = "1.1.0"
|
||||
indexmap = "1.6" # 1.7 has MSRV 1.49
|
||||
indexmap = "~1.6" # 1.7 has MSRV 1.49
|
||||
log = "0.4"
|
||||
num-traits = "0.2"
|
||||
spirv = { version = "0.2", optional = true }
|
||||
|
||||
@@ -390,7 +390,7 @@ impl<'w> BlockContext<'w> {
|
||||
crate::BinaryOperator::Modulo => match left_ty_inner.scalar_kind() {
|
||||
Some(crate::ScalarKind::Sint) => spirv::Op::SMod,
|
||||
Some(crate::ScalarKind::Uint) => spirv::Op::UMod,
|
||||
Some(crate::ScalarKind::Float) => spirv::Op::FMod,
|
||||
Some(crate::ScalarKind::Float) => spirv::Op::FRem,
|
||||
_ => unimplemented!(),
|
||||
},
|
||||
crate::BinaryOperator::Equal => match left_ty_inner.scalar_kind() {
|
||||
|
||||
@@ -149,13 +149,13 @@ OpFunctionEnd
|
||||
OpBranch %118
|
||||
%118 = OpLabel
|
||||
%119 = OpSMod %8 %7 %7
|
||||
%120 = OpFMod %4 %3 %3
|
||||
%120 = OpFRem %4 %3 %3
|
||||
%122 = OpCompositeConstruct %121 %7 %7 %7
|
||||
%123 = OpCompositeConstruct %121 %7 %7 %7
|
||||
%124 = OpSMod %121 %122 %123
|
||||
%125 = OpCompositeConstruct %22 %3 %3 %3
|
||||
%126 = OpCompositeConstruct %22 %3 %3 %3
|
||||
%127 = OpFMod %22 %125 %126
|
||||
%127 = OpFRem %22 %125 %126
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%129 = OpFunction %2 None %117
|
||||
|
||||
Reference in New Issue
Block a user