mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 01:55:27 +00:00
0b6d206daa
* Omit image format if possible, and fix BA bit * Match extension name
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using Ryujinx.Graphics.Shader.Instructions;
|
|
|
|
namespace Ryujinx.Graphics.Shader.Decoders
|
|
{
|
|
class OpCodeImage : OpCode
|
|
{
|
|
public Register Ra { get; }
|
|
public Register Rb { get; }
|
|
public Register Rc { get; }
|
|
|
|
public ImageComponents Components { get; }
|
|
public IntegerSize Size { get; }
|
|
|
|
public bool ByteAddress { get; }
|
|
|
|
public ImageDimensions Dimensions { get; }
|
|
|
|
public int Immediate { get; }
|
|
|
|
public bool UseComponents { get; }
|
|
public bool IsBindless { get; }
|
|
|
|
public OpCodeImage(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode)
|
|
{
|
|
Ra = new Register(opCode.Extract(8, 8), RegisterType.Gpr);
|
|
Rb = new Register(opCode.Extract(0, 8), RegisterType.Gpr);
|
|
Rc = new Register(opCode.Extract(39, 8), RegisterType.Gpr);
|
|
|
|
UseComponents = !opCode.Extract(52);
|
|
|
|
if (UseComponents)
|
|
{
|
|
Components = (ImageComponents)opCode.Extract(20, 4);
|
|
}
|
|
else
|
|
{
|
|
Size = (IntegerSize)opCode.Extract(20, 4);
|
|
}
|
|
|
|
ByteAddress = opCode.Extract(23);
|
|
|
|
Dimensions = (ImageDimensions)opCode.Extract(33, 3);
|
|
|
|
Immediate = opCode.Extract(36, 13);
|
|
IsBindless = !opCode.Extract(51);
|
|
}
|
|
}
|
|
} |