Implement ATOM shader instruction (#1687)

* Implement ATOM shader instruction

* Fix reduction type decoding
This commit is contained in:
gdkchan 2020-11-09 21:06:46 -03:00 committed by GitHub
parent 934a78005e
commit c3d62bd078
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 22 deletions

View file

@ -8,10 +8,6 @@ namespace Ryujinx.Graphics.Shader.Decoders
public Register Ra { get; }
public Register Rb { get; }
public ReductionType Type { get; }
public int Offset { get; }
public bool Extended { get; }
public AtomicOp AtomicOp { get; }
@ -24,15 +20,6 @@ namespace Ryujinx.Graphics.Shader.Decoders
Ra = new Register(opCode.Extract(8, 8), RegisterType.Gpr);
Rb = new Register(opCode.Extract(20, 8), RegisterType.Gpr);
Type = (ReductionType)opCode.Extract(28, 2);
if (Type == ReductionType.FP32FtzRn)
{
Type = ReductionType.S64;
}
Offset = opCode.Extract(30, 22);
Extended = opCode.Extract(48);
AtomicOp = (AtomicOp)opCode.Extract(52, 4);