diff options
| author | gdk <gab.dark.100@gmail.com> | 2019-10-13 03:02:07 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 1876b346fea647e8284a66bb6d62c38801035cff (patch) | |
| tree | 6eeff094298cda84d1613dc5ec0691e51d7b35f1 /Ryujinx.Graphics/Shader/Decoders | |
| parent | f617fb542a0e3d36012d77a4b5acbde7b08902f2 (diff) | |
Initial work
Diffstat (limited to 'Ryujinx.Graphics/Shader/Decoders')
87 files changed, 0 insertions, 2231 deletions
diff --git a/Ryujinx.Graphics/Shader/Decoders/BitfieldExtensions.cs b/Ryujinx.Graphics/Shader/Decoders/BitfieldExtensions.cs deleted file mode 100644 index 3bb9bc1f..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/BitfieldExtensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - static class BitfieldExtensions - { - public static bool Extract(this int value, int lsb) - { - return ((int)(value >> lsb) & 1) != 0; - } - - public static int Extract(this int value, int lsb, int length) - { - return (int)(value >> lsb) & (int)(uint.MaxValue >> (32 - length)); - } - - public static bool Extract(this long value, int lsb) - { - return ((int)(value >> lsb) & 1) != 0; - } - - public static int Extract(this long value, int lsb, int length) - { - return (int)(value >> lsb) & (int)(uint.MaxValue >> (32 - length)); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/Block.cs b/Ryujinx.Graphics/Shader/Decoders/Block.cs deleted file mode 100644 index b5e610d7..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/Block.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class Block - { - public ulong Address { get; set; } - public ulong EndAddress { get; set; } - - public Block Next { get; set; } - public Block Branch { get; set; } - - public List<OpCode> OpCodes { get; } - public List<OpCodeSsy> SsyOpCodes { get; } - - public Block(ulong address) - { - Address = address; - - OpCodes = new List<OpCode>(); - SsyOpCodes = new List<OpCodeSsy>(); - } - - public void Split(Block rightBlock) - { - int splitIndex = BinarySearch(OpCodes, rightBlock.Address); - - if (OpCodes[splitIndex].Address < rightBlock.Address) - { - splitIndex++; - } - - int splitCount = OpCodes.Count - splitIndex; - - if (splitCount <= 0) - { - throw new ArgumentException("Can't split at right block address."); - } - - rightBlock.EndAddress = EndAddress; - - rightBlock.Next = Next; - rightBlock.Branch = Branch; - - rightBlock.OpCodes.AddRange(OpCodes.GetRange(splitIndex, splitCount)); - - rightBlock.UpdateSsyOpCodes(); - - EndAddress = rightBlock.Address; - - Next = rightBlock; - Branch = null; - - OpCodes.RemoveRange(splitIndex, splitCount); - - UpdateSsyOpCodes(); - } - - private static int BinarySearch(List<OpCode> opCodes, ulong address) - { - int left = 0; - int middle = 0; - int right = opCodes.Count - 1; - - while (left <= right) - { - int size = right - left; - - middle = left + (size >> 1); - - OpCode opCode = opCodes[middle]; - - if (address == opCode.Address) - { - break; - } - - if (address < opCode.Address) - { - right = middle - 1; - } - else - { - left = middle + 1; - } - } - - return middle; - } - - public OpCode GetLastOp() - { - if (OpCodes.Count != 0) - { - return OpCodes[OpCodes.Count - 1]; - } - - return null; - } - - public void UpdateSsyOpCodes() - { - SsyOpCodes.Clear(); - - for (int index = 0; index < OpCodes.Count; index++) - { - if (!(OpCodes[index] is OpCodeSsy op)) - { - continue; - } - - SsyOpCodes.Add(op); - } - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/Condition.cs b/Ryujinx.Graphics/Shader/Decoders/Condition.cs deleted file mode 100644 index 10400f94..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/Condition.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum Condition - { - Less = 1 << 0, - Equal = 1 << 1, - Greater = 1 << 2, - Nan = 1 << 3, - Unsigned = 1 << 4, - - Never = 0, - - LessOrEqual = Less | Equal, - NotEqual = Less | Greater, - GreaterOrEqual = Greater | Equal, - Number = Greater | Equal | Less, - - LessUnordered = Less | Nan, - EqualUnordered = Equal | Nan, - LessOrEqualUnordered = LessOrEqual | Nan, - GreaterUnordered = Greater | Nan, - NotEqualUnordered = NotEqual | Nan, - GreaterOrEqualUnordered = GreaterOrEqual | Nan, - - Always = 0xf, - - Off = Unsigned | Never, - Lower = Unsigned | Less, - Sff = Unsigned | Equal, - LowerOrSame = Unsigned | LessOrEqual, - Higher = Unsigned | Greater, - Sft = Unsigned | NotEqual, - HigherOrSame = Unsigned | GreaterOrEqual, - Oft = Unsigned | Always, - - CsmTa = 0x18, - CsmTr = 0x19, - CsmMx = 0x1a, - FcsmTa = 0x1b, - FcsmTr = 0x1c, - FcsmMx = 0x1d, - Rle = 0x1e, - Rgt = 0x1f - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/ConditionalOperation.cs b/Ryujinx.Graphics/Shader/Decoders/ConditionalOperation.cs deleted file mode 100644 index 4fc31e84..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/ConditionalOperation.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum ConditionalOperation - { - False = 0, - True = 1, - Zero = 2, - NotZero = 3 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/Decoder.cs b/Ryujinx.Graphics/Shader/Decoders/Decoder.cs deleted file mode 100644 index 754e0388..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/Decoder.cs +++ /dev/null @@ -1,406 +0,0 @@ -using Ryujinx.Graphics.Gal; -using Ryujinx.Graphics.Shader.Instructions; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Reflection.Emit; - -using static Ryujinx.Graphics.Shader.IntermediateRepresentation.OperandHelper; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - static class Decoder - { - private const long HeaderSize = 0x50; - - private delegate object OpActivator(InstEmitter emitter, ulong address, long opCode); - - private static ConcurrentDictionary<Type, OpActivator> _opActivators; - - static Decoder() - { - _opActivators = new ConcurrentDictionary<Type, OpActivator>(); - } - - public static Block[] Decode(IGalMemory memory, ulong address) - { - List<Block> blocks = new List<Block>(); - - Queue<Block> workQueue = new Queue<Block>(); - - Dictionary<ulong, Block> visited = new Dictionary<ulong, Block>(); - - Block GetBlock(ulong blkAddress) - { - if (!visited.TryGetValue(blkAddress, out Block block)) - { - block = new Block(blkAddress); - - workQueue.Enqueue(block); - - visited.Add(blkAddress, block); - } - - return block; - } - - ulong startAddress = address + HeaderSize; - - GetBlock(startAddress); - - while (workQueue.TryDequeue(out Block currBlock)) - { - // Check if the current block is inside another block. - if (BinarySearch(blocks, currBlock.Address, out int nBlkIndex)) - { - Block nBlock = blocks[nBlkIndex]; - - if (nBlock.Address == currBlock.Address) - { - throw new InvalidOperationException("Found duplicate block address on the list."); - } - - nBlock.Split(currBlock); - - blocks.Insert(nBlkIndex + 1, currBlock); - - continue; - } - - // If we have a block after the current one, set the limit address. - ulong limitAddress = ulong.MaxValue; - - if (nBlkIndex != blocks.Count) - { - Block nBlock = blocks[nBlkIndex]; - - int nextIndex = nBlkIndex + 1; - - if (nBlock.Address < currBlock.Address && nextIndex < blocks.Count) - { - limitAddress = blocks[nextIndex].Address; - } - else if (nBlock.Address > currBlock.Address) - { - limitAddress = blocks[nBlkIndex].Address; - } - } - - FillBlock(memory, currBlock, limitAddress, startAddress); - - if (currBlock.OpCodes.Count != 0) - { - foreach (OpCodeSsy ssyOp in currBlock.SsyOpCodes) - { - GetBlock(ssyOp.GetAbsoluteAddress()); - } - - // Set child blocks. "Branch" is the block the branch instruction - // points to (when taken), "Next" is the block at the next address, - // executed when the branch is not taken. For Unconditional Branches - // or end of program, Next is null. - OpCode lastOp = currBlock.GetLastOp(); - - if (lastOp is OpCodeBranch op) - { - currBlock.Branch = GetBlock(op.GetAbsoluteAddress()); - } - - if (!IsUnconditionalBranch(lastOp)) - { - currBlock.Next = GetBlock(currBlock.EndAddress); - } - } - - // Insert the new block on the list (sorted by address). - if (blocks.Count != 0) - { - Block nBlock = blocks[nBlkIndex]; - - blocks.Insert(nBlkIndex + (nBlock.Address < currBlock.Address ? 1 : 0), currBlock); - } - else - { - blocks.Add(currBlock); - } - } - - foreach (Block ssyBlock in blocks.Where(x => x.SsyOpCodes.Count != 0)) - { - for (int ssyIndex = 0; ssyIndex < ssyBlock.SsyOpCodes.Count; ssyIndex++) - { - PropagateSsy(visited, ssyBlock, ssyIndex); - } - } - - return blocks.ToArray(); - } - - private static bool BinarySearch(List<Block> blocks, ulong address, out int index) - { - index = 0; - - int left = 0; - int right = blocks.Count - 1; - - while (left <= right) - { - int size = right - left; - - int middle = left + (size >> 1); - - Block block = blocks[middle]; - - index = middle; - - if (address >= block.Address && address < block.EndAddress) - { - return true; - } - - if (address < block.Address) - { - right = middle - 1; - } - else - { - left = middle + 1; - } - } - - return false; - } - - private static void FillBlock( - IGalMemory memory, - Block block, - ulong limitAddress, - ulong startAddress) - { - ulong address = block.Address; - - do - { - if (address >= limitAddress) - { - break; - } - - // Ignore scheduling instructions, which are written every 32 bytes. - if (((address - startAddress) & 0x1f) == 0) - { - address += 8; - - continue; - } - - uint word0 = (uint)memory.ReadInt32((long)(address + 0)); - uint word1 = (uint)memory.ReadInt32((long)(address + 4)); - - ulong opAddress = address; - - address += 8; - - long opCode = word0 | (long)word1 << 32; - - (InstEmitter emitter, Type opCodeType) = OpCodeTable.GetEmitter(opCode); - - if (emitter == null) - { - // TODO: Warning, illegal encoding. - continue; - } - - OpCode op = MakeOpCode(opCodeType, emitter, opAddress, opCode); - - block.OpCodes.Add(op); - } - while (!IsBranch(block.GetLastOp())); - - block.EndAddress = address; - - block.UpdateSsyOpCodes(); - } - - private static bool IsUnconditionalBranch(OpCode opCode) - { - return IsUnconditional(opCode) && IsBranch(opCode); - } - - private static bool IsUnconditional(OpCode opCode) - { - if (opCode is OpCodeExit op && op.Condition != Condition.Always) - { - return false; - } - - return opCode.Predicate.Index == RegisterConsts.PredicateTrueIndex && !opCode.InvertPredicate; - } - - private static bool IsBranch(OpCode opCode) - { - return (opCode is OpCodeBranch && opCode.Emitter != InstEmit.Ssy) || - opCode is OpCodeSync || - opCode is OpCodeExit; - } - - private static OpCode MakeOpCode(Type type, InstEmitter emitter, ulong address, long opCode) - { - if (type == null) - { - throw new ArgumentNullException(nameof(type)); - } - - OpActivator createInstance = _opActivators.GetOrAdd(type, CacheOpActivator); - - return (OpCode)createInstance(emitter, address, opCode); - } - - private static OpActivator CacheOpActivator(Type type) - { - Type[] argTypes = new Type[] { typeof(InstEmitter), typeof(ulong), typeof(long) }; - - DynamicMethod mthd = new DynamicMethod($"Make{type.Name}", type, argTypes); - - ILGenerator generator = mthd.GetILGenerator(); - - generator.Emit(OpCodes.Ldarg_0); - generator.Emit(OpCodes.Ldarg_1); - generator.Emit(OpCodes.Ldarg_2); - generator.Emit(OpCodes.Newobj, type.GetConstructor(argTypes)); - generator.Emit(OpCodes.Ret); - - return (OpActivator)mthd.CreateDelegate(typeof(OpActivator)); - } - - private struct PathBlockState - { - public Block Block { get; } - - private enum RestoreType - { - None, - PopSsy, - PushSync - } - - private RestoreType _restoreType; - - private ulong _restoreValue; - - public bool ReturningFromVisit => _restoreType != RestoreType.None; - - public PathBlockState(Block block) - { - Block = block; - _restoreType = RestoreType.None; - _restoreValue = 0; - } - - public PathBlockState(int oldSsyStackSize) - { - Block = null; - _restoreType = RestoreType.PopSsy; - _restoreValue = (ulong)oldSsyStackSize; - } - - public PathBlockState(ulong syncAddress) - { - Block = null; - _restoreType = RestoreType.PushSync; - _restoreValue = syncAddress; - } - - public void RestoreStackState(Stack<ulong> ssyStack) - { - if (_restoreType == RestoreType.PushSync) - { - ssyStack.Push(_restoreValue); - } - else if (_restoreType == RestoreType.PopSsy) - { - while (ssyStack.Count > (uint)_restoreValue) - { - ssyStack.Pop(); - } - } - } - } - - private static void PropagateSsy(Dictionary<ulong, Block> blocks, Block ssyBlock, int ssyIndex) - { - OpCodeSsy ssyOp = ssyBlock.SsyOpCodes[ssyIndex]; - - Stack<PathBlockState> workQueue = new Stack<PathBlockState>(); - - HashSet<Block> visited = new HashSet<Block>(); - - Stack<ulong> ssyStack = new Stack<ulong>(); - - void Push(PathBlockState pbs) - { - if (pbs.Block == null || visited.Add(pbs.Block)) - { - workQueue.Push(pbs); - } - } - - Push(new PathBlockState(ssyBlock)); - - while (workQueue.TryPop(out PathBlockState pbs)) - { - if (pbs.ReturningFromVisit) - { - pbs.RestoreStackState(ssyStack); - - continue; - } - - Block current = pbs.Block; - - int ssyOpCodesCount = current.SsyOpCodes.Count; - - if (ssyOpCodesCount != 0) - { - Push(new PathBlockState(ssyStack.Count)); - - for (int index = ssyIndex; index < ssyOpCodesCount; index++) - { - ssyStack.Push(current.SsyOpCodes[index].GetAbsoluteAddress()); - } - } - - ssyIndex = 0; - - if (current.Next != null) - { - Push(new PathBlockState(current.Next)); - } - - if (current.Branch != null) - { - Push(new PathBlockState(current.Branch)); - } - else if (current.GetLastOp() is OpCodeSync op) - { - ulong syncAddress = ssyStack.Pop(); - - if (ssyStack.Count == 0) - { - ssyStack.Push(syncAddress); - - op.Targets.Add(ssyOp, op.Targets.Count); - - ssyOp.Syncs.TryAdd(op, Local()); - } - else - { - Push(new PathBlockState(syncAddress)); - Push(new PathBlockState(blocks[syncAddress])); - } - } - } - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/DecoderHelper.cs b/Ryujinx.Graphics/Shader/Decoders/DecoderHelper.cs deleted file mode 100644 index fd0a45e8..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/DecoderHelper.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - static class DecoderHelper - { - public static int DecodeS20Immediate(long opCode) - { - int imm = opCode.Extract(20, 19); - - bool negate = opCode.Extract(56); - - if (negate) - { - imm = -imm; - } - - return imm; - } - - public static int Decode2xF10Immediate(long opCode) - { - int immH0 = opCode.Extract(20, 9); - int immH1 = opCode.Extract(30, 9); - - bool negateH0 = opCode.Extract(29); - bool negateH1 = opCode.Extract(56); - - if (negateH0) - { - immH0 |= 1 << 9; - } - - if (negateH1) - { - immH1 |= 1 << 9; - } - - return immH1 << 22 | immH0 << 6; - } - - public static float DecodeF20Immediate(long opCode) - { - int imm = opCode.Extract(20, 19); - - bool negate = opCode.Extract(56); - - imm <<= 12; - - if (negate) - { - imm |= 1 << 31; - } - - return BitConverter.Int32BitsToSingle(imm); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/FPHalfSwizzle.cs b/Ryujinx.Graphics/Shader/Decoders/FPHalfSwizzle.cs deleted file mode 100644 index 3ddf17cf..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/FPHalfSwizzle.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum FPHalfSwizzle - { - FP16 = 0, - FP32 = 1, - DupH0 = 2, - DupH1 = 3 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/FPType.cs b/Ryujinx.Graphics/Shader/Decoders/FPType.cs deleted file mode 100644 index e602ad45..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/FPType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum FPType - { - FP16 = 1, - FP32 = 2, - FP64 = 3 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/FmulScale.cs b/Ryujinx.Graphics/Shader/Decoders/FmulScale.cs deleted file mode 100644 index c35c6e48..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/FmulScale.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum FmulScale - { - None = 0, - Divide2 = 1, - Divide4 = 2, - Divide8 = 3, - Multiply8 = 4, - Multiply4 = 5, - Multiply2 = 6 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCode.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCode.cs deleted file mode 100644 index dd6ad79a..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCode.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCode - { - InstEmitter Emitter { get; } - - ulong Address { get; } - long RawOpCode { get; } - - Register Predicate { get; } - - bool InvertPredicate { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeAlu.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeAlu.cs deleted file mode 100644 index d840d49d..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeAlu.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeAlu : IOpCodeRd, IOpCodeRa - { - Register Predicate39 { get; } - - bool InvertP { get; } - bool Extended { get; } - bool SetCondCode { get; } - bool Saturate { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeCbuf.cs deleted file mode 100644 index 42a17451..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeCbuf.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeCbuf : IOpCode - { - int Offset { get; } - int Slot { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeFArith.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeFArith.cs deleted file mode 100644 index d68ccf59..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeFArith.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeFArith : IOpCodeAlu - { - RoundingMode RoundingMode { get; } - - FmulScale Scale { get; } - - bool FlushToZero { get; } - bool AbsoluteA { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeHfma.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeHfma.cs deleted file mode 100644 index 4638f660..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeHfma.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeHfma : IOpCode - { - bool NegateB { get; } - bool NegateC { get; } - bool Saturate { get; } - - FPHalfSwizzle SwizzleA { get; } - FPHalfSwizzle SwizzleB { get; } - FPHalfSwizzle SwizzleC { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeImm.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeImm.cs deleted file mode 100644 index 9cfcd69b..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeImm.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeImm : IOpCode - { - int Immediate { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeImmF.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeImmF.cs deleted file mode 100644 index 629eff79..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeImmF.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeImmF : IOpCode - { - float Immediate { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeLop.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeLop.cs deleted file mode 100644 index 62c87bf4..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeLop.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeLop : IOpCodeAlu - { - LogicalOperation LogicalOp { get; } - - bool InvertA { get; } - bool InvertB { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeRa.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeRa.cs deleted file mode 100644 index e5902110..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeRa.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeRa : IOpCode - { - Register Ra { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeRc.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeRc.cs deleted file mode 100644 index bb806b95..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeRc.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeRc : IOpCode - { - Register Rc { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeRd.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeRd.cs deleted file mode 100644 index 099c4061..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeRd.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeRd : IOpCode - { - Register Rd { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeReg.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeReg.cs deleted file mode 100644 index 3ed157e8..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeReg.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeReg : IOpCode - { - Register Rb { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IOpCodeRegCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/IOpCodeRegCbuf.cs deleted file mode 100644 index 429f01bb..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IOpCodeRegCbuf.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - interface IOpCodeRegCbuf : IOpCodeRc - { - int Offset { get; } - int Slot { get; } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IntegerCondition.cs b/Ryujinx.Graphics/Shader/Decoders/IntegerCondition.cs deleted file mode 100644 index a1937c2f..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IntegerCondition.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum IntegerCondition - { - Less = 1 << 0, - Equal = 1 << 1, - Greater = 1 << 2, - - Never = 0, - - LessOrEqual = Less | Equal, - NotEqual = Less | Greater, - GreaterOrEqual = Greater | Equal, - Number = Greater | Equal | Less, - - Always = 7 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IntegerHalfPart.cs b/Ryujinx.Graphics/Shader/Decoders/IntegerHalfPart.cs deleted file mode 100644 index b779f44d..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IntegerHalfPart.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum IntegerHalfPart - { - B32 = 0, - H0 = 1, - H1 = 2 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IntegerShift.cs b/Ryujinx.Graphics/Shader/Decoders/IntegerShift.cs deleted file mode 100644 index ce4d9f3b..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IntegerShift.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum IntegerShift - { - NoShift = 0, - ShiftRight = 1, - ShiftLeft = 2 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IntegerSize.cs b/Ryujinx.Graphics/Shader/Decoders/IntegerSize.cs deleted file mode 100644 index 70fdfc3d..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IntegerSize.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum IntegerSize - { - U8 = 0, - S8 = 1, - U16 = 2, - S16 = 3, - B32 = 4, - B64 = 5 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/IntegerType.cs b/Ryujinx.Graphics/Shader/Decoders/IntegerType.cs deleted file mode 100644 index 46734dbe..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/IntegerType.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum IntegerType - { - U8 = 0, - U16 = 1, - U32 = 2, - U64 = 3, - S8 = 4, - S16 = 5, - S32 = 6, - S64 = 7 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/LogicalOperation.cs b/Ryujinx.Graphics/Shader/Decoders/LogicalOperation.cs deleted file mode 100644 index 52214425..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/LogicalOperation.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum LogicalOperation - { - And = 0, - Or = 1, - ExclusiveOr = 2, - Passthrough = 3 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/MufuOperation.cs b/Ryujinx.Graphics/Shader/Decoders/MufuOperation.cs deleted file mode 100644 index 88bd1f5c..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/MufuOperation.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum MufuOperation - { - Cosine = 0, - Sine = 1, - ExponentB2 = 2, - LogarithmB2 = 3, - Reciprocal = 4, - ReciprocalSquareRoot = 5, - Reciprocal64H = 6, - ReciprocalSquareRoot64H = 7, - SquareRoot = 8 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCode.cs b/Ryujinx.Graphics/Shader/Decoders/OpCode.cs deleted file mode 100644 index 94af49e0..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCode.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCode - { - public InstEmitter Emitter { get; } - - public ulong Address { get; } - public long RawOpCode { get; } - - public Register Predicate { get; protected set; } - - public bool InvertPredicate { get; protected set; } - - // When inverted, the always true predicate == always false. - public bool NeverExecute => Predicate.Index == RegisterConsts.PredicateTrueIndex && InvertPredicate; - - public OpCode(InstEmitter emitter, ulong address, long opCode) - { - Emitter = emitter; - Address = address; - RawOpCode = opCode; - - Predicate = new Register(opCode.Extract(16, 3), RegisterType.Predicate); - - InvertPredicate = opCode.Extract(19); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeAlu.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeAlu.cs deleted file mode 100644 index 15fbb9af..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeAlu.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeAlu : OpCode, IOpCodeAlu, IOpCodeRc - { - public Register Rd { get; } - public Register Ra { get; } - public Register Rc { get; } - public Register Predicate39 { get; } - - public int ByteSelection { get; } - - public bool InvertP { get; } - public bool Extended { get; protected set; } - public bool SetCondCode { get; protected set; } - public bool Saturate { get; protected set; } - - public OpCodeAlu(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); - Predicate39 = new Register(opCode.Extract(39, 3), RegisterType.Predicate); - - ByteSelection = opCode.Extract(41, 2); - - InvertP = opCode.Extract(42); - Extended = opCode.Extract(43); - SetCondCode = opCode.Extract(47); - Saturate = opCode.Extract(50); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeAluCbuf.cs deleted file mode 100644 index 9c127989..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluCbuf.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeAluCbuf : OpCodeAlu, IOpCodeCbuf - { - public int Offset { get; } - public int Slot { get; } - - public OpCodeAluCbuf(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = opCode.Extract(20, 14); - Slot = opCode.Extract(34, 5); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm.cs deleted file mode 100644 index a407fc6b..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeAluImm : OpCodeAlu, IOpCodeImm - { - public int Immediate { get; } - - public OpCodeAluImm(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = DecoderHelper.DecodeS20Immediate(opCode); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm2x10.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm2x10.cs deleted file mode 100644 index 9aeb32bd..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm2x10.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeAluImm2x10 : OpCodeAlu, IOpCodeImm - { - public int Immediate { get; } - - public OpCodeAluImm2x10(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = DecoderHelper.Decode2xF10Immediate(opCode); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm32.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm32.cs deleted file mode 100644 index 5941e0b9..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluImm32.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeAluImm32 : OpCodeAlu, IOpCodeImm - { - public int Immediate { get; } - - public OpCodeAluImm32(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = opCode.Extract(20, 32); - - SetCondCode = opCode.Extract(52); - Extended = opCode.Extract(53); - Saturate = opCode.Extract(54); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluReg.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeAluReg.cs deleted file mode 100644 index 13b96a3a..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluReg.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeAluReg : OpCodeAlu, IOpCodeReg - { - public Register Rb { get; protected set; } - - public OpCodeAluReg(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Rb = new Register(opCode.Extract(20, 8), RegisterType.Gpr); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluRegCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeAluRegCbuf.cs deleted file mode 100644 index 6cf6bd2e..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeAluRegCbuf.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeAluRegCbuf : OpCodeAluReg, IOpCodeRegCbuf - { - public int Offset { get; } - public int Slot { get; } - - public OpCodeAluRegCbuf(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = opCode.Extract(20, 14); - Slot = opCode.Extract(34, 5); - - Rb = new Register(opCode.Extract(39, 8), RegisterType.Gpr); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeAttribute.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeAttribute.cs deleted file mode 100644 index fd8e63fc..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeAttribute.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeAttribute : OpCodeAluReg - { - public int AttributeOffset { get; } - public int Count { get; } - - public OpCodeAttribute(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - AttributeOffset = opCode.Extract(20, 10); - Count = opCode.Extract(47, 2) + 1; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeBranch.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeBranch.cs deleted file mode 100644 index 25941b39..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeBranch.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeBranch : OpCode - { - public int Offset { get; } - - public OpCodeBranch(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = ((int)(opCode >> 20) << 8) >> 8; - } - - public ulong GetAbsoluteAddress() - { - return (ulong)((long)Address + (long)Offset + 8); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeExit.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeExit.cs deleted file mode 100644 index d50903eb..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeExit.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeExit : OpCode - { - public Condition Condition { get; } - - public OpCodeExit(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Condition = (Condition)opCode.Extract(0, 5); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArith.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeFArith.cs deleted file mode 100644 index c88f7f0e..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArith.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeFArith : OpCodeAlu, IOpCodeFArith - { - public RoundingMode RoundingMode { get; } - - public FmulScale Scale { get; } - - public bool FlushToZero { get; } - public bool AbsoluteA { get; } - - public OpCodeFArith(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - RoundingMode = (RoundingMode)opCode.Extract(39, 2); - - Scale = (FmulScale)opCode.Extract(41, 3); - - FlushToZero = opCode.Extract(44); - AbsoluteA = opCode.Extract(46); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithCbuf.cs deleted file mode 100644 index 5486bb0b..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithCbuf.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeFArithCbuf : OpCodeFArith, IOpCodeCbuf - { - public int Offset { get; } - public int Slot { get; } - - public OpCodeFArithCbuf(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = opCode.Extract(20, 14); - Slot = opCode.Extract(34, 5); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithImm.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithImm.cs deleted file mode 100644 index 1bb6f425..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithImm.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeFArithImm : OpCodeFArith, IOpCodeImmF - { - public float Immediate { get; } - - public OpCodeFArithImm(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = DecoderHelper.DecodeF20Immediate(opCode); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithImm32.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithImm32.cs deleted file mode 100644 index ec9da6f3..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithImm32.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; -using System; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeFArithImm32 : OpCodeAlu, IOpCodeFArith, IOpCodeImmF - { - public RoundingMode RoundingMode => RoundingMode.ToNearest; - - public FmulScale Scale => FmulScale.None; - - public bool FlushToZero { get; } - public bool AbsoluteA { get; } - - public float Immediate { get; } - - public OpCodeFArithImm32(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - int imm = opCode.Extract(20, 32); - - Immediate = BitConverter.Int32BitsToSingle(imm); - - SetCondCode = opCode.Extract(52); - AbsoluteA = opCode.Extract(54); - FlushToZero = opCode.Extract(55); - - Saturate = false; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithReg.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithReg.cs deleted file mode 100644 index 55cf4485..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithReg.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeFArithReg : OpCodeFArith, IOpCodeReg - { - public Register Rb { get; protected set; } - - public OpCodeFArithReg(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Rb = new Register(opCode.Extract(20, 8), RegisterType.Gpr); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithRegCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithRegCbuf.cs deleted file mode 100644 index 315c2c8b..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeFArithRegCbuf.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeFArithRegCbuf : OpCodeFArith, IOpCodeRegCbuf - { - public int Offset { get; } - public int Slot { get; } - - public OpCodeFArithRegCbuf(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = opCode.Extract(20, 14); - Slot = opCode.Extract(34, 5); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeFsetImm.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeFsetImm.cs deleted file mode 100644 index cb5f155e..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeFsetImm.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeFsetImm : OpCodeSet, IOpCodeImmF - { - public float Immediate { get; } - - public OpCodeFsetImm(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = DecoderHelper.DecodeF20Immediate(opCode); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfma.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeHfma.cs deleted file mode 100644 index 32f3cd7a..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfma.cs +++ /dev/null @@ -1,22 +0,0 @@ -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); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaCbuf.cs deleted file mode 100644 index 33768c7d..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaCbuf.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeHfmaCbuf : OpCodeHfma, IOpCodeHfma, IOpCodeCbuf - { - public int Offset { get; } - public int Slot { get; } - - public bool NegateB { get; } - public bool NegateC { get; } - public bool Saturate { get; } - - public FPHalfSwizzle SwizzleB => FPHalfSwizzle.FP32; - public FPHalfSwizzle SwizzleC { get; } - - public OpCodeHfmaCbuf(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = opCode.Extract(20, 14); - Slot = opCode.Extract(34, 5); - - NegateC = opCode.Extract(51); - Saturate = opCode.Extract(52); - - SwizzleC = (FPHalfSwizzle)opCode.Extract(53, 2); - - NegateB = opCode.Extract(56); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaImm2x10.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaImm2x10.cs deleted file mode 100644 index 80a5a140..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaImm2x10.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeHfmaImm2x10 : OpCodeHfma, IOpCodeHfma, IOpCodeImm - { - public int Immediate { get; } - - public bool NegateB => false; - public bool NegateC { get; } - public bool Saturate { get; } - - public FPHalfSwizzle SwizzleB => FPHalfSwizzle.FP16; - public FPHalfSwizzle SwizzleC { get; } - - public OpCodeHfmaImm2x10(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = DecoderHelper.Decode2xF10Immediate(opCode); - - NegateC = opCode.Extract(51); - Saturate = opCode.Extract(52); - - SwizzleC = (FPHalfSwizzle)opCode.Extract(53, 2); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaImm32.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaImm32.cs deleted file mode 100644 index 05eb9ffe..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaImm32.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeHfmaImm32 : OpCodeHfma, IOpCodeHfma, IOpCodeImm - { - public int Immediate { get; } - - public bool NegateB => false; - public bool NegateC { get; } - public bool Saturate => false; - - public FPHalfSwizzle SwizzleB => FPHalfSwizzle.FP16; - public FPHalfSwizzle SwizzleC => FPHalfSwizzle.FP16; - - public OpCodeHfmaImm32(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = opCode.Extract(20, 32); - - NegateC = opCode.Extract(52); - - Rc = Rd; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaReg.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaReg.cs deleted file mode 100644 index 714c89de..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaReg.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeHfmaReg : OpCodeHfma, IOpCodeHfma, IOpCodeReg - { - public Register Rb { get; } - - public bool NegateB { get; } - public bool NegateC { get; } - public bool Saturate { get; } - - public FPHalfSwizzle SwizzleB { get; } - public FPHalfSwizzle SwizzleC { get; } - - public OpCodeHfmaReg(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Rb = new Register(opCode.Extract(20, 8), RegisterType.Gpr); - - SwizzleB = (FPHalfSwizzle)opCode.Extract(28, 2); - - NegateC = opCode.Extract(30); - NegateB = opCode.Extract(31); - Saturate = opCode.Extract(32); - - SwizzleC = (FPHalfSwizzle)opCode.Extract(35, 2); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaRegCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaRegCbuf.cs deleted file mode 100644 index c0001908..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeHfmaRegCbuf.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeHfmaRegCbuf : OpCodeHfma, IOpCodeHfma, IOpCodeRegCbuf - { - public int Offset { get; } - public int Slot { get; } - - public bool NegateB { get; } - public bool NegateC { get; } - public bool Saturate { get; } - - public FPHalfSwizzle SwizzleB { get; } - public FPHalfSwizzle SwizzleC => FPHalfSwizzle.FP32; - - public OpCodeHfmaRegCbuf(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = opCode.Extract(20, 14); - Slot = opCode.Extract(34, 5); - - NegateC = opCode.Extract(51); - Saturate = opCode.Extract(52); - - SwizzleB = (FPHalfSwizzle)opCode.Extract(53, 2); - - NegateB = opCode.Extract(56); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeIpa.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeIpa.cs deleted file mode 100644 index e21095a3..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeIpa.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeIpa : OpCodeAluReg - { - public int AttributeOffset { get; } - - public OpCodeIpa(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - AttributeOffset = opCode.Extract(28, 10); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeLdc.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeLdc.cs deleted file mode 100644 index cc9f0658..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeLdc.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeLdc : OpCode, IOpCodeRd, IOpCodeRa, IOpCodeCbuf - { - public Register Rd { get; } - public Register Ra { get; } - - public int Offset { get; } - public int Slot { get; } - - public IntegerSize Size { get; } - - public OpCodeLdc(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); - - Offset = opCode.Extract(22, 14); - Slot = opCode.Extract(36, 5); - - Size = (IntegerSize)opCode.Extract(48, 3); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeLop.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeLop.cs deleted file mode 100644 index c5f90345..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeLop.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeLop : OpCodeAlu, IOpCodeLop - { - public bool InvertA { get; protected set; } - public bool InvertB { get; protected set; } - - public LogicalOperation LogicalOp { get; } - - public ConditionalOperation CondOp { get; } - - public Register Predicate48 { get; } - - public OpCodeLop(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - InvertA = opCode.Extract(39); - InvertB = opCode.Extract(40); - - LogicalOp = (LogicalOperation)opCode.Extract(41, 2); - - CondOp = (ConditionalOperation)opCode.Extract(44, 2); - - Predicate48 = new Register(opCode.Extract(48, 3), RegisterType.Predicate); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeLopCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeLopCbuf.cs deleted file mode 100644 index f174733c..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeLopCbuf.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeLopCbuf : OpCodeLop, IOpCodeCbuf - { - public int Offset { get; } - public int Slot { get; } - - public OpCodeLopCbuf(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = opCode.Extract(20, 14); - Slot = opCode.Extract(34, 5); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeLopImm.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeLopImm.cs deleted file mode 100644 index a2f091a2..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeLopImm.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeLopImm : OpCodeLop, IOpCodeImm - { - public int Immediate { get; } - - public OpCodeLopImm(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = DecoderHelper.DecodeS20Immediate(opCode); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeLopImm32.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeLopImm32.cs deleted file mode 100644 index cb48f3a6..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeLopImm32.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeLopImm32 : OpCodeAluImm32, IOpCodeLop, IOpCodeImm - { - public LogicalOperation LogicalOp { get; } - - public bool InvertA { get; } - public bool InvertB { get; } - - public OpCodeLopImm32(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - LogicalOp = (LogicalOperation)opCode.Extract(53, 2); - - InvertA = opCode.Extract(55); - InvertB = opCode.Extract(56); - - Extended = opCode.Extract(57); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeLopReg.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeLopReg.cs deleted file mode 100644 index 5f43db72..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeLopReg.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeLopReg : OpCodeLop, IOpCodeReg - { - public Register Rb { get; } - - public OpCodeLopReg(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Rb = new Register(opCode.Extract(20, 8), RegisterType.Gpr); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodePsetp.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodePsetp.cs deleted file mode 100644 index 729e3207..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodePsetp.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodePsetp : OpCodeSet - { - public Register Predicate12 { get; } - public Register Predicate29 { get; } - - public LogicalOperation LogicalOpAB { get; } - - public OpCodePsetp(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Predicate12 = new Register(opCode.Extract(12, 3), RegisterType.Predicate); - Predicate29 = new Register(opCode.Extract(29, 3), RegisterType.Predicate); - - LogicalOpAB = (LogicalOperation)opCode.Extract(24, 2); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeSet.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeSet.cs deleted file mode 100644 index cd6773a1..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeSet.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeSet : OpCodeAlu - { - public Register Predicate0 { get; } - public Register Predicate3 { get; } - - public bool NegateP { get; } - - public LogicalOperation LogicalOp { get; } - - public bool FlushToZero { get; } - - public OpCodeSet(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Predicate0 = new Register(opCode.Extract(0, 3), RegisterType.Predicate); - Predicate3 = new Register(opCode.Extract(3, 3), RegisterType.Predicate); - - LogicalOp = (LogicalOperation)opCode.Extract(45, 2); - - FlushToZero = opCode.Extract(47); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeSetCbuf.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeSetCbuf.cs deleted file mode 100644 index 4f3dbd74..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeSetCbuf.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeSetCbuf : OpCodeSet, IOpCodeCbuf - { - public int Offset { get; } - public int Slot { get; } - - public OpCodeSetCbuf(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Offset = opCode.Extract(20, 14); - Slot = opCode.Extract(34, 5); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeSetImm.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeSetImm.cs deleted file mode 100644 index bc63b9f4..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeSetImm.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeSetImm : OpCodeSet, IOpCodeImm - { - public int Immediate { get; } - - public OpCodeSetImm(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Immediate = DecoderHelper.DecodeS20Immediate(opCode); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeSetReg.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeSetReg.cs deleted file mode 100644 index bbdee196..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeSetReg.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeSetReg : OpCodeSet, IOpCodeReg - { - public Register Rb { get; protected set; } - - public OpCodeSetReg(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Rb = new Register(opCode.Extract(20, 8), RegisterType.Gpr); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeSsy.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeSsy.cs deleted file mode 100644 index 499c0706..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeSsy.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; -using Ryujinx.Graphics.Shader.IntermediateRepresentation; -using System.Collections.Generic; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeSsy : OpCodeBranch - { - public Dictionary<OpCodeSync, Operand> Syncs { get; } - - public OpCodeSsy(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Syncs = new Dictionary<OpCodeSync, Operand>(); - - Predicate = new Register(RegisterConsts.PredicateTrueIndex, RegisterType.Predicate); - - InvertPredicate = false; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeSync.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeSync.cs deleted file mode 100644 index 081d08a0..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeSync.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; -using System.Collections.Generic; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeSync : OpCode - { - public Dictionary<OpCodeSsy, int> Targets { get; } - - public OpCodeSync(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Targets = new Dictionary<OpCodeSsy, int>(); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTable.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTable.cs deleted file mode 100644 index d588ce8e..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTable.cs +++ /dev/null @@ -1,216 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; -using System; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - static class OpCodeTable - { - private const int EncodingBits = 14; - - private class TableEntry - { - public InstEmitter Emitter { get; } - - public Type OpCodeType { get; } - - public int XBits { get; } - - public TableEntry(InstEmitter emitter, Type opCodeType, int xBits) - { - Emitter = emitter; - OpCodeType = opCodeType; - XBits = xBits; - } - } - - private static TableEntry[] _opCodes; - - static OpCodeTable() - { - _opCodes = new TableEntry[1 << EncodingBits]; - -#region Instructions - Set("1110111111011x", InstEmit.Ald, typeof(OpCodeAttribute)); - Set("1110111111110x", InstEmit.Ast, typeof(OpCodeAttribute)); - Set("0100110000000x", InstEmit.Bfe, typeof(OpCodeAluCbuf)); - Set("0011100x00000x", InstEmit.Bfe, typeof(OpCodeAluImm)); - Set("0101110000000x", InstEmit.Bfe, typeof(OpCodeAluReg)); - Set("111000100100xx", InstEmit.Bra, typeof(OpCodeBranch)); - Set("111000110000xx", InstEmit.Exit, typeof(OpCodeExit)); - Set("0100110010101x", InstEmit.F2F, typeof(OpCodeFArithCbuf)); - Set("0011100x10101x", InstEmit.F2F, typeof(OpCodeFArithImm)); - Set("0101110010101x", InstEmit.F2F, typeof(OpCodeFArithReg)); - Set("0100110010110x", InstEmit.F2I, typeof(OpCodeFArithCbuf)); - Set("0011100x10110x", InstEmit.F2I, typeof(OpCodeFArithImm)); - Set("0101110010110x", InstEmit.F2I, typeof(OpCodeFArithReg)); - Set("0100110001011x", InstEmit.Fadd, typeof(OpCodeFArithCbuf)); - Set("0011100x01011x", InstEmit.Fadd, typeof(OpCodeFArithImm)); - Set("000010xxxxxxxx", InstEmit.Fadd, typeof(OpCodeFArithImm32)); - Set("0101110001011x", InstEmit.Fadd, typeof(OpCodeFArithReg)); - Set("010010011xxxxx", InstEmit.Ffma, typeof(OpCodeFArithCbuf)); - Set("0011001x1xxxxx", InstEmit.Ffma, typeof(OpCodeFArithImm)); - Set("010100011xxxxx", InstEmit.Ffma, typeof(OpCodeFArithRegCbuf)); - Set("010110011xxxxx", InstEmit.Ffma, typeof(OpCodeFArithReg)); - Set("0100110001100x", InstEmit.Fmnmx, typeof(OpCodeFArithCbuf)); - Set("0011100x01100x", InstEmit.Fmnmx, typeof(OpCodeFArithImm)); - Set("0101110001100x", InstEmit.Fmnmx, typeof(OpCodeFArithReg)); - Set("0100110001101x", InstEmit.Fmul, typeof(OpCodeFArithCbuf)); - Set("0011100x01101x", InstEmit.Fmul, typeof(OpCodeFArithImm)); - Set("00011110xxxxxx", InstEmit.Fmul, typeof(OpCodeFArithImm32)); - Set("0101110001101x", InstEmit.Fmul, typeof(OpCodeFArithReg)); - Set("0100100xxxxxxx", InstEmit.Fset, typeof(OpCodeSetCbuf)); - Set("0011000xxxxxxx", InstEmit.Fset, typeof(OpCodeFsetImm)); - Set("01011000xxxxxx", InstEmit.Fset, typeof(OpCodeSetReg)); - Set("010010111011xx", InstEmit.Fsetp, typeof(OpCodeSetCbuf)); - Set("0011011x1011xx", InstEmit.Fsetp, typeof(OpCodeFsetImm)); - Set("010110111011xx", InstEmit.Fsetp, typeof(OpCodeSetReg)); - Set("0111101x1xxxxx", InstEmit.Hadd2, typeof(OpCodeAluCbuf)); - Set("0111101x0xxxxx", InstEmit.Hadd2, typeof(OpCodeAluImm2x10)); - Set("0010110xxxxxxx", InstEmit.Hadd2, typeof(OpCodeAluImm32)); - Set("0101110100010x", InstEmit.Hadd2, typeof(OpCodeAluReg)); - Set("01110xxx1xxxxx", InstEmit.Hfma2, typeof(OpCodeHfmaCbuf)); - Set("01110xxx0xxxxx", InstEmit.Hfma2, typeof(OpCodeHfmaImm2x10)); - Set("0010100xxxxxxx", InstEmit.Hfma2, typeof(OpCodeHfmaImm32)); - Set("0101110100000x", InstEmit.Hfma2, typeof(OpCodeHfmaReg)); - Set("01100xxx1xxxxx", InstEmit.Hfma2, typeof(OpCodeHfmaRegCbuf)); - Set("0111100x1xxxxx", InstEmit.Hmul2, typeof(OpCodeAluCbuf)); - Set("0111100x0xxxxx", InstEmit.Hmul2, typeof(OpCodeAluImm2x10)); - Set("0010101xxxxxxx", InstEmit.Hmul2, typeof(OpCodeAluImm32)); - Set("0101110100001x", InstEmit.Hmul2, typeof(OpCodeAluReg)); - Set("0100110010111x", InstEmit.I2F, typeof(OpCodeAluCbuf)); - Set("0011100x10111x", InstEmit.I2F, typeof(OpCodeAluImm)); - Set("0101110010111x", InstEmit.I2F, typeof(OpCodeAluReg)); - Set("0100110011100x", InstEmit.I2I, typeof(OpCodeAluCbuf)); - Set("0011100x11100x", InstEmit.I2I, typeof(OpCodeAluImm)); - Set("0101110011100x", InstEmit.I2I, typeof(OpCodeAluReg)); - Set("0100110000010x", InstEmit.Iadd, typeof(OpCodeAluCbuf)); - Set("0011100000010x", InstEmit.Iadd, typeof(OpCodeAluImm)); - Set("0001110x0xxxxx", InstEmit.Iadd, typeof(OpCodeAluImm32)); - Set("0101110000010x", InstEmit.Iadd, typeof(OpCodeAluReg)); - Set("010011001100xx", InstEmit.Iadd3, typeof(OpCodeAluCbuf)); - Set("001110001100xx", InstEmit.Iadd3, typeof(OpCodeAluImm)); - Set("010111001100xx", InstEmit.Iadd3, typeof(OpCodeAluReg)); - Set("0100110000100x", InstEmit.Imnmx, typeof(OpCodeAluCbuf)); - Set("0011100x00100x", InstEmit.Imnmx, typeof(OpCodeAluImm)); - Set("0101110000100x", InstEmit.Imnmx, typeof(OpCodeAluReg)); - Set("11100000xxxxxx", InstEmit.Ipa, typeof(OpCodeIpa)); - Set("0100110000011x", InstEmit.Iscadd, typeof(OpCodeAluCbuf)); - Set("0011100x00011x", InstEmit.Iscadd, typeof(OpCodeAluImm)); - Set("000101xxxxxxxx", InstEmit.Iscadd, typeof(OpCodeAluImm32)); - Set("0101110000011x", InstEmit.Iscadd, typeof(OpCodeAluReg)); - Set("010010110101xx", InstEmit.Iset, typeof(OpCodeSetCbuf)); - Set("001101100101xx", InstEmit.Iset, typeof(OpCodeSetImm)); - Set("010110110101xx", InstEmit.Iset, typeof(OpCodeSetReg)); - Set("010010110110xx", InstEmit.Isetp, typeof(OpCodeSetCbuf)); - Set("0011011x0110xx", InstEmit.Isetp, typeof(OpCodeSetImm)); - Set("010110110110xx", InstEmit.Isetp, typeof(OpCodeSetReg)); - Set("111000110011xx", InstEmit.Kil, typeof(OpCodeExit)); - Set("1110111110010x", InstEmit.Ldc, typeof(OpCodeLdc)); - Set("0100110001000x", InstEmit.Lop, typeof(OpCodeLopCbuf)); - Set("0011100001000x", InstEmit.Lop, typeof(OpCodeLopImm)); - Set("000001xxxxxxxx", InstEmit.Lop, typeof(OpCodeLopImm32)); - Set("0101110001000x", InstEmit.Lop, typeof(OpCodeLopReg)); - Set("0010000xxxxxxx", InstEmit.Lop3, typeof(OpCodeLopCbuf)); - Set("001111xxxxxxxx", InstEmit.Lop3, typeof(OpCodeLopImm)); - Set("0101101111100x", InstEmit.Lop3, typeof(OpCodeLopReg)); - Set("0100110010011x", InstEmit.Mov, typeof(OpCodeAluCbuf)); - Set("0011100x10011x", InstEmit.Mov, typeof(OpCodeAluImm)); - Set("000000010000xx", InstEmit.Mov, typeof(OpCodeAluImm32)); - Set("0101110010011x", InstEmit.Mov, typeof(OpCodeAluReg)); - Set("0101000010000x", InstEmit.Mufu, typeof(OpCodeFArith)); - Set("1111101111100x", InstEmit.Out, typeof(OpCode)); - Set("0101000010010x", InstEmit.Psetp, typeof(OpCodePsetp)); - Set("0100110010010x", InstEmit.Rro, typeof(OpCodeFArithCbuf)); - Set("0011100x10010x", InstEmit.Rro, typeof(OpCodeFArithImm)); - Set("0101110010010x", InstEmit.Rro, typeof(OpCodeFArithReg)); - Set("0100110010100x", InstEmit.Sel, typeof(OpCodeAluCbuf)); - Set("0011100010100x", InstEmit.Sel, typeof(OpCodeAluImm)); - Set("0101110010100x", InstEmit.Sel, typeof(OpCodeAluReg)); - Set("0100110001001x", InstEmit.Shl, typeof(OpCodeAluCbuf)); - Set("0011100x01001x", InstEmit.Shl, typeof(OpCodeAluImm)); - Set("0101110001001x", InstEmit.Shl, typeof(OpCodeAluReg)); - Set("0100110000101x", InstEmit.Shr, typeof(OpCodeAluCbuf)); - Set("0011100x00101x", InstEmit.Shr, typeof(OpCodeAluImm)); - Set("0101110000101x", InstEmit.Shr, typeof(OpCodeAluReg)); - Set("111000101001xx", InstEmit.Ssy, typeof(OpCodeSsy)); - Set("1111000011111x", InstEmit.Sync, typeof(OpCodeSync)); - Set("110000xxxx111x", InstEmit.Tex, typeof(OpCodeTex)); - Set("1101111010111x", InstEmit.Tex_B, typeof(OpCodeTex)); - Set("1101x00xxxxxxx", InstEmit.Texs, typeof(OpCodeTexs)); - Set("1101x01xxxxxxx", InstEmit.Texs, typeof(OpCodeTlds)); - Set("1101x11100xxxx", InstEmit.Texs, typeof(OpCodeTld4s)); - Set("11011100xx111x", InstEmit.Tld, typeof(OpCodeTld)); - Set("11011101xx111x", InstEmit.Tld_B, typeof(OpCodeTld)); - Set("110010xxxx111x", InstEmit.Tld4, typeof(OpCodeTld4)); - Set("1101111101001x", InstEmit.Txq, typeof(OpCodeTex)); - Set("1101111101010x", InstEmit.Txq_B, typeof(OpCodeTex)); - Set("0100111xxxxxxx", InstEmit.Xmad, typeof(OpCodeAluCbuf)); - Set("0011011x00xxxx", InstEmit.Xmad, typeof(OpCodeAluImm)); - Set("010100010xxxxx", InstEmit.Xmad, typeof(OpCodeAluRegCbuf)); - Set("0101101100xxxx", InstEmit.Xmad, typeof(OpCodeAluReg)); -#endregion - } - - private static void Set(string encoding, InstEmitter emitter, Type opCodeType) - { - if (encoding.Length != EncodingBits) - { - throw new ArgumentException(nameof(encoding)); - } - - int bit = encoding.Length - 1; - int value = 0; - int xMask = 0; - int xBits = 0; - - int[] xPos = new int[encoding.Length]; - - for (int index = 0; index < encoding.Length; index++, bit--) - { - char chr = encoding[index]; - - if (chr == '1') - { - value |= 1 << bit; - } - else if (chr == 'x') - { - xMask |= 1 << bit; - - xPos[xBits++] = bit; - } - } - - xMask = ~xMask; - - TableEntry entry = new TableEntry(emitter, opCodeType, xBits); - - for (int index = 0; index < (1 << xBits); index++) - { - value &= xMask; - - for (int X = 0; X < xBits; X++) - { - value |= ((index >> X) & 1) << xPos[X]; - } - - if (_opCodes[value] == null || _opCodes[value].XBits > xBits) - { - _opCodes[value] = entry; - } - } - } - - public static (InstEmitter emitter, Type opCodeType) GetEmitter(long OpCode) - { - TableEntry entry = _opCodes[(ulong)OpCode >> (64 - EncodingBits)]; - - if (entry != null) - { - return (entry.Emitter, entry.OpCodeType); - } - - return (null, null); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTex.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTex.cs deleted file mode 100644 index da8756b9..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTex.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeTex : OpCodeTexture - { - public OpCodeTex(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - HasDepthCompare = opCode.Extract(50); - - HasOffset = opCode.Extract(54); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTexs.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTexs.cs deleted file mode 100644 index 0822c4c0..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTexs.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeTexs : OpCodeTextureScalar - { - public TextureScalarType Type => (TextureScalarType)RawType; - - public OpCodeTexs(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) { } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTexture.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTexture.cs deleted file mode 100644 index 7a7e8f46..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTexture.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeTexture : OpCode - { - public Register Rd { get; } - public Register Ra { get; } - public Register Rb { get; } - - public bool IsArray { get; } - - public TextureDimensions Dimensions { get; } - - public int ComponentMask { get; } - - public int Immediate { get; } - - public TextureLodMode LodMode { get; protected set; } - - public bool HasOffset { get; protected set; } - public bool HasDepthCompare { get; protected set; } - public bool IsMultisample { get; protected set; } - - public OpCodeTexture(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); - Rb = new Register(opCode.Extract(20, 8), RegisterType.Gpr); - - IsArray = opCode.Extract(28); - - Dimensions = (TextureDimensions)opCode.Extract(29, 2); - - ComponentMask = opCode.Extract(31, 4); - - Immediate = opCode.Extract(36, 13); - - LodMode = (TextureLodMode)opCode.Extract(55, 3); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTextureScalar.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTextureScalar.cs deleted file mode 100644 index 470b81f5..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTextureScalar.cs +++ /dev/null @@ -1,62 +0,0 @@ -// ReSharper disable InconsistentNaming -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeTextureScalar : OpCode - { -#region "Component mask LUT" - private const int ____ = 0x0; - private const int R___ = 0x1; - private const int _G__ = 0x2; - private const int RG__ = 0x3; - private const int __B_ = 0x4; - private const int RGB_ = 0x7; - private const int ___A = 0x8; - private const int R__A = 0x9; - private const int _G_A = 0xa; - private const int RG_A = 0xb; - private const int __BA = 0xc; - private const int R_BA = 0xd; - private const int _GBA = 0xe; - private const int RGBA = 0xf; - - private static int[,] _maskLut = new int[,] - { - { R___, _G__, __B_, ___A, RG__, R__A, _G_A, __BA }, - { RGB_, RG_A, R_BA, _GBA, RGBA, ____, ____, ____ } - }; -#endregion - - public Register Rd0 { get; } - public Register Ra { get; } - public Register Rb { get; } - public Register Rd1 { get; } - - public int Immediate { get; } - - public int ComponentMask { get; } - - protected int RawType; - - public bool IsFp16 { get; } - - public OpCodeTextureScalar(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - Rd0 = new Register(opCode.Extract(0, 8), RegisterType.Gpr); - Ra = new Register(opCode.Extract(8, 8), RegisterType.Gpr); - Rb = new Register(opCode.Extract(20, 8), RegisterType.Gpr); - Rd1 = new Register(opCode.Extract(28, 8), RegisterType.Gpr); - - Immediate = opCode.Extract(36, 13); - - int compSel = opCode.Extract(50, 3); - - RawType = opCode.Extract(53, 4); - - IsFp16 = !opCode.Extract(59); - - ComponentMask = _maskLut[Rd1.IsRZ ? 0 : 1, compSel]; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTld.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTld.cs deleted file mode 100644 index 61bd900b..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTld.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeTld : OpCodeTexture - { - public OpCodeTld(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - HasOffset = opCode.Extract(35); - - IsMultisample = opCode.Extract(50); - - bool isLL = opCode.Extract(55); - - LodMode = isLL - ? TextureLodMode.LodLevel - : TextureLodMode.LodZero; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTld4.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTld4.cs deleted file mode 100644 index 485edf93..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTld4.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeTld4 : OpCodeTexture - { - public TextureGatherOffset Offset { get; } - - public int GatherCompIndex { get; } - - public OpCodeTld4(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - HasDepthCompare = opCode.Extract(50); - - Offset = (TextureGatherOffset)opCode.Extract(54, 2); - - GatherCompIndex = opCode.Extract(56, 2); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTld4s.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTld4s.cs deleted file mode 100644 index 0d7b8460..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTld4s.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeTld4s : OpCodeTextureScalar - { - public bool HasDepthCompare { get; } - public bool HasOffset { get; } - - public int GatherCompIndex { get; } - - public OpCodeTld4s(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) - { - HasDepthCompare = opCode.Extract(50); - HasOffset = opCode.Extract(51); - - GatherCompIndex = opCode.Extract(52, 2); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/OpCodeTlds.cs b/Ryujinx.Graphics/Shader/Decoders/OpCodeTlds.cs deleted file mode 100644 index e117721e..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/OpCodeTlds.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Ryujinx.Graphics.Shader.Instructions; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - class OpCodeTlds : OpCodeTextureScalar - { - public TexelLoadScalarType Type => (TexelLoadScalarType)RawType; - - public OpCodeTlds(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) { } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/Register.cs b/Ryujinx.Graphics/Shader/Decoders/Register.cs deleted file mode 100644 index 30840d8c..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/Register.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -namespace Ryujinx.Graphics.Shader.Decoders -{ - struct Register : IEquatable<Register> - { - public int Index { get; } - - public RegisterType Type { get; } - - public bool IsRZ => Type == RegisterType.Gpr && Index == RegisterConsts.RegisterZeroIndex; - public bool IsPT => Type == RegisterType.Predicate && Index == RegisterConsts.PredicateTrueIndex; - - public Register(int index, RegisterType type) - { - Index = index; - Type = type; - } - - public override int GetHashCode() - { - return (ushort)Index | ((ushort)Type << 16); - } - - public override bool Equals(object obj) - { - return obj is Register reg && Equals(reg); - } - - public bool Equals(Register other) - { - return other.Index == Index && - other.Type == Type; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/RegisterConsts.cs b/Ryujinx.Graphics/Shader/Decoders/RegisterConsts.cs deleted file mode 100644 index d381f954..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/RegisterConsts.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - static class RegisterConsts - { - public const int GprsCount = 255; - public const int PredsCount = 7; - public const int FlagsCount = 4; - public const int TotalCount = GprsCount + PredsCount + FlagsCount; - - public const int RegisterZeroIndex = GprsCount; - public const int PredicateTrueIndex = PredsCount; - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/RegisterType.cs b/Ryujinx.Graphics/Shader/Decoders/RegisterType.cs deleted file mode 100644 index 648f816a..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/RegisterType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum RegisterType - { - Flag, - Gpr, - Predicate, - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/RoundingMode.cs b/Ryujinx.Graphics/Shader/Decoders/RoundingMode.cs deleted file mode 100644 index 13bb08dc..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/RoundingMode.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum RoundingMode - { - ToNearest = 0, - TowardsNegativeInfinity = 1, - TowardsPositiveInfinity = 2, - TowardsZero = 3 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/TexelLoadScalarType.cs b/Ryujinx.Graphics/Shader/Decoders/TexelLoadScalarType.cs deleted file mode 100644 index cef5778a..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/TexelLoadScalarType.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum TexelLoadScalarType - { - Texture1DLodZero = 0x0, - Texture1DLodLevel = 0x1, - Texture2DLodZero = 0x2, - Texture2DLodZeroOffset = 0x4, - Texture2DLodLevel = 0x5, - Texture2DLodZeroMultisample = 0x6, - Texture3DLodZero = 0x7, - Texture2DArrayLodZero = 0x8, - Texture2DLodLevelOffset = 0xc - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/TextureDimensions.cs b/Ryujinx.Graphics/Shader/Decoders/TextureDimensions.cs deleted file mode 100644 index dbdf1927..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/TextureDimensions.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum TextureDimensions - { - Texture1D = 0, - Texture2D = 1, - Texture3D = 2, - TextureCube = 3 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/TextureGatherOffset.cs b/Ryujinx.Graphics/Shader/Decoders/TextureGatherOffset.cs deleted file mode 100644 index 4e9ade26..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/TextureGatherOffset.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum TextureGatherOffset - { - None = 0, - Offset = 1, - Offsets = 2 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/TextureLodMode.cs b/Ryujinx.Graphics/Shader/Decoders/TextureLodMode.cs deleted file mode 100644 index 0cc6f714..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/TextureLodMode.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum TextureLodMode - { - None = 0, - LodZero = 1, - LodBias = 2, - LodLevel = 3, - LodBiasA = 4, //? - LodLevelA = 5 //? - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/TextureProperty.cs b/Ryujinx.Graphics/Shader/Decoders/TextureProperty.cs deleted file mode 100644 index ea35b1d1..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/TextureProperty.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum TextureProperty - { - Dimensions = 0x1, - Type = 0x2, - SamplePos = 0x5, - Filter = 0xa, - Lod = 0xc, - Wrap = 0xe, - BorderColor = 0x10 - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/TextureScalarType.cs b/Ryujinx.Graphics/Shader/Decoders/TextureScalarType.cs deleted file mode 100644 index 0055174b..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/TextureScalarType.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum TextureScalarType - { - Texture1DLodZero = 0x0, - Texture2D = 0x1, - Texture2DLodZero = 0x2, - Texture2DLodLevel = 0x3, - Texture2DDepthCompare = 0x4, - Texture2DLodLevelDepthCompare = 0x5, - Texture2DLodZeroDepthCompare = 0x6, - Texture2DArray = 0x7, - Texture2DArrayLodZero = 0x8, - Texture2DArrayLodZeroDepthCompare = 0x9, - Texture3D = 0xa, - Texture3DLodZero = 0xb, - TextureCube = 0xc, - TextureCubeLodLevel = 0xd - } -}
\ No newline at end of file diff --git a/Ryujinx.Graphics/Shader/Decoders/XmadCMode.cs b/Ryujinx.Graphics/Shader/Decoders/XmadCMode.cs deleted file mode 100644 index 949a2ef7..00000000 --- a/Ryujinx.Graphics/Shader/Decoders/XmadCMode.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Ryujinx.Graphics.Shader.Decoders -{ - enum XmadCMode - { - Cfull = 0, - Clo = 1, - Chi = 2, - Csfu = 3, - Cbcc = 4 - } -}
\ No newline at end of file |
