Implement Fsqrt for SPIR-V

This commit is contained in:
ReinUsesLisp 2018-06-23 17:00:39 -03:00
parent 5cd6ce87b7
commit e29af7a90b

View file

@ -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();