From cf113bdb53a59dbd6fba56f0b18c26ae189f794b Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Mon, 2 Oct 2023 17:35:41 +0200 Subject: [PATCH] [spv-in] translate ModfStruct & FrexpStruct to their IR equivalents --- src/front/spv/mod.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/front/spv/mod.rs b/src/front/spv/mod.rs index b5feb73203..083205a45b 100644 --- a/src/front/spv/mod.rs +++ b/src/front/spv/mod.rs @@ -2949,7 +2949,7 @@ impl> Frontend { Glo::InverseSqrt => Mf::InverseSqrt, Glo::MatrixInverse => Mf::Inverse, Glo::Determinant => Mf::Determinant, - Glo::Modf => Mf::Modf, + Glo::ModfStruct => Mf::Modf, Glo::FMin | Glo::UMin | Glo::SMin | Glo::NMin => Mf::Min, Glo::FMax | Glo::UMax | Glo::SMax | Glo::NMax => Mf::Max, Glo::FClamp | Glo::UClamp | Glo::SClamp | Glo::NClamp => Mf::Clamp, @@ -2957,7 +2957,7 @@ impl> Frontend { Glo::Step => Mf::Step, Glo::SmoothStep => Mf::SmoothStep, Glo::Fma => Mf::Fma, - Glo::Frexp => Mf::Frexp, //TODO: FrexpStruct? + Glo::FrexpStruct => Mf::Frexp, Glo::Ldexp => Mf::Ldexp, Glo::Length => Mf::Length, Glo::Distance => Mf::Distance, @@ -2978,7 +2978,16 @@ impl> Frontend { Glo::UnpackSnorm2x16 => Mf::Unpack2x16snorm, Glo::FindILsb => Mf::FindLsb, Glo::FindUMsb | Glo::FindSMsb => Mf::FindMsb, - _ => return Err(Error::UnsupportedExtInst(inst_id)), + // TODO: https://github.com/gfx-rs/naga/issues/2526 + Glo::Modf | Glo::Frexp => return Err(Error::UnsupportedExtInst(inst_id)), + Glo::IMix + | Glo::PackDouble2x32 + | Glo::UnpackDouble2x32 + | Glo::InterpolateAtCentroid + | Glo::InterpolateAtSample + | Glo::InterpolateAtOffset => { + return Err(Error::UnsupportedExtInst(inst_id)) + } }; let arg_count = fun.argument_count();