aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Shader/Decoders/OpCodeHfma.cs
blob: 32f3cd7ab8f397afe208f268a2f5652dc6df8571 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using Ryujinx.Graphics.Shader.Instructions;

namespace Ryujinx.Graphics.Shader.Decoders
{
    class OpCodeHfma : OpCode, IOpCodeRd, IOpCodeRa, IOpCodeRc
    {
        public Register Rd { get; }
        public Register Ra { get; }
        public Register Rc { get; protected set; }

        public FPHalfSwizzle SwizzleA { get; }

        public OpCodeHfma(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode)
        {
            Rd = new Register(opCode.Extract(0,  8), RegisterType.Gpr);
            Ra = new Register(opCode.Extract(8,  8), RegisterType.Gpr);
            Rc = new Register(opCode.Extract(39, 8), RegisterType.Gpr);

            SwizzleA = (FPHalfSwizzle)opCode.Extract(47, 2);
        }
    }
}