From e29af7a90beda3cdf19d90a19825bd67ed3592ea Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sat, 23 Jun 2018 17:00:39 -0300 Subject: [PATCH] Implement Fsqrt for SPIR-V --- Ryujinx.Graphics/Gal/Shader/SpirvDecompiler.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Ryujinx.Graphics/Gal/Shader/SpirvDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/SpirvDecompiler.cs index 1d1d4fef07..6bfd365fcb 100644 --- a/Ryujinx.Graphics/Gal/Shader/SpirvDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/SpirvDecompiler.cs @@ -129,6 +129,7 @@ namespace Ryujinx.Graphics.Gal.Shader { ShaderIrInst.Frcp, GetFrcpExpr }, { ShaderIrInst.Frsq, GetFrsqExpr }, { ShaderIrInst.Fsin, GetFsinExpr }, + { ShaderIrInst.Fsqrt, GetFsqrtExpr }, { ShaderIrInst.Ftos, GetFtosExpr }, { ShaderIrInst.Ftou, GetFtouExpr }, { ShaderIrInst.Kil, GetKilExpr }, @@ -1615,6 +1616,11 @@ namespace Ryujinx.Graphics.Gal.Shader => Glsl450.Sin( TypeFloat, GetOperExpr(Op, Op.OperandA)); + + private Instruction GetFsqrtExpr(ShaderIrOp Op) + => Glsl450.Sqrt( + TypeFloat, + GetOperExpr(Op, Op.OperandA)); private Instruction GetKilExpr(ShaderIrOp Op) => new OpKill();