diff options
Diffstat (limited to 'Ryujinx.Graphics/Shader/Instructions/InstEmitMove.cs')
-rw-r--r-- | Ryujinx.Graphics/Shader/Instructions/InstEmitMove.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Shader/Instructions/InstEmitMove.cs b/Ryujinx.Graphics/Shader/Instructions/InstEmitMove.cs new file mode 100644 index 00000000..b74dbfd7 --- /dev/null +++ b/Ryujinx.Graphics/Shader/Instructions/InstEmitMove.cs @@ -0,0 +1,32 @@ +using Ryujinx.Graphics.Shader.Decoders; +using Ryujinx.Graphics.Shader.IntermediateRepresentation; +using Ryujinx.Graphics.Shader.Translation; + +using static Ryujinx.Graphics.Shader.Instructions.InstEmitHelper; + +namespace Ryujinx.Graphics.Shader.Instructions +{ + static partial class InstEmit + { + public static void Mov(EmitterContext context) + { + OpCodeAlu op = (OpCodeAlu)context.CurrOp; + + context.Copy(GetDest(context), GetSrcB(context)); + } + + public static void Sel(EmitterContext context) + { + OpCodeAlu op = (OpCodeAlu)context.CurrOp; + + Operand pred = GetPredicate39(context); + + Operand srcA = GetSrcA(context); + Operand srcB = GetSrcB(context); + + Operand res = context.ConditionalSelect(pred, srcA, srcB); + + context.Copy(GetDest(context), res); + } + } +}
\ No newline at end of file |