mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-16 20:21:34 +00:00
Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)
See merge request ryubing/ryujinx!47
This commit is contained in:
parent
d03ae9c164
commit
ea027d65a7
@ -45,10 +45,10 @@ dotnet_separate_import_directive_groups = false
|
|||||||
dotnet_sort_system_directives_first = false
|
dotnet_sort_system_directives_first = false
|
||||||
|
|
||||||
# this. and Me. preferences
|
# this. and Me. preferences
|
||||||
dotnet_style_qualification_for_event = false:silent
|
dotnet_style_qualification_for_event = false:suggestion
|
||||||
dotnet_style_qualification_for_field = false:silent
|
dotnet_style_qualification_for_field = false:suggestion
|
||||||
dotnet_style_qualification_for_method = false:silent
|
dotnet_style_qualification_for_method = false:suggestion
|
||||||
dotnet_style_qualification_for_property = false:silent
|
dotnet_style_qualification_for_property = false:suggestion
|
||||||
|
|
||||||
# Language keywords vs BCL types preferences
|
# Language keywords vs BCL types preferences
|
||||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||||
@ -257,12 +257,14 @@ csharp_prefer_system_threading_lock = true:suggestion
|
|||||||
dotnet_diagnostic.CA1069.severity = none # CA1069: Enums values should not be duplicated
|
dotnet_diagnostic.CA1069.severity = none # CA1069: Enums values should not be duplicated
|
||||||
# Disable Collection initialization can be simplified
|
# Disable Collection initialization can be simplified
|
||||||
dotnet_diagnostic.IDE0028.severity = none
|
dotnet_diagnostic.IDE0028.severity = none
|
||||||
|
dotnet_diagnostic.IDE0079.severity = none # IDE0079: Remove unnecessary suppression
|
||||||
|
dotnet_diagnostic.IDE0130.severity = none # IDE0130: Namespace does not match folder structure
|
||||||
dotnet_diagnostic.IDE0300.severity = none
|
dotnet_diagnostic.IDE0300.severity = none
|
||||||
dotnet_diagnostic.IDE0301.severity = none
|
dotnet_diagnostic.IDE0301.severity = none
|
||||||
dotnet_diagnostic.IDE0302.severity = none
|
dotnet_diagnostic.IDE0302.severity = none
|
||||||
dotnet_diagnostic.IDE0305.severity = none
|
dotnet_diagnostic.IDE0305.severity = none
|
||||||
dotnet_diagnostic.CS9113.severity = none # CS9113: Parameter 'value' is unread
|
dotnet_diagnostic.CS9113.severity = none # CS9113: Parameter 'value' is unread
|
||||||
dotnet_diagnostic.IDE0130.severity = none # IDE0130: Namespace does not match folder structure
|
dotnet_diagnostic.CS0649.severity = none # CS0649: Field is never assigned to, and will always have its default value
|
||||||
|
|
||||||
[src/Ryujinx/UI/ViewModels/**.cs]
|
[src/Ryujinx/UI/ViewModels/**.cs]
|
||||||
# Disable "mark members as static" rule for ViewModels
|
# Disable "mark members as static" rule for ViewModels
|
||||||
|
@ -1129,7 +1129,6 @@ namespace ARMeilleure.CodeGen.Arm64
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable IDE0051 // Remove unused private member
|
|
||||||
private void WriteInt16(short value)
|
private void WriteInt16(short value)
|
||||||
{
|
{
|
||||||
WriteUInt16((ushort)value);
|
WriteUInt16((ushort)value);
|
||||||
@ -1144,7 +1143,6 @@ namespace ARMeilleure.CodeGen.Arm64
|
|||||||
{
|
{
|
||||||
_stream.WriteByte(value);
|
_stream.WriteByte(value);
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
private void WriteUInt16(ushort value)
|
private void WriteUInt16(ushort value)
|
||||||
{
|
{
|
||||||
|
@ -1570,13 +1570,11 @@ namespace ARMeilleure.CodeGen.Arm64
|
|||||||
Debug.Assert(op1.Type == op3.Type);
|
Debug.Assert(op1.Type == op3.Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable IDE0051 // Remove unused private member
|
|
||||||
private static void EnsureSameType(Operand op1, Operand op2, Operand op3, Operand op4)
|
private static void EnsureSameType(Operand op1, Operand op2, Operand op3, Operand op4)
|
||||||
{
|
{
|
||||||
Debug.Assert(op1.Type == op2.Type);
|
Debug.Assert(op1.Type == op2.Type);
|
||||||
Debug.Assert(op1.Type == op3.Type);
|
Debug.Assert(op1.Type == op3.Type);
|
||||||
Debug.Assert(op1.Type == op4.Type);
|
Debug.Assert(op1.Type == op4.Type);
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0051
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
namespace ARMeilleure.CodeGen.X86
|
namespace ARMeilleure.CodeGen.X86
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ namespace ARMeilleure.CodeGen.X86
|
|||||||
{
|
{
|
||||||
if (GetCurrentCallConv() == CallConvName.Windows)
|
if (GetCurrentCallConv() == CallConvName.Windows)
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
|
||||||
return (1 << (int)X86Register.Rax) |
|
return (1 << (int)X86Register.Rax) |
|
||||||
(1 << (int)X86Register.Rcx) |
|
(1 << (int)X86Register.Rcx) |
|
||||||
(1 << (int)X86Register.Rdx) |
|
(1 << (int)X86Register.Rdx) |
|
||||||
@ -40,7 +40,7 @@ namespace ARMeilleure.CodeGen.X86
|
|||||||
(1 << (int)X86Register.R9) |
|
(1 << (int)X86Register.R9) |
|
||||||
(1 << (int)X86Register.R10) |
|
(1 << (int)X86Register.R10) |
|
||||||
(1 << (int)X86Register.R11);
|
(1 << (int)X86Register.R11);
|
||||||
#pragma warning restore IDE0055
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ using ARMeilleure.CodeGen.RegisterAllocators;
|
|||||||
using ARMeilleure.IntermediateRepresentation;
|
using ARMeilleure.IntermediateRepresentation;
|
||||||
using Microsoft.IO;
|
using Microsoft.IO;
|
||||||
using Ryujinx.Common.Memory;
|
using Ryujinx.Common.Memory;
|
||||||
using System.IO;
|
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace ARMeilleure.CodeGen.X86
|
namespace ARMeilleure.CodeGen.X86
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
namespace ARMeilleure.CodeGen.X86
|
namespace ARMeilleure.CodeGen.X86
|
||||||
{
|
{
|
||||||
enum X86Register
|
enum X86Register
|
||||||
|
@ -8,8 +8,8 @@ namespace ARMeilleure.Instructions
|
|||||||
static class CryptoHelper
|
static class CryptoHelper
|
||||||
{
|
{
|
||||||
#region "LookUp Tables"
|
#region "LookUp Tables"
|
||||||
#pragma warning disable IDE1006 // Naming rule violation
|
|
||||||
private static ReadOnlySpan<byte> _sBox =>
|
private static ReadOnlySpan<byte> SBox =>
|
||||||
[
|
[
|
||||||
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
|
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
|
||||||
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
|
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
|
||||||
@ -29,7 +29,7 @@ namespace ARMeilleure.Instructions
|
|||||||
0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
|
0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _invSBox =>
|
private static ReadOnlySpan<byte> InvSBox =>
|
||||||
[
|
[
|
||||||
0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
|
0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
|
||||||
0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,
|
0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,
|
||||||
@ -49,7 +49,7 @@ namespace ARMeilleure.Instructions
|
|||||||
0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d
|
0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _gfMul02 =>
|
private static ReadOnlySpan<byte> GfMul02 =>
|
||||||
[
|
[
|
||||||
0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
|
0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
|
||||||
0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e,
|
0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e,
|
||||||
@ -69,7 +69,7 @@ namespace ARMeilleure.Instructions
|
|||||||
0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, 0xe3, 0xe1, 0xe7, 0xe5
|
0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, 0xe3, 0xe1, 0xe7, 0xe5
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _gfMul03 =>
|
private static ReadOnlySpan<byte> GfMul03 =>
|
||||||
[
|
[
|
||||||
0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11,
|
0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11,
|
||||||
0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21,
|
0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21,
|
||||||
@ -89,7 +89,7 @@ namespace ARMeilleure.Instructions
|
|||||||
0x0b, 0x08, 0x0d, 0x0e, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, 0x1f, 0x1c, 0x19, 0x1a
|
0x0b, 0x08, 0x0d, 0x0e, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, 0x1f, 0x1c, 0x19, 0x1a
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _gfMul09 =>
|
private static ReadOnlySpan<byte> GfMul09 =>
|
||||||
[
|
[
|
||||||
0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77,
|
0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77,
|
||||||
0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7,
|
0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7,
|
||||||
@ -109,7 +109,7 @@ namespace ARMeilleure.Instructions
|
|||||||
0x31, 0x38, 0x23, 0x2a, 0x15, 0x1c, 0x07, 0x0e, 0x79, 0x70, 0x6b, 0x62, 0x5d, 0x54, 0x4f, 0x46
|
0x31, 0x38, 0x23, 0x2a, 0x15, 0x1c, 0x07, 0x0e, 0x79, 0x70, 0x6b, 0x62, 0x5d, 0x54, 0x4f, 0x46
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _gfMul0B =>
|
private static ReadOnlySpan<byte> GfMul0B =>
|
||||||
[
|
[
|
||||||
0x00, 0x0b, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, 0x74, 0x7f, 0x62, 0x69,
|
0x00, 0x0b, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, 0x74, 0x7f, 0x62, 0x69,
|
||||||
0xb0, 0xbb, 0xa6, 0xad, 0x9c, 0x97, 0x8a, 0x81, 0xe8, 0xe3, 0xfe, 0xf5, 0xc4, 0xcf, 0xd2, 0xd9,
|
0xb0, 0xbb, 0xa6, 0xad, 0x9c, 0x97, 0x8a, 0x81, 0xe8, 0xe3, 0xfe, 0xf5, 0xc4, 0xcf, 0xd2, 0xd9,
|
||||||
@ -129,7 +129,7 @@ namespace ARMeilleure.Instructions
|
|||||||
0xca, 0xc1, 0xdc, 0xd7, 0xe6, 0xed, 0xf0, 0xfb, 0x92, 0x99, 0x84, 0x8f, 0xbe, 0xb5, 0xa8, 0xa3
|
0xca, 0xc1, 0xdc, 0xd7, 0xe6, 0xed, 0xf0, 0xfb, 0x92, 0x99, 0x84, 0x8f, 0xbe, 0xb5, 0xa8, 0xa3
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _gfMul0D =>
|
private static ReadOnlySpan<byte> GfMul0D =>
|
||||||
[
|
[
|
||||||
0x00, 0x0d, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, 0x5c, 0x51, 0x46, 0x4b,
|
0x00, 0x0d, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, 0x5c, 0x51, 0x46, 0x4b,
|
||||||
0xd0, 0xdd, 0xca, 0xc7, 0xe4, 0xe9, 0xfe, 0xf3, 0xb8, 0xb5, 0xa2, 0xaf, 0x8c, 0x81, 0x96, 0x9b,
|
0xd0, 0xdd, 0xca, 0xc7, 0xe4, 0xe9, 0xfe, 0xf3, 0xb8, 0xb5, 0xa2, 0xaf, 0x8c, 0x81, 0x96, 0x9b,
|
||||||
@ -149,7 +149,7 @@ namespace ARMeilleure.Instructions
|
|||||||
0xdc, 0xd1, 0xc6, 0xcb, 0xe8, 0xe5, 0xf2, 0xff, 0xb4, 0xb9, 0xae, 0xa3, 0x80, 0x8d, 0x9a, 0x97
|
0xdc, 0xd1, 0xc6, 0xcb, 0xe8, 0xe5, 0xf2, 0xff, 0xb4, 0xb9, 0xae, 0xa3, 0x80, 0x8d, 0x9a, 0x97
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _gfMul0E =>
|
private static ReadOnlySpan<byte> GfMul0E =>
|
||||||
[
|
[
|
||||||
0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, 0x48, 0x46, 0x54, 0x5a,
|
0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, 0x48, 0x46, 0x54, 0x5a,
|
||||||
0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba,
|
0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba,
|
||||||
@ -169,16 +169,16 @@ namespace ARMeilleure.Instructions
|
|||||||
0xd7, 0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0xa7, 0xa9, 0xbb, 0xb5, 0x9f, 0x91, 0x83, 0x8d
|
0xd7, 0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0xa7, 0xa9, 0xbb, 0xb5, 0x9f, 0x91, 0x83, 0x8d
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _srPerm =>
|
private static ReadOnlySpan<byte> SrPerm =>
|
||||||
[
|
[
|
||||||
0, 13, 10, 7, 4, 1, 14, 11, 8, 5, 2, 15, 12, 9, 6, 3
|
0, 13, 10, 7, 4, 1, 14, 11, 8, 5, 2, 15, 12, 9, 6, 3
|
||||||
];
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> _isrPerm =>
|
private static ReadOnlySpan<byte> IsrPerm =>
|
||||||
[
|
[
|
||||||
0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11
|
0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11
|
||||||
];
|
];
|
||||||
#pragma warning restore IDE1006
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public static V128 AesInvMixColumns(V128 op)
|
public static V128 AesInvMixColumns(V128 op)
|
||||||
@ -195,10 +195,10 @@ namespace ARMeilleure.Instructions
|
|||||||
byte row2 = inState[idx + 2]; // C, G, K, O: [row2, col0-col3]
|
byte row2 = inState[idx + 2]; // C, G, K, O: [row2, col0-col3]
|
||||||
byte row3 = inState[idx + 3]; // D, H, L, P: [row3, col0-col3]
|
byte row3 = inState[idx + 3]; // D, H, L, P: [row3, col0-col3]
|
||||||
|
|
||||||
outState[idx + 0] = (byte)((uint)_gfMul0E[row0] ^ _gfMul0B[row1] ^ _gfMul0D[row2] ^ _gfMul09[row3]);
|
outState[idx + 0] = (byte)((uint)GfMul0E[row0] ^ GfMul0B[row1] ^ GfMul0D[row2] ^ GfMul09[row3]);
|
||||||
outState[idx + 1] = (byte)((uint)_gfMul09[row0] ^ _gfMul0E[row1] ^ _gfMul0B[row2] ^ _gfMul0D[row3]);
|
outState[idx + 1] = (byte)((uint)GfMul09[row0] ^ GfMul0E[row1] ^ GfMul0B[row2] ^ GfMul0D[row3]);
|
||||||
outState[idx + 2] = (byte)((uint)_gfMul0D[row0] ^ _gfMul09[row1] ^ _gfMul0E[row2] ^ _gfMul0B[row3]);
|
outState[idx + 2] = (byte)((uint)GfMul0D[row0] ^ GfMul09[row1] ^ GfMul0E[row2] ^ GfMul0B[row3]);
|
||||||
outState[idx + 3] = (byte)((uint)_gfMul0B[row0] ^ _gfMul0D[row1] ^ _gfMul09[row2] ^ _gfMul0E[row3]);
|
outState[idx + 3] = (byte)((uint)GfMul0B[row0] ^ GfMul0D[row1] ^ GfMul09[row2] ^ GfMul0E[row3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new V128(outState);
|
return new V128(outState);
|
||||||
@ -211,7 +211,7 @@ namespace ARMeilleure.Instructions
|
|||||||
|
|
||||||
for (int idx = 0; idx <= 15; idx++)
|
for (int idx = 0; idx <= 15; idx++)
|
||||||
{
|
{
|
||||||
outState[_isrPerm[idx]] = inState[idx];
|
outState[IsrPerm[idx]] = inState[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new V128(outState);
|
return new V128(outState);
|
||||||
@ -224,7 +224,7 @@ namespace ARMeilleure.Instructions
|
|||||||
|
|
||||||
for (int idx = 0; idx <= 15; idx++)
|
for (int idx = 0; idx <= 15; idx++)
|
||||||
{
|
{
|
||||||
outState[idx] = _invSBox[inState[idx]];
|
outState[idx] = InvSBox[inState[idx]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new V128(outState);
|
return new V128(outState);
|
||||||
@ -244,10 +244,10 @@ namespace ARMeilleure.Instructions
|
|||||||
byte row2 = inState[idx + 2]; // C, G, K, O: [row2, col0-col3]
|
byte row2 = inState[idx + 2]; // C, G, K, O: [row2, col0-col3]
|
||||||
byte row3 = inState[idx + 3]; // D, H, L, P: [row3, col0-col3]
|
byte row3 = inState[idx + 3]; // D, H, L, P: [row3, col0-col3]
|
||||||
|
|
||||||
outState[idx + 0] = (byte)((uint)_gfMul02[row0] ^ _gfMul03[row1] ^ row2 ^ row3);
|
outState[idx + 0] = (byte)((uint)GfMul02[row0] ^ GfMul03[row1] ^ row2 ^ row3);
|
||||||
outState[idx + 1] = (byte)((uint)row0 ^ _gfMul02[row1] ^ _gfMul03[row2] ^ row3);
|
outState[idx + 1] = (byte)((uint)row0 ^ GfMul02[row1] ^ GfMul03[row2] ^ row3);
|
||||||
outState[idx + 2] = (byte)((uint)row0 ^ row1 ^ _gfMul02[row2] ^ _gfMul03[row3]);
|
outState[idx + 2] = (byte)((uint)row0 ^ row1 ^ GfMul02[row2] ^ GfMul03[row3]);
|
||||||
outState[idx + 3] = (byte)((uint)_gfMul03[row0] ^ row1 ^ row2 ^ _gfMul02[row3]);
|
outState[idx + 3] = (byte)((uint)GfMul03[row0] ^ row1 ^ row2 ^ GfMul02[row3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new V128(outState);
|
return new V128(outState);
|
||||||
@ -260,7 +260,7 @@ namespace ARMeilleure.Instructions
|
|||||||
|
|
||||||
for (int idx = 0; idx <= 15; idx++)
|
for (int idx = 0; idx <= 15; idx++)
|
||||||
{
|
{
|
||||||
outState[_srPerm[idx]] = inState[idx];
|
outState[SrPerm[idx]] = inState[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new V128(outState);
|
return new V128(outState);
|
||||||
@ -273,7 +273,7 @@ namespace ARMeilleure.Instructions
|
|||||||
|
|
||||||
for (int idx = 0; idx <= 15; idx++)
|
for (int idx = 0; idx <= 15; idx++)
|
||||||
{
|
{
|
||||||
outState[idx] = _sBox[inState[idx]];
|
outState[idx] = SBox[inState[idx]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new V128(outState);
|
return new V128(outState);
|
||||||
|
@ -2,7 +2,6 @@ using ARMeilleure.Decoders;
|
|||||||
using ARMeilleure.IntermediateRepresentation;
|
using ARMeilleure.IntermediateRepresentation;
|
||||||
using ARMeilleure.Translation;
|
using ARMeilleure.Translation;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using static ARMeilleure.Instructions.InstEmitHelper;
|
using static ARMeilleure.Instructions.InstEmitHelper;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
|
@ -11,11 +11,10 @@ using static ARMeilleure.Instructions.InstEmitHelper;
|
|||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper32;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper32;
|
||||||
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
||||||
|
using Func2I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
{
|
{
|
||||||
using Func2I = Func<Operand, Operand, Operand>;
|
|
||||||
|
|
||||||
static partial class InstEmit
|
static partial class InstEmit
|
||||||
{
|
{
|
||||||
public static void Abs_S(ArmEmitterContext context)
|
public static void Abs_S(ArmEmitterContext context)
|
||||||
|
@ -2,15 +2,13 @@ using ARMeilleure.Decoders;
|
|||||||
using ARMeilleure.IntermediateRepresentation;
|
using ARMeilleure.IntermediateRepresentation;
|
||||||
using ARMeilleure.State;
|
using ARMeilleure.State;
|
||||||
using ARMeilleure.Translation;
|
using ARMeilleure.Translation;
|
||||||
using System;
|
|
||||||
using static ARMeilleure.Instructions.InstEmitHelper;
|
using static ARMeilleure.Instructions.InstEmitHelper;
|
||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
||||||
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
||||||
|
using Func2I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
{
|
{
|
||||||
using Func2I = Func<Operand, Operand, Operand>;
|
|
||||||
|
|
||||||
static partial class InstEmit
|
static partial class InstEmit
|
||||||
{
|
{
|
||||||
public static void Cmeq_S(ArmEmitterContext context)
|
public static void Cmeq_S(ArmEmitterContext context)
|
||||||
|
@ -2,17 +2,15 @@ using ARMeilleure.Decoders;
|
|||||||
using ARMeilleure.IntermediateRepresentation;
|
using ARMeilleure.IntermediateRepresentation;
|
||||||
using ARMeilleure.State;
|
using ARMeilleure.State;
|
||||||
using ARMeilleure.Translation;
|
using ARMeilleure.Translation;
|
||||||
using System;
|
|
||||||
|
|
||||||
using static ARMeilleure.Instructions.InstEmitHelper;
|
using static ARMeilleure.Instructions.InstEmitHelper;
|
||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper32;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper32;
|
||||||
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
||||||
|
using Func2I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
{
|
{
|
||||||
using Func2I = Func<Operand, Operand, Operand>;
|
|
||||||
|
|
||||||
static partial class InstEmit32
|
static partial class InstEmit32
|
||||||
{
|
{
|
||||||
public static void Vceq_V(ArmEmitterContext context)
|
public static void Vceq_V(ArmEmitterContext context)
|
||||||
|
@ -8,11 +8,10 @@ using System.Reflection;
|
|||||||
using static ARMeilleure.Instructions.InstEmitHelper;
|
using static ARMeilleure.Instructions.InstEmitHelper;
|
||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
||||||
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
||||||
|
using Func1I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
{
|
{
|
||||||
using Func1I = Func<Operand, Operand>;
|
|
||||||
|
|
||||||
static partial class InstEmit
|
static partial class InstEmit
|
||||||
{
|
{
|
||||||
public static void Fcvt_S(ArmEmitterContext context)
|
public static void Fcvt_S(ArmEmitterContext context)
|
||||||
|
@ -8,13 +8,12 @@ using System.Diagnostics;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using static ARMeilleure.Instructions.InstEmitHelper;
|
using static ARMeilleure.Instructions.InstEmitHelper;
|
||||||
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
||||||
|
using Func1I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
using Func2I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
using Func3I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
{
|
{
|
||||||
using Func1I = Func<Operand, Operand>;
|
|
||||||
using Func2I = Func<Operand, Operand, Operand>;
|
|
||||||
using Func3I = Func<Operand, Operand, Operand, Operand>;
|
|
||||||
|
|
||||||
static class InstEmitSimdHelper
|
static class InstEmitSimdHelper
|
||||||
{
|
{
|
||||||
#region "Masks"
|
#region "Masks"
|
||||||
|
@ -7,13 +7,12 @@ using System.Reflection;
|
|||||||
using static ARMeilleure.Instructions.InstEmitHelper;
|
using static ARMeilleure.Instructions.InstEmitHelper;
|
||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
||||||
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
||||||
|
using Func1I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
using Func2I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
using Func3I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
{
|
{
|
||||||
using Func1I = Func<Operand, Operand>;
|
|
||||||
using Func2I = Func<Operand, Operand, Operand>;
|
|
||||||
using Func3I = Func<Operand, Operand, Operand, Operand>;
|
|
||||||
|
|
||||||
static class InstEmitSimdHelper32
|
static class InstEmitSimdHelper32
|
||||||
{
|
{
|
||||||
public static (int, int) GetQuadwordAndSubindex(int index, RegisterSize size)
|
public static (int, int) GetQuadwordAndSubindex(int index, RegisterSize size)
|
||||||
|
@ -7,13 +7,12 @@ using System.Diagnostics;
|
|||||||
using static ARMeilleure.Instructions.InstEmitHelper;
|
using static ARMeilleure.Instructions.InstEmitHelper;
|
||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
||||||
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
||||||
|
using Func1I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
using Func2I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
using Func3I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
{
|
{
|
||||||
using Func1I = Func<Operand, Operand>;
|
|
||||||
using Func2I = Func<Operand, Operand, Operand>;
|
|
||||||
using Func3I = Func<Operand, Operand, Operand, Operand>;
|
|
||||||
|
|
||||||
static class InstEmitSimdHelper32Arm64
|
static class InstEmitSimdHelper32Arm64
|
||||||
{
|
{
|
||||||
// Intrinsic Helpers
|
// Intrinsic Helpers
|
||||||
|
@ -40,9 +40,10 @@ namespace ARMeilleure.Instructions
|
|||||||
|
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
|
||||||
for (int rep = 0; rep < op.Reps; rep++)
|
for (int rep = 0; rep < op.Reps; rep++)
|
||||||
|
{
|
||||||
for (int elem = 0; elem < op.Elems; elem++)
|
for (int elem = 0; elem < op.Elems; elem++)
|
||||||
|
{
|
||||||
for (int sElem = 0; sElem < op.SElems; sElem++)
|
for (int sElem = 0; sElem < op.SElems; sElem++)
|
||||||
{
|
{
|
||||||
int rtt = (op.Rt + rep + sElem) & 0x1f;
|
int rtt = (op.Rt + rep + sElem) & 0x1f;
|
||||||
@ -67,7 +68,8 @@ namespace ARMeilleure.Instructions
|
|||||||
|
|
||||||
offset += 1 << op.Size;
|
offset += 1 << op.Size;
|
||||||
}
|
}
|
||||||
#pragma warning restore IDE0055
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (op.WBack)
|
if (op.WBack)
|
||||||
{
|
{
|
||||||
|
@ -9,11 +9,10 @@ using System.Reflection;
|
|||||||
using static ARMeilleure.Instructions.InstEmitHelper;
|
using static ARMeilleure.Instructions.InstEmitHelper;
|
||||||
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
using static ARMeilleure.Instructions.InstEmitSimdHelper;
|
||||||
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
|
||||||
|
using Func2I = System.Func<ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand, ARMeilleure.IntermediateRepresentation.Operand>;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
{
|
{
|
||||||
using Func2I = Func<Operand, Operand, Operand>;
|
|
||||||
|
|
||||||
static partial class InstEmit
|
static partial class InstEmit
|
||||||
{
|
{
|
||||||
#region "Masks"
|
#region "Masks"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
namespace ARMeilleure.IntermediateRepresentation
|
namespace ARMeilleure.IntermediateRepresentation
|
||||||
{
|
{
|
||||||
|
@ -7,10 +7,9 @@ namespace ARMeilleure.IntermediateRepresentation
|
|||||||
{
|
{
|
||||||
private struct Data
|
private struct Data
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public byte Kind;
|
public byte Kind;
|
||||||
public byte Type;
|
public byte Type;
|
||||||
#pragma warning restore CS0649
|
|
||||||
public byte Scale;
|
public byte Scale;
|
||||||
public Operand BaseAddress;
|
public Operand BaseAddress;
|
||||||
public Operand Index;
|
public Operand Index;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
using Arm64HardwareCapabilities = ARMeilleure.CodeGen.Arm64.HardwareCapabilities;
|
||||||
|
using X86HardwareCapabilities = ARMeilleure.CodeGen.X86.HardwareCapabilities;
|
||||||
|
|
||||||
namespace ARMeilleure
|
namespace ARMeilleure
|
||||||
{
|
{
|
||||||
using Arm64HardwareCapabilities = ARMeilleure.CodeGen.Arm64.HardwareCapabilities;
|
|
||||||
using X86HardwareCapabilities = ARMeilleure.CodeGen.X86.HardwareCapabilities;
|
|
||||||
|
|
||||||
public static class Optimizations
|
public static class Optimizations
|
||||||
{
|
{
|
||||||
// low-core count PPTC
|
// low-core count PPTC
|
||||||
|
@ -218,18 +218,28 @@ namespace ARMeilleure.Translation
|
|||||||
{
|
{
|
||||||
switch (condition)
|
switch (condition)
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
|
||||||
case Condition.Eq: return ICompareEqual (n, m);
|
case Condition.Eq:
|
||||||
case Condition.Ne: return ICompareNotEqual (n, m);
|
return ICompareEqual(n, m);
|
||||||
case Condition.GeUn: return ICompareGreaterOrEqualUI(n, m);
|
case Condition.Ne:
|
||||||
case Condition.LtUn: return ICompareLessUI (n, m);
|
return ICompareNotEqual(n, m);
|
||||||
case Condition.GtUn: return ICompareGreaterUI (n, m);
|
case Condition.GeUn:
|
||||||
case Condition.LeUn: return ICompareLessOrEqualUI (n, m);
|
return ICompareGreaterOrEqualUI(n, m);
|
||||||
case Condition.Ge: return ICompareGreaterOrEqual (n, m);
|
case Condition.LtUn:
|
||||||
case Condition.Lt: return ICompareLess (n, m);
|
return ICompareLessUI(n, m);
|
||||||
case Condition.Gt: return ICompareGreater (n, m);
|
case Condition.GtUn:
|
||||||
case Condition.Le: return ICompareLessOrEqual (n, m);
|
return ICompareGreaterUI(n, m);
|
||||||
#pragma warning restore IDE0055
|
case Condition.LeUn:
|
||||||
|
return ICompareLessOrEqualUI(n, m);
|
||||||
|
case Condition.Ge:
|
||||||
|
return ICompareGreaterOrEqual(n, m);
|
||||||
|
case Condition.Lt:
|
||||||
|
return ICompareLess(n, m);
|
||||||
|
case Condition.Gt:
|
||||||
|
return ICompareGreater(n, m);
|
||||||
|
case Condition.Le:
|
||||||
|
return ICompareLessOrEqual(n, m);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (cmpName == InstName.Adds && _optOpLastCompare is IOpCodeAluImm op)
|
else if (cmpName == InstName.Adds && _optOpLastCompare is IOpCodeAluImm op)
|
||||||
@ -254,14 +264,20 @@ namespace ARMeilleure.Translation
|
|||||||
|
|
||||||
switch (condition)
|
switch (condition)
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
|
||||||
case Condition.Eq: return ICompareEqual (n, m);
|
case Condition.Eq:
|
||||||
case Condition.Ne: return ICompareNotEqual (n, m);
|
return ICompareEqual(n, m);
|
||||||
case Condition.Ge: return ICompareGreaterOrEqual(n, m);
|
case Condition.Ne:
|
||||||
case Condition.Lt: return ICompareLess (n, m);
|
return ICompareNotEqual(n, m);
|
||||||
case Condition.Gt: return ICompareGreater (n, m);
|
case Condition.Ge:
|
||||||
case Condition.Le: return ICompareLessOrEqual (n, m);
|
return ICompareGreaterOrEqual(n, m);
|
||||||
#pragma warning restore IDE0055
|
case Condition.Lt:
|
||||||
|
return ICompareLess(n, m);
|
||||||
|
case Condition.Gt:
|
||||||
|
return ICompareGreater(n, m);
|
||||||
|
case Condition.Le:
|
||||||
|
return ICompareLessOrEqual(n, m);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,12 +22,11 @@ using System.Runtime.CompilerServices;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using static ARMeilleure.Translation.PTC.PtcFormatter;
|
using static ARMeilleure.Translation.PTC.PtcFormatter;
|
||||||
|
using Arm64HardwareCapabilities = ARMeilleure.CodeGen.Arm64.HardwareCapabilities;
|
||||||
|
using X86HardwareCapabilities = ARMeilleure.CodeGen.X86.HardwareCapabilities;
|
||||||
|
|
||||||
namespace ARMeilleure.Translation.PTC
|
namespace ARMeilleure.Translation.PTC
|
||||||
{
|
{
|
||||||
using Arm64HardwareCapabilities = CodeGen.Arm64.HardwareCapabilities;
|
|
||||||
using X86HardwareCapabilities = CodeGen.X86.HardwareCapabilities;
|
|
||||||
|
|
||||||
class Ptc : IPtcLoadState
|
class Ptc : IPtcLoadState
|
||||||
{
|
{
|
||||||
private const string OuterHeaderMagicString = "PTCohd\0\0";
|
private const string OuterHeaderMagicString = "PTCohd\0\0";
|
||||||
|
@ -297,12 +297,20 @@ namespace ARMeilleure.Translation
|
|||||||
|
|
||||||
switch (register.Type)
|
switch (register.Type)
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
|
||||||
case RegisterType.Flag: intMask = (1L << RegsCount) << register.Index; break;
|
case RegisterType.Flag:
|
||||||
case RegisterType.Integer: intMask = 1L << register.Index; break;
|
intMask = (1L << RegsCount) << register.Index;
|
||||||
case RegisterType.FpFlag: vecMask = (1L << RegsCount) << register.Index; break;
|
break;
|
||||||
case RegisterType.Vector: vecMask = 1L << register.Index; break;
|
case RegisterType.Integer:
|
||||||
#pragma warning restore IDE0055
|
intMask = 1L << register.Index;
|
||||||
|
break;
|
||||||
|
case RegisterType.FpFlag:
|
||||||
|
vecMask = (1L << RegsCount) << register.Index;
|
||||||
|
break;
|
||||||
|
case RegisterType.Vector:
|
||||||
|
vecMask = 1L << register.Index;
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new RegisterMask(intMask, vecMask);
|
return new RegisterMask(intMask, vecMask);
|
||||||
|
@ -12,7 +12,7 @@ using static SDL2.SDL;
|
|||||||
|
|
||||||
namespace Ryujinx.Audio.Backends.SDL2
|
namespace Ryujinx.Audio.Backends.SDL2
|
||||||
{
|
{
|
||||||
public class SDL2HardwareDeviceDriver : IHardwareDeviceDriver
|
public partial class SDL2HardwareDeviceDriver : IHardwareDeviceDriver
|
||||||
{
|
{
|
||||||
private readonly ManualResetEvent _updateRequiredEvent;
|
private readonly ManualResetEvent _updateRequiredEvent;
|
||||||
private readonly ManualResetEvent _pauseEvent;
|
private readonly ManualResetEvent _pauseEvent;
|
||||||
@ -22,10 +22,36 @@ namespace Ryujinx.Audio.Backends.SDL2
|
|||||||
|
|
||||||
public float Volume { get; set; }
|
public float Volume { get; set; }
|
||||||
|
|
||||||
// TODO: Add this to SDL2-CS
|
// A safe method to get default audio information.
|
||||||
// NOTE: We use a DllImport here because of marshaling issue for spec.
|
private static int GetDefaultAudioInfo(nint name, out SDL_AudioSpec spec, int isCapture)
|
||||||
[DllImport("SDL2")]
|
{
|
||||||
private static extern int SDL_GetDefaultAudioInfo(nint name, out SDL_AudioSpec spec, int isCapture);
|
int result;
|
||||||
|
spec = new SDL_AudioSpec();
|
||||||
|
IntPtr specPtr = IntPtr.Zero;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Reserve memory
|
||||||
|
specPtr = Marshal.AllocHGlobal(Marshal.SizeOf<SDL_AudioSpec>());
|
||||||
|
// Call method
|
||||||
|
result = SDL_GetDefaultAudioInfo(name, specPtr, isCapture);
|
||||||
|
// Copy result to managed structure
|
||||||
|
spec = Marshal.PtrToStructure<SDL_AudioSpec>(specPtr);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// Free the unmanaged memory to prevent memory leaks
|
||||||
|
if (specPtr != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
Marshal.FreeHGlobal(specPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
[LibraryImport("SDL2")]
|
||||||
|
private static partial int SDL_GetDefaultAudioInfo(nint name, nint spec, int isCapture);
|
||||||
|
|
||||||
public SDL2HardwareDeviceDriver()
|
public SDL2HardwareDeviceDriver()
|
||||||
{
|
{
|
||||||
@ -35,7 +61,7 @@ namespace Ryujinx.Audio.Backends.SDL2
|
|||||||
|
|
||||||
SDL2Driver.Instance.Initialize();
|
SDL2Driver.Instance.Initialize();
|
||||||
|
|
||||||
int res = SDL_GetDefaultAudioInfo(nint.Zero, out SDL_AudioSpec spec, 0);
|
int res = GetDefaultAudioInfo(nint.Zero, out SDL_AudioSpec spec, 0);
|
||||||
|
|
||||||
if (res != 0)
|
if (res != 0)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
|
|||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public delegate void JackCallbackDelegate(nint msg);
|
public delegate void JackCallbackDelegate(nint msg);
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct SoundIoStruct
|
public struct SoundIoStruct
|
||||||
{
|
{
|
||||||
public nint UserData;
|
public nint UserData;
|
||||||
|
@ -20,9 +20,7 @@ namespace Ryujinx.Audio.Renderer.Common
|
|||||||
public uint Unknown24;
|
public uint Unknown24;
|
||||||
public uint RenderInfoSize;
|
public uint RenderInfoSize;
|
||||||
|
|
||||||
#pragma warning disable IDE0051, CS0169 // Remove unused field
|
|
||||||
private Array4<int> _reserved;
|
private Array4<int> _reserved;
|
||||||
#pragma warning restore IDE0051, CS0169
|
|
||||||
|
|
||||||
public uint TotalSize;
|
public uint TotalSize;
|
||||||
|
|
||||||
|
@ -12,9 +12,8 @@ namespace Ryujinx.Audio.Renderer.Dsp
|
|||||||
private const int SamplesPerFrame = 14;
|
private const int SamplesPerFrame = 14;
|
||||||
private const int NibblesPerFrame = SamplesPerFrame + 2;
|
private const int NibblesPerFrame = SamplesPerFrame + 2;
|
||||||
private const int BytesPerFrame = 8;
|
private const int BytesPerFrame = 8;
|
||||||
#pragma warning disable IDE0051 // Remove unused private member
|
|
||||||
private const int BitsPerFrame = BytesPerFrame * 8;
|
private const int BitsPerFrame = BytesPerFrame * 8;
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static uint GetAdpcmDataSize(int sampleCount)
|
public static uint GetAdpcmDataSize(int sampleCount)
|
||||||
|
@ -41,10 +41,10 @@ namespace Ryujinx.Audio.Renderer.Server
|
|||||||
private UpsamplerManager _upsamplerManager;
|
private UpsamplerManager _upsamplerManager;
|
||||||
private bool _isActive;
|
private bool _isActive;
|
||||||
private BehaviourContext _behaviourContext;
|
private BehaviourContext _behaviourContext;
|
||||||
#pragma warning disable IDE0052 // Remove unread private member
|
|
||||||
private ulong _totalElapsedTicksUpdating;
|
private ulong _totalElapsedTicksUpdating;
|
||||||
private ulong _totalElapsedTicks;
|
private ulong _totalElapsedTicks;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
private int _sessionId;
|
private int _sessionId;
|
||||||
private Memory<MemoryPoolState> _memoryPools;
|
private Memory<MemoryPoolState> _memoryPools;
|
||||||
|
|
||||||
|
@ -147,9 +147,9 @@ namespace Ryujinx.Common.Collections
|
|||||||
|
|
||||||
Queue<Node<TKey, TValue>> nodes = new();
|
Queue<Node<TKey, TValue>> nodes = new();
|
||||||
|
|
||||||
if (this.Root != null)
|
if (Root != null)
|
||||||
{
|
{
|
||||||
nodes.Enqueue(this.Root);
|
nodes.Enqueue(Root);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (nodes.TryDequeue(out Node<TKey, TValue> node))
|
while (nodes.TryDequeue(out Node<TKey, TValue> node))
|
||||||
@ -522,7 +522,7 @@ namespace Ryujinx.Common.Collections
|
|||||||
|
|
||||||
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
|
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
|
||||||
{
|
{
|
||||||
if (arrayIndex < 0 || array.Length - arrayIndex < this.Count)
|
if (arrayIndex < 0 || array.Length - arrayIndex < Count)
|
||||||
{
|
{
|
||||||
throw new ArgumentOutOfRangeException(nameof(arrayIndex));
|
throw new ArgumentOutOfRangeException(nameof(arrayIndex));
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,6 @@ namespace Ryujinx.Common.Configuration
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static float ToFloatY(this AspectRatio aspectRatio)
|
public static float ToFloatY(this AspectRatio aspectRatio)
|
||||||
{
|
{
|
||||||
return aspectRatio switch
|
return aspectRatio switch
|
||||||
|
@ -18,8 +18,6 @@ namespace Ryujinx.Common.Configuration
|
|||||||
public DirtyHack Hack => hack;
|
public DirtyHack Hack => hack;
|
||||||
public int Value => value;
|
public int Value => value;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ulong Pack() => Raw.PackBitFields(PackedFormat);
|
public ulong Pack() => Raw.PackBitFields(PackedFormat);
|
||||||
|
|
||||||
public static EnabledDirtyHack Unpack(ulong packedHack)
|
public static EnabledDirtyHack Unpack(ulong packedHack)
|
||||||
|
@ -10,7 +10,7 @@ using System.Runtime.Intrinsics.X86;
|
|||||||
|
|
||||||
namespace Ryujinx.Common
|
namespace Ryujinx.Common
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Hash128(ulong low, ulong high) : IEquatable<Hash128>
|
public struct Hash128(ulong low, ulong high) : IEquatable<Hash128>
|
||||||
{
|
{
|
||||||
public ulong Low = low;
|
public ulong Low = low;
|
||||||
|
@ -219,16 +219,34 @@ namespace Ryujinx.Common.Logging
|
|||||||
switch (logLevel)
|
switch (logLevel)
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
#pragma warning disable IDE0055 // Disable formatting
|
||||||
case LogLevel.Debug : Debug = enabled ? new Log(LogLevel.Debug) : new Log?(); break;
|
case LogLevel.Debug:
|
||||||
case LogLevel.Info : Info = enabled ? new Log(LogLevel.Info) : new Log?(); break;
|
Debug = enabled ? new Log(LogLevel.Debug) : new Log?();
|
||||||
case LogLevel.Warning : Warning = enabled ? new Log(LogLevel.Warning) : new Log?(); break;
|
break;
|
||||||
case LogLevel.Error : Error = enabled ? new Log(LogLevel.Error) : new Log?(); break;
|
case LogLevel.Info:
|
||||||
case LogLevel.Guest : Guest = enabled ? new Log(LogLevel.Guest) : new Log?(); break;
|
Info = enabled ? new Log(LogLevel.Info) : new Log?();
|
||||||
case LogLevel.AccessLog : AccessLog = enabled ? new Log(LogLevel.AccessLog) : new Log?(); break;
|
break;
|
||||||
case LogLevel.Stub : Stub = enabled ? new Log(LogLevel.Stub) : new Log?(); break;
|
case LogLevel.Warning:
|
||||||
case LogLevel.Trace : Trace = enabled ? new Log(LogLevel.Trace) : new Log?(); break;
|
Warning = enabled ? new Log(LogLevel.Warning) : new Log?();
|
||||||
case LogLevel.Notice : break;
|
break;
|
||||||
default: throw new ArgumentException("Unknown Log Level", nameof(logLevel));
|
case LogLevel.Error:
|
||||||
|
Error = enabled ? new Log(LogLevel.Error) : new Log?();
|
||||||
|
break;
|
||||||
|
case LogLevel.Guest:
|
||||||
|
Guest = enabled ? new Log(LogLevel.Guest) : new Log?();
|
||||||
|
break;
|
||||||
|
case LogLevel.AccessLog:
|
||||||
|
AccessLog = enabled ? new Log(LogLevel.AccessLog) : new Log?();
|
||||||
|
break;
|
||||||
|
case LogLevel.Stub:
|
||||||
|
Stub = enabled ? new Log(LogLevel.Stub) : new Log?();
|
||||||
|
break;
|
||||||
|
case LogLevel.Trace:
|
||||||
|
Trace = enabled ? new Log(LogLevel.Trace) : new Log?();
|
||||||
|
break;
|
||||||
|
case LogLevel.Notice:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentException("Unknown Log Level", nameof(logLevel));
|
||||||
#pragma warning restore IDE0055
|
#pragma warning restore IDE0055
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@ using System;
|
|||||||
using System.Diagnostics.Contracts;
|
using System.Diagnostics.Contracts;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
#pragma warning disable CS0169, IDE0051 // Remove unused private member
|
|
||||||
namespace Ryujinx.Common.Memory
|
namespace Ryujinx.Common.Memory
|
||||||
{
|
{
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array1<T> : IArray<T> where T : unmanaged
|
public struct Array1<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -15,6 +15,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array2<T> : IArray<T> where T : unmanaged
|
public struct Array2<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -26,6 +27,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array3<T> : IArray<T> where T : unmanaged
|
public struct Array3<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -37,6 +39,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array4<T> : IArray<T> where T : unmanaged
|
public struct Array4<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -48,6 +51,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array5<T> : IArray<T> where T : unmanaged
|
public struct Array5<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -59,6 +63,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array6<T> : IArray<T> where T : unmanaged
|
public struct Array6<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -70,6 +75,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array7<T> : IArray<T> where T : unmanaged
|
public struct Array7<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -81,6 +87,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array8<T> : IArray<T> where T : unmanaged
|
public struct Array8<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -92,6 +99,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array9<T> : IArray<T> where T : unmanaged
|
public struct Array9<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -103,6 +111,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array10<T> : IArray<T> where T : unmanaged
|
public struct Array10<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -114,6 +123,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array11<T> : IArray<T> where T : unmanaged
|
public struct Array11<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -125,6 +135,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array12<T> : IArray<T> where T : unmanaged
|
public struct Array12<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -136,6 +147,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array13<T> : IArray<T> where T : unmanaged
|
public struct Array13<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -147,6 +159,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array14<T> : IArray<T> where T : unmanaged
|
public struct Array14<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -158,6 +171,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array15<T> : IArray<T> where T : unmanaged
|
public struct Array15<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -169,6 +183,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array16<T> : IArray<T> where T : unmanaged
|
public struct Array16<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -180,6 +195,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array17<T> : IArray<T> where T : unmanaged
|
public struct Array17<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -191,6 +207,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array18<T> : IArray<T> where T : unmanaged
|
public struct Array18<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -202,6 +219,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array19<T> : IArray<T> where T : unmanaged
|
public struct Array19<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -213,6 +231,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array20<T> : IArray<T> where T : unmanaged
|
public struct Array20<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -224,6 +243,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array21<T> : IArray<T> where T : unmanaged
|
public struct Array21<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -235,6 +255,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array22<T> : IArray<T> where T : unmanaged
|
public struct Array22<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -246,6 +267,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array23<T> : IArray<T> where T : unmanaged
|
public struct Array23<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -257,6 +279,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array24<T> : IArray<T> where T : unmanaged
|
public struct Array24<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -269,6 +292,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array25<T> : IArray<T> where T : unmanaged
|
public struct Array25<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -281,6 +305,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array26<T> : IArray<T> where T : unmanaged
|
public struct Array26<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -293,6 +318,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array27<T> : IArray<T> where T : unmanaged
|
public struct Array27<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -305,6 +331,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array28<T> : IArray<T> where T : unmanaged
|
public struct Array28<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -317,6 +344,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array29<T> : IArray<T> where T : unmanaged
|
public struct Array29<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -329,6 +357,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array30<T> : IArray<T> where T : unmanaged
|
public struct Array30<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -341,6 +370,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array31<T> : IArray<T> where T : unmanaged
|
public struct Array31<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -353,6 +383,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array32<T> : IArray<T> where T : unmanaged
|
public struct Array32<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -365,6 +396,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array33<T> : IArray<T> where T : unmanaged
|
public struct Array33<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -377,6 +409,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array34<T> : IArray<T> where T : unmanaged
|
public struct Array34<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -389,6 +422,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array35<T> : IArray<T> where T : unmanaged
|
public struct Array35<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -401,6 +435,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array36<T> : IArray<T> where T : unmanaged
|
public struct Array36<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -413,6 +448,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array37<T> : IArray<T> where T : unmanaged
|
public struct Array37<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -425,6 +461,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array38<T> : IArray<T> where T : unmanaged
|
public struct Array38<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -437,6 +474,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array39<T> : IArray<T> where T : unmanaged
|
public struct Array39<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -449,6 +487,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array40<T> : IArray<T> where T : unmanaged
|
public struct Array40<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -461,6 +500,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array41<T> : IArray<T> where T : unmanaged
|
public struct Array41<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -473,6 +513,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array42<T> : IArray<T> where T : unmanaged
|
public struct Array42<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -485,6 +526,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array43<T> : IArray<T> where T : unmanaged
|
public struct Array43<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -497,6 +539,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array44<T> : IArray<T> where T : unmanaged
|
public struct Array44<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -509,6 +552,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array45<T> : IArray<T> where T : unmanaged
|
public struct Array45<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -521,6 +565,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array46<T> : IArray<T> where T : unmanaged
|
public struct Array46<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -533,6 +578,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array47<T> : IArray<T> where T : unmanaged
|
public struct Array47<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -545,6 +591,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array48<T> : IArray<T> where T : unmanaged
|
public struct Array48<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -557,6 +604,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array49<T> : IArray<T> where T : unmanaged
|
public struct Array49<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -569,6 +617,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array50<T> : IArray<T> where T : unmanaged
|
public struct Array50<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -581,6 +630,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array51<T> : IArray<T> where T : unmanaged
|
public struct Array51<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -593,6 +643,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array52<T> : IArray<T> where T : unmanaged
|
public struct Array52<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -605,6 +656,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array53<T> : IArray<T> where T : unmanaged
|
public struct Array53<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -617,6 +669,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array54<T> : IArray<T> where T : unmanaged
|
public struct Array54<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -629,6 +682,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array55<T> : IArray<T> where T : unmanaged
|
public struct Array55<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -641,6 +695,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array56<T> : IArray<T> where T : unmanaged
|
public struct Array56<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -653,6 +708,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array57<T> : IArray<T> where T : unmanaged
|
public struct Array57<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -665,6 +721,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array58<T> : IArray<T> where T : unmanaged
|
public struct Array58<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -677,6 +734,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array59<T> : IArray<T> where T : unmanaged
|
public struct Array59<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -689,6 +747,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array60<T> : IArray<T> where T : unmanaged
|
public struct Array60<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -700,6 +759,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array61<T> : IArray<T> where T : unmanaged
|
public struct Array61<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -711,6 +771,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array62<T> : IArray<T> where T : unmanaged
|
public struct Array62<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -722,6 +783,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array63<T> : IArray<T> where T : unmanaged
|
public struct Array63<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -733,6 +795,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array64<T> : IArray<T> where T : unmanaged
|
public struct Array64<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -744,6 +807,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array65<T> : IArray<T> where T : unmanaged
|
public struct Array65<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -755,6 +819,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array73<T> : IArray<T> where T : unmanaged
|
public struct Array73<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -767,6 +832,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array96<T> : IArray<T> where T : unmanaged
|
public struct Array96<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -779,6 +845,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array127<T> : IArray<T> where T : unmanaged
|
public struct Array127<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -791,6 +858,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array128<T> : IArray<T> where T : unmanaged
|
public struct Array128<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -803,6 +871,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array140<T> : IArray<T> where T : unmanaged
|
public struct Array140<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -816,6 +885,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array256<T> : IArray<T> where T : unmanaged
|
public struct Array256<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -828,6 +898,7 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct Array384<T> : IArray<T> where T : unmanaged
|
public struct Array384<T> : IArray<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
T _e0;
|
T _e0;
|
||||||
@ -844,4 +915,4 @@ namespace Ryujinx.Common.Memory
|
|||||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore CS0169, IDE0051
|
|
||||||
|
@ -94,7 +94,7 @@ namespace Ryujinx.Common.PreciseSleep
|
|||||||
Bias = GetBias(0);
|
Bias = GetBias(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
private struct Timespec
|
private struct Timespec
|
||||||
{
|
{
|
||||||
public long tv_sec; // Seconds
|
public long tv_sec; // Seconds
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
using Ryujinx.Common.Utilities;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Net.Http;
|
|
||||||
using System.Net.Http.Json;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Ryujinx.Common
|
namespace Ryujinx.Common
|
||||||
{
|
{
|
||||||
@ -37,6 +32,4 @@ namespace Ryujinx.Common
|
|||||||
? $"https://git.ryujinx.app/ryubing/ryujinx/-/compare/Canary-{currentVersion}...Canary-{newVersion}"
|
? $"https://git.ryujinx.app/ryubing/ryujinx/-/compare/Canary-{currentVersion}...Canary-{newVersion}"
|
||||||
: $"https://git.ryujinx.app/ryubing/ryujinx/-/releases/{newVersion}";
|
: $"https://git.ryujinx.app/ryubing/ryujinx/-/releases/{newVersion}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,12 +28,10 @@ namespace Ryujinx.Common.SystemInterop
|
|||||||
{
|
{
|
||||||
public int GdiplusVersion;
|
public int GdiplusVersion;
|
||||||
|
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public nint DebugEventCallback;
|
public nint DebugEventCallback;
|
||||||
public int SuppressBackgroundThread;
|
public int SuppressBackgroundThread;
|
||||||
public int SuppressExternalCodecs;
|
public int SuppressExternalCodecs;
|
||||||
public int StartupParameters;
|
public int StartupParameters;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
public static StartupInputEx Default => new()
|
public static StartupInputEx Default => new()
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ namespace Ryujinx.Common.SystemInterop
|
|||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
public partial class WindowsMultimediaTimerResolution : IDisposable
|
public partial class WindowsMultimediaTimerResolution : IDisposable
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct TimeCaps
|
public struct TimeCaps
|
||||||
{
|
{
|
||||||
public uint wPeriodMin;
|
public uint wPeriodMin;
|
||||||
|
@ -9,8 +9,8 @@ namespace Ryujinx.Common.Utilities
|
|||||||
[StructLayout(LayoutKind.Sequential, Size = 16)]
|
[StructLayout(LayoutKind.Sequential, Size = 16)]
|
||||||
public struct Buffer16
|
public struct Buffer16
|
||||||
{
|
{
|
||||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)] private readonly ulong _dummy0;
|
public ulong Low { get; set; }
|
||||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)] private readonly ulong _dummy1;
|
public ulong High { get; set; }
|
||||||
|
|
||||||
public byte this[int i]
|
public byte this[int i]
|
||||||
{
|
{
|
||||||
|
@ -241,7 +241,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
|
|
||||||
public IndentedStringBuilder Append(object value)
|
public IndentedStringBuilder Append(object value)
|
||||||
{
|
{
|
||||||
this.Append(value.ToString());
|
Append(value.ToString());
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -271,7 +271,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
{
|
{
|
||||||
_builder.Append(value);
|
_builder.Append(value);
|
||||||
|
|
||||||
this.AppendLine();
|
AppendLine();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ namespace Ryujinx.Common.Utilities
|
|||||||
CyclingEnabled = false;
|
CyclingEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static float Speed { get; set; } = 1;
|
public static float Speed { get; set; } = 1;
|
||||||
|
|
||||||
private static readonly Lock _lock = new();
|
private static readonly Lock _lock = new();
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Ryujinx.Cpu.AppleHv
|
|
||||||
{
|
|
||||||
public class DummyDiskCacheLoadState : IDiskCacheLoadState
|
|
||||||
{
|
|
||||||
#pragma warning disable CS0067 // The event is never used
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public event Action<LoadState, int, int> StateChanged;
|
|
||||||
#pragma warning restore CS0067
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public void Cancel()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,11 +6,11 @@ namespace Ryujinx.Cpu.AppleHv
|
|||||||
{
|
{
|
||||||
struct HvVcpuExitException
|
struct HvVcpuExitException
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public ulong Syndrome;
|
public ulong Syndrome;
|
||||||
public ulong VirtualAddress;
|
public ulong VirtualAddress;
|
||||||
public ulong PhysicalAddress;
|
public ulong PhysicalAddress;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum HvExitReason : uint
|
enum HvExitReason : uint
|
||||||
@ -23,10 +23,10 @@ namespace Ryujinx.Cpu.AppleHv
|
|||||||
|
|
||||||
struct HvVcpuExit
|
struct HvVcpuExit
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public HvExitReason Reason;
|
public HvExitReason Reason;
|
||||||
public HvVcpuExitException Exception;
|
public HvVcpuExitException Exception;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum HvReg : uint
|
enum HvReg : uint
|
||||||
|
@ -4,10 +4,10 @@ namespace Ryujinx.Cpu
|
|||||||
{
|
{
|
||||||
public class DummyDiskCacheLoadState : IDiskCacheLoadState
|
public class DummyDiskCacheLoadState : IDiskCacheLoadState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0067 // The event is never used
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public event Action<LoadState, int, int> StateChanged;
|
public event Action<LoadState, int, int> StateChanged;
|
||||||
#pragma warning restore CS0067
|
|
||||||
|
public DummyDiskCacheLoadState() => StateChanged?.Invoke(LoadState.Unloaded, 0, 0);
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Cancel()
|
public void Cancel()
|
||||||
|
@ -15,7 +15,6 @@ namespace Ryujinx.Cpu
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public ulong Counter => (ulong)(ElapsedSeconds * Frequency);
|
public ulong Counter => (ulong)(ElapsedSeconds * Frequency);
|
||||||
|
|
||||||
|
|
||||||
public long TickScalar { get; set; }
|
public long TickScalar { get; set; }
|
||||||
|
|
||||||
private static long _acumElapsedTicks;
|
private static long _acumElapsedTicks;
|
||||||
|
@ -143,7 +143,7 @@ namespace Ryujinx.Graphics.GAL
|
|||||||
|
|
||||||
public override bool Equals(object obj)
|
public override bool Equals(object obj)
|
||||||
{
|
{
|
||||||
return obj is TextureCreateInfo info && this.Equals(info);
|
return obj is TextureCreateInfo info && Equals(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool operator ==(TextureCreateInfo left, TextureCreateInfo right)
|
public static bool operator ==(TextureCreateInfo left, TextureCreateInfo right)
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.GAL
|
namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public enum ViewportSwizzle
|
public enum ViewportSwizzle
|
||||||
|
@ -98,7 +98,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Compute
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
unsafe struct ComputeClassState
|
unsafe struct ComputeClassState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint SetObject;
|
public uint SetObject;
|
||||||
public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF);
|
public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF);
|
||||||
public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
|
public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
|
||||||
@ -430,6 +430,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Compute
|
|||||||
public readonly int StopShaderPerformanceCounterCounterMask => (int)(StopShaderPerformanceCounter & 0xFF);
|
public readonly int StopShaderPerformanceCounterCounterMask => (int)(StopShaderPerformanceCounter & 0xFF);
|
||||||
public fixed uint Reserved33E8[6];
|
public fixed uint Reserved33E8[6];
|
||||||
public Array256<uint> SetMmeShadowScratch;
|
public Array256<uint> SetMmeShadowScratch;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
unsafe struct DmaClassState
|
unsafe struct DmaClassState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public fixed uint Reserved00[64];
|
public fixed uint Reserved00[64];
|
||||||
public uint Nop;
|
public uint Nop;
|
||||||
public fixed uint Reserved104[15];
|
public fixed uint Reserved104[15];
|
||||||
@ -266,6 +266,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
|||||||
public fixed uint Reserved740[629];
|
public fixed uint Reserved740[629];
|
||||||
public uint PmTriggerEnd;
|
public uint PmTriggerEnd;
|
||||||
public fixed uint Reserved1118[2490];
|
public fixed uint Reserved1118[2490];
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct DmaTexture
|
struct DmaTexture
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public MemoryLayout MemoryLayout;
|
public MemoryLayout MemoryLayout;
|
||||||
public int Width;
|
public int Width;
|
||||||
public int Height;
|
public int Height;
|
||||||
@ -15,6 +15,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
|||||||
public int RegionZ;
|
public int RegionZ;
|
||||||
public ushort RegionX;
|
public ushort RegionX;
|
||||||
public ushort RegionY;
|
public ushort RegionY;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo
|
|||||||
|
|
||||||
struct CompressedMethod
|
struct CompressedMethod
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Method;
|
public uint Method;
|
||||||
#pragma warning restore CS0649
|
|
||||||
public readonly int MethodAddressOld => (int)((Method >> 2) & 0x7FF);
|
public readonly int MethodAddressOld => (int)((Method >> 2) & 0x7FF);
|
||||||
public readonly int MethodAddress => (int)(Method & 0xFFF);
|
public readonly int MethodAddress => (int)(Method & 0xFFF);
|
||||||
public readonly int SubdeviceMask => (int)((Method >> 4) & 0xFFF);
|
public readonly int SubdeviceMask => (int)((Method >> 4) & 0xFFF);
|
||||||
|
@ -36,15 +36,15 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo
|
|||||||
|
|
||||||
struct GPEntry
|
struct GPEntry
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Entry0;
|
public uint Entry0;
|
||||||
#pragma warning restore CS0649
|
|
||||||
public readonly Entry0Fetch Entry0Fetch => (Entry0Fetch)(Entry0 & 0x1);
|
public readonly Entry0Fetch Entry0Fetch => (Entry0Fetch)(Entry0 & 0x1);
|
||||||
public readonly int Entry0Get => (int)((Entry0 >> 2) & 0x3FFFFFFF);
|
public readonly int Entry0Get => (int)((Entry0 >> 2) & 0x3FFFFFFF);
|
||||||
public readonly int Entry0Operand => (int)(Entry0);
|
public readonly int Entry0Operand => (int)(Entry0);
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Entry1;
|
public uint Entry1;
|
||||||
#pragma warning restore CS0649
|
|
||||||
public readonly int Entry1GetHi => (int)(Entry1 & 0xFF);
|
public readonly int Entry1GetHi => (int)(Entry1 & 0xFF);
|
||||||
public readonly Entry1Priv Entry1Priv => (Entry1Priv)((Entry1 >> 8) & 0x1);
|
public readonly Entry1Priv Entry1Priv => (Entry1Priv)((Entry1 >> 8) & 0x1);
|
||||||
public readonly Entry1Level Entry1Level => (Entry1Level)((Entry1 >> 9) & 0x1);
|
public readonly Entry1Level Entry1Level => (Entry1Level)((Entry1 >> 9) & 0x1);
|
||||||
|
@ -151,7 +151,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct GPFifoClassState
|
struct GPFifoClassState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint SetObject;
|
public uint SetObject;
|
||||||
public readonly int SetObjectNvclass => (int)(SetObject & 0xFFFF);
|
public readonly int SetObjectNvclass => (int)(SetObject & 0xFFFF);
|
||||||
public readonly int SetObjectEngine => (int)((SetObject >> 16) & 0x1F);
|
public readonly int SetObjectEngine => (int)((SetObject >> 16) & 0x1F);
|
||||||
@ -228,6 +228,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo
|
|||||||
public uint LoadMmeStartAddressRamPointer;
|
public uint LoadMmeStartAddressRamPointer;
|
||||||
public uint LoadMmeStartAddressRam;
|
public uint LoadMmeStartAddressRam;
|
||||||
public uint SetMmeShadowRamControl;
|
public uint SetMmeShadowRamControl;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.InlineToMemory
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
unsafe struct InlineToMemoryClassState
|
unsafe struct InlineToMemoryClassState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint SetObject;
|
public uint SetObject;
|
||||||
public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF);
|
public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF);
|
||||||
public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
|
public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
|
||||||
@ -178,6 +178,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.InlineToMemory
|
|||||||
public uint SetI2mSpareNoop03;
|
public uint SetI2mSpareNoop03;
|
||||||
public fixed uint Reserved200[3200];
|
public fixed uint Reserved200[3200];
|
||||||
public Array256<uint> SetMmeShadowScratch;
|
public Array256<uint> SetMmeShadowScratch;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -469,12 +469,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.MME
|
|||||||
for (int i = 0; i < maxDrawCount; i++)
|
for (int i = 0; i < maxDrawCount; i++)
|
||||||
{
|
{
|
||||||
FifoWord count = FetchParam();
|
FifoWord count = FetchParam();
|
||||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
|
||||||
FifoWord instanceCount = FetchParam();
|
_ = FetchParam(); // Instance count
|
||||||
FifoWord firstIndex = FetchParam();
|
FifoWord firstIndex = FetchParam();
|
||||||
FifoWord firstVertex = FetchParam();
|
_ = FetchParam(); // First vertex
|
||||||
FifoWord firstInstance = FetchParam();
|
_ = FetchParam(); // First instance
|
||||||
#pragma warning restore IDE0059
|
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
|
@ -9,9 +9,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||||||
[StructLayout(LayoutKind.Sequential, Size = 1024)]
|
[StructLayout(LayoutKind.Sequential, Size = 1024)]
|
||||||
struct MmeShadowScratch
|
struct MmeShadowScratch
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0169 // The private field is never used
|
|
||||||
private uint _e0;
|
private uint _e0;
|
||||||
#pragma warning restore CS0169
|
|
||||||
public ref uint this[int index] => ref AsSpan()[index];
|
public ref uint this[int index] => ref AsSpan()[index];
|
||||||
public Span<uint> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, 256);
|
public Span<uint> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, 256);
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
private int _inlineIndexBufferSize;
|
private int _inlineIndexBufferSize;
|
||||||
private int _inlineIndexCount;
|
private int _inlineIndexCount;
|
||||||
private uint[] _buffer;
|
private uint[] _buffer;
|
||||||
#pragma warning disable IDE0051 // Remove unused private member
|
|
||||||
private readonly int _bufferOffset;
|
private readonly int _bufferOffset;
|
||||||
#pragma warning restore IDE0051
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if any index buffer data has been pushed.
|
/// Indicates if any index buffer data has been pushed.
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -26,9 +26,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct TessMode
|
struct TessMode
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Packed;
|
public uint Packed;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unpacks the tessellation abstract patch type.
|
/// Unpacks the tessellation abstract patch type.
|
||||||
@ -63,7 +62,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct TfBufferState
|
struct TfBufferState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 Enable;
|
public Boolean32 Enable;
|
||||||
public GpuVa Address;
|
public GpuVa Address;
|
||||||
public int Size;
|
public int Size;
|
||||||
@ -71,7 +70,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
public uint Padding0;
|
public uint Padding0;
|
||||||
public uint Padding1;
|
public uint Padding1;
|
||||||
public uint Padding2;
|
public uint Padding2;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -79,12 +78,12 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct TfState
|
struct TfState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public int BufferIndex;
|
public int BufferIndex;
|
||||||
public int VaryingsCount;
|
public int VaryingsCount;
|
||||||
public int Stride;
|
public int Stride;
|
||||||
public uint Padding;
|
public uint Padding;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -92,7 +91,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct RtColorState
|
struct RtColorState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public GpuVa Address;
|
public GpuVa Address;
|
||||||
public int WidthOrStride;
|
public int WidthOrStride;
|
||||||
public int Height;
|
public int Height;
|
||||||
@ -108,7 +107,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
public int Padding3;
|
public int Padding3;
|
||||||
public int Padding4;
|
public int Padding4;
|
||||||
public int Padding5;
|
public int Padding5;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -116,7 +115,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct ViewportTransform
|
struct ViewportTransform
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public float ScaleX;
|
public float ScaleX;
|
||||||
public float ScaleY;
|
public float ScaleY;
|
||||||
public float ScaleZ;
|
public float ScaleZ;
|
||||||
@ -125,7 +124,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
public float TranslateZ;
|
public float TranslateZ;
|
||||||
public uint Swizzle;
|
public uint Swizzle;
|
||||||
public uint SubpixelPrecisionBias;
|
public uint SubpixelPrecisionBias;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unpacks viewport swizzle of the position X component.
|
/// Unpacks viewport swizzle of the position X component.
|
||||||
@ -169,14 +167,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct ViewportExtents
|
struct ViewportExtents
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public ushort X;
|
public ushort X;
|
||||||
public ushort Width;
|
public ushort Width;
|
||||||
public ushort Y;
|
public ushort Y;
|
||||||
public ushort Height;
|
public ushort Height;
|
||||||
public float DepthNear;
|
public float DepthNear;
|
||||||
public float DepthFar;
|
public float DepthFar;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -184,10 +182,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct VertexBufferDrawState
|
struct VertexBufferDrawState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public int First;
|
public int First;
|
||||||
public int Count;
|
public int Count;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -195,12 +193,12 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct ClearColors
|
struct ClearColors
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public float Red;
|
public float Red;
|
||||||
public float Green;
|
public float Green;
|
||||||
public float Blue;
|
public float Blue;
|
||||||
public float Alpha;
|
public float Alpha;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -208,11 +206,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct DepthBiasState
|
struct DepthBiasState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 PointEnable;
|
public Boolean32 PointEnable;
|
||||||
public Boolean32 LineEnable;
|
public Boolean32 LineEnable;
|
||||||
public Boolean32 FillEnable;
|
public Boolean32 FillEnable;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -231,14 +229,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct ScissorState
|
struct ScissorState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 Enable;
|
public Boolean32 Enable;
|
||||||
public ushort X1;
|
public ushort X1;
|
||||||
public ushort X2;
|
public ushort X2;
|
||||||
public ushort Y1;
|
public ushort Y1;
|
||||||
public ushort Y2;
|
public ushort Y2;
|
||||||
public uint Padding;
|
public uint Padding;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -246,11 +244,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct StencilBackMasks
|
struct StencilBackMasks
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public int FuncRef;
|
public int FuncRef;
|
||||||
public int Mask;
|
public int Mask;
|
||||||
public int FuncMask;
|
public int FuncMask;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -258,12 +256,12 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct RtDepthStencilState
|
struct RtDepthStencilState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public GpuVa Address;
|
public GpuVa Address;
|
||||||
public ZetaFormat Format;
|
public ZetaFormat Format;
|
||||||
public MemoryLayout MemoryLayout;
|
public MemoryLayout MemoryLayout;
|
||||||
public int LayerSize;
|
public int LayerSize;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -271,12 +269,12 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct ScreenScissorState
|
struct ScreenScissorState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public ushort X;
|
public ushort X;
|
||||||
public ushort Width;
|
public ushort Width;
|
||||||
public ushort Y;
|
public ushort Y;
|
||||||
public ushort Height;
|
public ushort Height;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -319,9 +317,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct VertexAttribState
|
struct VertexAttribState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Attribute;
|
public uint Attribute;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unpacks the index of the vertex buffer this attribute belongs to.
|
/// Unpacks the index of the vertex buffer this attribute belongs to.
|
||||||
@ -383,9 +380,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct RtControl
|
struct RtControl
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Packed;
|
public uint Packed;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unpacks the number of active draw buffers.
|
/// Unpacks the number of active draw buffers.
|
||||||
@ -412,7 +408,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct Size3D
|
struct Size3D
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public int Width;
|
public int Width;
|
||||||
public int Height;
|
public int Height;
|
||||||
public ushort Depth;
|
public ushort Depth;
|
||||||
@ -422,7 +418,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
{
|
{
|
||||||
return (Flags & 1) == 0;
|
return (Flags & 1) == 0;
|
||||||
}
|
}
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -430,7 +425,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct StencilTestState
|
struct StencilTestState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 Enable;
|
public Boolean32 Enable;
|
||||||
public StencilOp FrontSFail;
|
public StencilOp FrontSFail;
|
||||||
public StencilOp FrontDpFail;
|
public StencilOp FrontDpFail;
|
||||||
@ -439,7 +434,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
public int FrontFuncRef;
|
public int FrontFuncRef;
|
||||||
public int FrontFuncMask;
|
public int FrontFuncMask;
|
||||||
public int FrontMask;
|
public int FrontMask;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -457,12 +452,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct RgbHalf
|
struct RgbHalf
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint R;
|
public uint R;
|
||||||
public uint G;
|
public uint G;
|
||||||
public uint B;
|
public uint B;
|
||||||
public uint Padding;
|
public uint Padding;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unpacks the red color component as a 16-bit float value.
|
/// Unpacks the red color component as a 16-bit float value.
|
||||||
@ -512,10 +506,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct PoolState
|
struct PoolState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public GpuVa Address;
|
public GpuVa Address;
|
||||||
public int MaximumId;
|
public int MaximumId;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -523,13 +517,13 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct StencilBackTestState
|
struct StencilBackTestState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 TwoSided;
|
public Boolean32 TwoSided;
|
||||||
public StencilOp BackSFail;
|
public StencilOp BackSFail;
|
||||||
public StencilOp BackDpFail;
|
public StencilOp BackDpFail;
|
||||||
public StencilOp BackDpPass;
|
public StencilOp BackDpPass;
|
||||||
public CompareOp BackFunc;
|
public CompareOp BackFunc;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -537,10 +531,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct PrimitiveRestartState
|
struct PrimitiveRestartState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 Enable;
|
public Boolean32 Enable;
|
||||||
public int Index;
|
public int Index;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -549,12 +543,12 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct IndexBufferState
|
struct IndexBufferState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public GpuVa Address;
|
public GpuVa Address;
|
||||||
public GpuVa EndAddress;
|
public GpuVa EndAddress;
|
||||||
public IndexType Type;
|
public IndexType Type;
|
||||||
public int First;
|
public int First;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -562,11 +556,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct FaceState
|
struct FaceState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 CullEnable;
|
public Boolean32 CullEnable;
|
||||||
public FrontFace FrontFace;
|
public FrontFace FrontFace;
|
||||||
public Face CullFace;
|
public Face CullFace;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -584,10 +578,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct LogicalOpState
|
struct LogicalOpState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 Enable;
|
public Boolean32 Enable;
|
||||||
public LogicalOp LogicalOp;
|
public LogicalOp LogicalOp;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -645,11 +639,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct VertexBufferState
|
struct VertexBufferState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Control;
|
public uint Control;
|
||||||
public GpuVa Address;
|
public GpuVa Address;
|
||||||
public int Divisor;
|
public int Divisor;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Vertex buffer stride, defined as the number of bytes occupied by each vertex in memory.
|
/// Vertex buffer stride, defined as the number of bytes occupied by each vertex in memory.
|
||||||
@ -675,7 +668,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct BlendStateCommon
|
struct BlendStateCommon
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 SeparateAlpha;
|
public Boolean32 SeparateAlpha;
|
||||||
public BlendOp ColorOp;
|
public BlendOp ColorOp;
|
||||||
public BlendFactor ColorSrcFactor;
|
public BlendFactor ColorSrcFactor;
|
||||||
@ -684,7 +677,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
public BlendFactor AlphaSrcFactor;
|
public BlendFactor AlphaSrcFactor;
|
||||||
public uint Unknown0x1354;
|
public uint Unknown0x1354;
|
||||||
public BlendFactor AlphaDstFactor;
|
public BlendFactor AlphaDstFactor;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -692,7 +685,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct BlendState
|
struct BlendState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Boolean32 SeparateAlpha;
|
public Boolean32 SeparateAlpha;
|
||||||
public BlendOp ColorOp;
|
public BlendOp ColorOp;
|
||||||
public BlendFactor ColorSrcFactor;
|
public BlendFactor ColorSrcFactor;
|
||||||
@ -701,7 +694,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
public BlendFactor AlphaSrcFactor;
|
public BlendFactor AlphaSrcFactor;
|
||||||
public BlendFactor AlphaDstFactor;
|
public BlendFactor AlphaDstFactor;
|
||||||
public uint Padding;
|
public uint Padding;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -709,7 +702,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct ShaderState
|
struct ShaderState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Control;
|
public uint Control;
|
||||||
public uint Offset;
|
public uint Offset;
|
||||||
public uint Unknown0x8;
|
public uint Unknown0x8;
|
||||||
@ -726,7 +719,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
public uint Unknown0x34;
|
public uint Unknown0x34;
|
||||||
public uint Unknown0x38;
|
public uint Unknown0x38;
|
||||||
public uint Unknown0x3c;
|
public uint Unknown0x3c;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unpacks shader enable information.
|
/// Unpacks shader enable information.
|
||||||
@ -744,16 +736,16 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct UniformBufferState
|
struct UniformBufferState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public int Size;
|
public int Size;
|
||||||
public GpuVa Address;
|
public GpuVa Address;
|
||||||
public int Offset;
|
public int Offset;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe struct ThreedClassState : IShadowState
|
unsafe struct ThreedClassState : IShadowState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint SetObject;
|
public uint SetObject;
|
||||||
public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF);
|
public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF);
|
||||||
public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
|
public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
|
||||||
@ -1052,6 +1044,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||||||
public Array4<Array32<uint>> TfVaryingLocations;
|
public Array4<Array32<uint>> TfVaryingLocations;
|
||||||
public fixed uint Reserved2A00[640];
|
public fixed uint Reserved2A00[640];
|
||||||
public Array256<uint> SetMmeShadowScratch;
|
public Array256<uint> SetMmeShadowScratch;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -486,10 +486,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Twod
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct RenderSolidPrimPoint
|
struct RenderSolidPrimPoint
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint SetX;
|
public uint SetX;
|
||||||
public uint Y;
|
public uint Y;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -497,7 +497,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Twod
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
unsafe struct TwodClassState : IShadowState
|
unsafe struct TwodClassState : IShadowState
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint SetObject;
|
public uint SetObject;
|
||||||
public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF);
|
public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF);
|
||||||
public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
|
public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
|
||||||
@ -811,6 +811,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Twod
|
|||||||
public readonly bool MmeDmaWriteMethodBarrierV => (MmeDmaWriteMethodBarrier & 0x1) != 0;
|
public readonly bool MmeDmaWriteMethodBarrierV => (MmeDmaWriteMethodBarrier & 0x1) != 0;
|
||||||
public fixed uint ReservedDF0[2436];
|
public fixed uint ReservedDF0[2436];
|
||||||
public Array256<uint> SetMmeShadowScratch;
|
public Array256<uint> SetMmeShadowScratch;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Twod
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct TwodTexture
|
struct TwodTexture
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public ColorFormat Format;
|
public ColorFormat Format;
|
||||||
public Boolean32 LinearLayout;
|
public Boolean32 LinearLayout;
|
||||||
public MemoryLayout MemoryLayout;
|
public MemoryLayout MemoryLayout;
|
||||||
@ -17,6 +17,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Twod
|
|||||||
public int Width;
|
public int Width;
|
||||||
public int Height;
|
public int Height;
|
||||||
public GpuVa Address;
|
public GpuVa Address;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,9 @@ namespace Ryujinx.Graphics.Gpu.Engine.Types
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct GpuVa
|
struct GpuVa
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint High;
|
public uint High;
|
||||||
public uint Low;
|
public uint Low;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Packs the split address into a 64-bits address value.
|
/// Packs the split address into a 64-bits address value.
|
||||||
|
@ -5,9 +5,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Types
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct MemoryLayout
|
struct MemoryLayout
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Packed;
|
public uint Packed;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
public readonly int UnpackGobBlocksInX()
|
public readonly int UnpackGobBlocksInX()
|
||||||
{
|
{
|
||||||
|
@ -5,12 +5,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Types
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct SbDescriptor
|
struct SbDescriptor
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint AddressLow;
|
public uint AddressLow;
|
||||||
public uint AddressHigh;
|
public uint AddressHigh;
|
||||||
public int Size;
|
public int Size;
|
||||||
public int Padding;
|
public int Padding;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
public readonly ulong PackAddress()
|
public readonly ulong PackAddress()
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,6 @@ namespace Ryujinx.Graphics.Gpu
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal DirtyHacks DirtyHacks { get; }
|
internal DirtyHacks DirtyHacks { get; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Host hardware capabilities.
|
/// Host hardware capabilities.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using Ryujinx.Graphics.GAL;
|
using Ryujinx.Graphics.GAL;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Gpu.Image
|
namespace Ryujinx.Graphics.Gpu.Image
|
||||||
{
|
{
|
||||||
@ -555,7 +554,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
{ VertexAttributeFormat.A2B10G10R10Uscaled, Format.R10G10B10A2Uscaled },
|
{ VertexAttributeFormat.A2B10G10R10Uscaled, Format.R10G10B10A2Uscaled },
|
||||||
{ VertexAttributeFormat.A2B10G10R10Sscaled, Format.R10G10B10A2Sscaled },
|
{ VertexAttributeFormat.A2B10G10R10Sscaled, Format.R10G10B10A2Sscaled },
|
||||||
};
|
};
|
||||||
#pragma warning restore IDE0055
|
|
||||||
|
|
||||||
// Note: Some of those formats have been changed and requires conversion on the shader,
|
// Note: Some of those formats have been changed and requires conversion on the shader,
|
||||||
// as GPUs don't support them when used as buffer texture format.
|
// as GPUs don't support them when used as buffer texture format.
|
||||||
@ -640,6 +638,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
{ VertexAttributeFormat.A2B10G10R10Sint, (Format.R10G10B10A2Uint, 4) }, // Sint -> Uint
|
{ VertexAttributeFormat.A2B10G10R10Sint, (Format.R10G10B10A2Uint, 4) }, // Sint -> Uint
|
||||||
{ VertexAttributeFormat.A2B10G10R10Uscaled, (Format.R10G10B10A2Uint, 4) }, // Uscaled -> Uint
|
{ VertexAttributeFormat.A2B10G10R10Uscaled, (Format.R10G10B10A2Uint, 4) }, // Uscaled -> Uint
|
||||||
{ VertexAttributeFormat.A2B10G10R10Sscaled, (Format.R10G10B10A2Sint, 4) } // Sscaled -> Sint
|
{ VertexAttributeFormat.A2B10G10R10Sscaled, (Format.R10G10B10A2Sint, 4) } // Sscaled -> Sint
|
||||||
|
#pragma warning restore IDE0055
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -53,7 +53,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
|
|
||||||
private const float Frac8ToF32 = 1.0f / 256.0f;
|
private const float Frac8ToF32 = 1.0f / 256.0f;
|
||||||
|
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Word0;
|
public uint Word0;
|
||||||
public uint Word1;
|
public uint Word1;
|
||||||
public uint Word2;
|
public uint Word2;
|
||||||
@ -62,7 +61,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
public float BorderColorG;
|
public float BorderColorG;
|
||||||
public float BorderColorB;
|
public float BorderColorB;
|
||||||
public float BorderColorA;
|
public float BorderColorA;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unpacks the texture wrap mode along the X axis.
|
/// Unpacks the texture wrap mode along the X axis.
|
||||||
|
@ -9,7 +9,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct TextureDescriptor : ITextureDescriptor, IEquatable<TextureDescriptor>
|
struct TextureDescriptor : ITextureDescriptor, IEquatable<TextureDescriptor>
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Word0;
|
public uint Word0;
|
||||||
public uint Word1;
|
public uint Word1;
|
||||||
public uint Word2;
|
public uint Word2;
|
||||||
@ -18,7 +18,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
public uint Word5;
|
public uint Word5;
|
||||||
public uint Word6;
|
public uint Word6;
|
||||||
public uint Word7;
|
public uint Word7;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unpacks Maxwell texture format integer.
|
/// Unpacks Maxwell texture format integer.
|
||||||
|
@ -9,14 +9,13 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct ShaderAddresses : IEquatable<ShaderAddresses>
|
struct ShaderAddresses : IEquatable<ShaderAddresses>
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public ulong VertexA;
|
public ulong VertexA;
|
||||||
public ulong VertexB;
|
public ulong VertexB;
|
||||||
public ulong TessControl;
|
public ulong TessControl;
|
||||||
public ulong TessEvaluation;
|
public ulong TessEvaluation;
|
||||||
public ulong Geometry;
|
public ulong Geometry;
|
||||||
public ulong Fragment;
|
public ulong Fragment;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if the addresses are equal.
|
/// Check if the addresses are equal.
|
||||||
|
@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.Host1x
|
|||||||
{
|
{
|
||||||
struct Host1xClassRegisters
|
struct Host1xClassRegisters
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint IncrSyncpt;
|
public uint IncrSyncpt;
|
||||||
public uint IncrSyncptCntrl;
|
public uint IncrSyncptCntrl;
|
||||||
public uint IncrSyncptError;
|
public uint IncrSyncptError;
|
||||||
@ -38,6 +38,6 @@ namespace Ryujinx.Graphics.Host1x
|
|||||||
public uint Xrefctrl;
|
public uint Xrefctrl;
|
||||||
public uint ChannelXrefHi;
|
public uint ChannelXrefHi;
|
||||||
public uint ChannelXrefLo;
|
public uint ChannelXrefLo;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.Host1x
|
|||||||
{
|
{
|
||||||
struct ThiRegisters
|
struct ThiRegisters
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint IncrSyncpt;
|
public uint IncrSyncpt;
|
||||||
public uint Reserved4;
|
public uint Reserved4;
|
||||||
public uint IncrSyncptErr;
|
public uint IncrSyncptErr;
|
||||||
@ -19,6 +19,6 @@ namespace Ryujinx.Graphics.Host1x
|
|||||||
public Array12<uint> Reserved48;
|
public Array12<uint> Reserved48;
|
||||||
public uint IntStatus;
|
public uint IntStatus;
|
||||||
public uint IntMask;
|
public uint IntMask;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
{
|
{
|
||||||
struct AVCodec
|
struct AVCodec
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public unsafe byte* Name;
|
public unsafe byte* Name;
|
||||||
public unsafe byte* LongName;
|
public unsafe byte* LongName;
|
||||||
public int Type;
|
public int Type;
|
||||||
@ -19,6 +19,6 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
public nint Profiles;
|
public nint Profiles;
|
||||||
public unsafe byte* WrapperName;
|
public unsafe byte* WrapperName;
|
||||||
public nint ChLayouts;
|
public nint ChLayouts;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
{
|
{
|
||||||
struct AVCodec501
|
struct AVCodec501
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public unsafe byte* Name;
|
public unsafe byte* Name;
|
||||||
public unsafe byte* LongName;
|
public unsafe byte* LongName;
|
||||||
public int Type;
|
public int Type;
|
||||||
@ -18,6 +18,6 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
public unsafe nint PrivClass;
|
public unsafe nint PrivClass;
|
||||||
public nint Profiles;
|
public nint Profiles;
|
||||||
public unsafe byte* WrapperName;
|
public unsafe byte* WrapperName;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
{
|
{
|
||||||
struct AVCodecContext
|
struct AVCodecContext
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public unsafe nint AvClass;
|
public unsafe nint AvClass;
|
||||||
public int LogLevelOffset;
|
public int LogLevelOffset;
|
||||||
public int CodecType;
|
public int CodecType;
|
||||||
@ -165,6 +165,6 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
public long MaxSamples;
|
public long MaxSamples;
|
||||||
public int ExportSideData;
|
public int ExportSideData;
|
||||||
public nint GetEncodeBuffer;
|
public nint GetEncodeBuffer;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
{
|
{
|
||||||
struct AVFrame
|
struct AVFrame
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Array8<nint> Data;
|
public Array8<nint> Data;
|
||||||
public Array8<int> LineSize;
|
public Array8<int> LineSize;
|
||||||
public nint ExtendedData;
|
public nint ExtendedData;
|
||||||
@ -29,7 +29,6 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
public long ReorderedOpaque;
|
public long ReorderedOpaque;
|
||||||
public int SampleRate;
|
public int SampleRate;
|
||||||
public ulong ChannelLayout;
|
public ulong ChannelLayout;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
// NOTE: There is more after, but the layout kind of changed a bit and we don't need more than this. This is safe as we only manipulate this behind a reference.
|
// NOTE: There is more after, but the layout kind of changed a bit and we don't need more than this. This is safe as we only manipulate this behind a reference.
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
{
|
{
|
||||||
struct AVPacket
|
struct AVPacket
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public unsafe AVBufferRef* Buf;
|
public unsafe AVBufferRef* Buf;
|
||||||
public long Pts;
|
public long Pts;
|
||||||
public long Dts;
|
public long Dts;
|
||||||
@ -19,6 +19,6 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
public AVBufferRef Opaque;
|
public AVBufferRef Opaque;
|
||||||
public unsafe AVBufferRef* OpaqueRef;
|
public unsafe AVBufferRef* OpaqueRef;
|
||||||
public AVRational TimeBase;
|
public AVRational TimeBase;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
{
|
{
|
||||||
struct FFCodec<T> where T : struct
|
struct FFCodec<T> where T : struct
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public T Base;
|
public T Base;
|
||||||
public int CapsInternalOrCbType;
|
public int CapsInternalOrCbType;
|
||||||
public int PrivDataSize;
|
public int PrivDataSize;
|
||||||
@ -12,7 +12,6 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
public nint InitStaticData;
|
public nint InitStaticData;
|
||||||
public nint Init;
|
public nint Init;
|
||||||
public nint CodecCallback;
|
public nint CodecCallback;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
// NOTE: There is more after, but the layout kind of changed a bit and we don't need more than this. This is safe as we only manipulate this behind a reference.
|
// NOTE: There is more after, but the layout kind of changed a bit and we don't need more than this. This is safe as we only manipulate this behind a reference.
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
{
|
{
|
||||||
struct FFCodecLegacy<T> where T : struct
|
struct FFCodecLegacy<T> where T : struct
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public T Base;
|
public T Base;
|
||||||
public uint CapsInternalOrCbType;
|
public uint CapsInternalOrCbType;
|
||||||
public int PrivDataSize;
|
public int PrivDataSize;
|
||||||
@ -14,7 +14,6 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
|
|||||||
public nint EncodeSub;
|
public nint EncodeSub;
|
||||||
public nint Encode2;
|
public nint Encode2;
|
||||||
public nint Decode;
|
public nint Decode;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
// NOTE: There is more after, but the layout kind of changed a bit and we don't need more than this. This is safe as we only manipulate this behind a reference.
|
// NOTE: There is more after, but the layout kind of changed a bit and we don't need more than this. This is safe as we only manipulate this behind a reference.
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,10 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
|
|||||||
// passed it can be loaded into vector registers.
|
// passed it can be loaded into vector registers.
|
||||||
internal struct LoopFilterThresh
|
internal struct LoopFilterThresh
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Array16<byte> Mblim;
|
public Array16<byte> Mblim;
|
||||||
public Array16<byte> Lim;
|
public Array16<byte> Lim;
|
||||||
public Array16<byte> HevThr;
|
public Array16<byte> HevThr;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.Nvdec
|
|||||||
{
|
{
|
||||||
struct NvdecRegisters
|
struct NvdecRegisters
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Array64<uint> Reserved0;
|
public Array64<uint> Reserved0;
|
||||||
public uint Nop;
|
public uint Nop;
|
||||||
public Array63<uint> Reserved104;
|
public Array63<uint> Reserved104;
|
||||||
@ -58,6 +58,6 @@ namespace Ryujinx.Graphics.Nvdec
|
|||||||
public uint Vp9SetColMvWriteBufOffset;
|
public uint Vp9SetColMvWriteBufOffset;
|
||||||
public uint Vp9SetColMvReadBufOffset;
|
public uint Vp9SetColMvReadBufOffset;
|
||||||
public uint Vp9SetFilterBufferOffset;
|
public uint Vp9SetFilterBufferOffset;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,13 @@ namespace Ryujinx.Graphics.Nvdec
|
|||||||
{
|
{
|
||||||
struct NvdecStatus
|
struct NvdecStatus
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint MbsCorrectlyDecoded;
|
public uint MbsCorrectlyDecoded;
|
||||||
public uint MbsInError;
|
public uint MbsInError;
|
||||||
public uint Reserved;
|
public uint Reserved;
|
||||||
public uint ErrorStatus;
|
public uint ErrorStatus;
|
||||||
public FrameStats Stats;
|
public FrameStats Stats;
|
||||||
public uint SliceHeaderErrorCode;
|
public uint SliceHeaderErrorCode;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
using Ryujinx.Common.Memory;
|
using Ryujinx.Common.Memory;
|
||||||
using Ryujinx.Graphics.Video;
|
using Ryujinx.Graphics.Video;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Nvdec.Types.H264
|
namespace Ryujinx.Graphics.Nvdec.Types.H264
|
||||||
{
|
{
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
struct PictureInfo
|
struct PictureInfo
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0051, CS0169, CS0649 // Remove unused private member
|
|
||||||
Array18<uint> Unknown0;
|
Array18<uint> Unknown0;
|
||||||
#pragma warning restore IDE0051
|
|
||||||
public uint BitstreamSize;
|
public uint BitstreamSize;
|
||||||
public uint NumSlices;
|
public uint NumSlices;
|
||||||
public uint Unknown50;
|
public uint Unknown50;
|
||||||
@ -49,7 +50,6 @@ namespace Ryujinx.Graphics.Nvdec.Types.H264
|
|||||||
public Array16<byte> MvcextViewRefMasksL1;
|
public Array16<byte> MvcextViewRefMasksL1;
|
||||||
public uint Flags2;
|
public uint Flags2;
|
||||||
public Array10<uint> Unknown2D4;
|
public Array10<uint> Unknown2D4;
|
||||||
#pragma warning restore CS0169, CS0649
|
|
||||||
|
|
||||||
public readonly bool MbAdaptiveFrameFieldFlag => (Flags & (1 << 0)) != 0;
|
public readonly bool MbAdaptiveFrameFieldFlag => (Flags & (1 << 0)) != 0;
|
||||||
public readonly bool Direct8x8InferenceFlag => (Flags & (1 << 1)) != 0;
|
public readonly bool Direct8x8InferenceFlag => (Flags & (1 << 1)) != 0;
|
||||||
|
@ -4,11 +4,10 @@ namespace Ryujinx.Graphics.Nvdec.Types.H264
|
|||||||
{
|
{
|
||||||
struct ReferenceFrame
|
struct ReferenceFrame
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Flags;
|
public uint Flags;
|
||||||
public Array2<uint> FieldOrderCnt;
|
public Array2<uint> FieldOrderCnt;
|
||||||
public uint FrameNum;
|
public uint FrameNum;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
public readonly uint OutputSurfaceIndex => (uint)Flags & 0x7f;
|
public readonly uint OutputSurfaceIndex => (uint)Flags & 0x7f;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp8
|
|||||||
{
|
{
|
||||||
struct PictureInfo
|
struct PictureInfo
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Array13<uint> Unknown0;
|
public Array13<uint> Unknown0;
|
||||||
public uint GpTimerTimeoutValue;
|
public uint GpTimerTimeoutValue;
|
||||||
public ushort FrameWidth;
|
public ushort FrameWidth;
|
||||||
@ -58,7 +58,6 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp8
|
|||||||
public uint ResultValue; // ucode return result
|
public uint ResultValue; // ucode return result
|
||||||
public Array8<uint> PartitionOffset;
|
public Array8<uint> PartitionOffset;
|
||||||
public Array3<uint> Reserved4;
|
public Array3<uint> Reserved4;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
public Vp8PictureInfo Convert()
|
public Vp8PictureInfo Convert()
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
{
|
{
|
||||||
struct EntropyProbs
|
struct EntropyProbs
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Array10<Array10<Array8<byte>>> KfYModeProbE0ToE7;
|
public Array10<Array10<Array8<byte>>> KfYModeProbE0ToE7;
|
||||||
public Array10<Array10<byte>> KfYModeProbE8;
|
public Array10<Array10<byte>> KfYModeProbE8;
|
||||||
public Array3<byte> Padding384;
|
public Array3<byte> Padding384;
|
||||||
@ -42,7 +42,6 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
public Array5<byte> CompRefProb;
|
public Array5<byte> CompRefProb;
|
||||||
public Array17<byte> Padding58F;
|
public Array17<byte> Padding58F;
|
||||||
public Array4<Array2<Array2<Array6<Array6<Array4<byte>>>>>> CoefProbs;
|
public Array4<Array2<Array2<Array6<Array6<Array4<byte>>>>>> CoefProbs;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
public void Convert(ref Vp9EntropyProbs fc)
|
public void Convert(ref Vp9EntropyProbs fc)
|
||||||
{
|
{
|
||||||
|
@ -2,11 +2,11 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
{
|
{
|
||||||
struct FrameSize
|
struct FrameSize
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public ushort Width;
|
public ushort Width;
|
||||||
public ushort Height;
|
public ushort Height;
|
||||||
public ushort LumaPitch;
|
public ushort LumaPitch;
|
||||||
public ushort ChromaPitch;
|
public ushort ChromaPitch;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
{
|
{
|
||||||
struct FrameStats
|
struct FrameStats
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public uint Unknown0;
|
public uint Unknown0;
|
||||||
public uint Unknown4;
|
public uint Unknown4;
|
||||||
public uint Pass2CycleCount;
|
public uint Pass2CycleCount;
|
||||||
@ -16,6 +16,6 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
public uint FrameStatusBwdMvyCnt;
|
public uint FrameStatusBwdMvyCnt;
|
||||||
public uint ErrorCtbPos;
|
public uint ErrorCtbPos;
|
||||||
public uint ErrorSlicePos;
|
public uint ErrorSlicePos;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,10 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
{
|
{
|
||||||
struct LoopFilter
|
struct LoopFilter
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public byte ModeRefDeltaEnabled;
|
public byte ModeRefDeltaEnabled;
|
||||||
public Array4<sbyte> RefDeltas;
|
public Array4<sbyte> RefDeltas;
|
||||||
public Array2<sbyte> ModeDeltas;
|
public Array2<sbyte> ModeDeltas;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
{
|
{
|
||||||
struct PictureInfo
|
struct PictureInfo
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public Array12<uint> Unknown0;
|
public Array12<uint> Unknown0;
|
||||||
public uint BitstreamSize;
|
public uint BitstreamSize;
|
||||||
public uint IsEncrypted;
|
public uint IsEncrypted;
|
||||||
@ -42,7 +42,6 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
public uint UnknownF4;
|
public uint UnknownF4;
|
||||||
public uint UnknownF8;
|
public uint UnknownF8;
|
||||||
public uint UnknownFC;
|
public uint UnknownFC;
|
||||||
#pragma warning restore CS0649
|
|
||||||
|
|
||||||
public readonly uint BitDepth => (SurfaceParams >> 1) & 0xf;
|
public readonly uint BitDepth => (SurfaceParams >> 1) & 0xf;
|
||||||
|
|
||||||
|
@ -4,13 +4,13 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9
|
|||||||
{
|
{
|
||||||
struct Segmentation
|
struct Segmentation
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649 // Field is never assigned to
|
|
||||||
public byte Enabled;
|
public byte Enabled;
|
||||||
public byte UpdateMap;
|
public byte UpdateMap;
|
||||||
public byte TemporalUpdate;
|
public byte TemporalUpdate;
|
||||||
public byte AbsDelta;
|
public byte AbsDelta;
|
||||||
public Array8<uint> FeatureMask;
|
public Array8<uint> FeatureMask;
|
||||||
public Array8<Array4<short>> FeatureData;
|
public Array8<Array4<short>> FeatureData;
|
||||||
#pragma warning restore CS0649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ namespace Ryujinx.Graphics.OpenGL
|
|||||||
_table = new FormatInfo[tableSize];
|
_table = new FormatInfo[tableSize];
|
||||||
_tableImage = new SizedInternalFormat[tableSize];
|
_tableImage = new SizedInternalFormat[tableSize];
|
||||||
|
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
#pragma warning disable IDE0055 // Disable formatting
|
||||||
Add(Format.R8Unorm, new FormatInfo(1, true, false, All.R8, PixelFormat.Red, PixelType.UnsignedByte));
|
Add(Format.R8Unorm, new FormatInfo(1, true, false, All.R8, PixelFormat.Red, PixelType.UnsignedByte));
|
||||||
Add(Format.R8Snorm, new FormatInfo(1, true, false, All.R8Snorm, PixelFormat.Red, PixelType.Byte));
|
Add(Format.R8Snorm, new FormatInfo(1, true, false, All.R8Snorm, PixelFormat.Red, PixelType.Byte));
|
||||||
Add(Format.R8Uint, new FormatInfo(1, false, false, All.R8ui, PixelFormat.RedInteger, PixelType.UnsignedByte));
|
Add(Format.R8Uint, new FormatInfo(1, false, false, All.R8ui, PixelFormat.RedInteger, PixelType.UnsignedByte));
|
||||||
|
@ -14,7 +14,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
|||||||
{
|
{
|
||||||
_infoTable = new InstInfo[(int)Instruction.Count];
|
_infoTable = new InstInfo[(int)Instruction.Count];
|
||||||
|
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
#pragma warning disable IDE0055 // Disable formatting
|
||||||
Add(Instruction.AtomicAdd, InstType.AtomicBinary, "atomicAdd");
|
Add(Instruction.AtomicAdd, InstType.AtomicBinary, "atomicAdd");
|
||||||
Add(Instruction.AtomicAnd, InstType.AtomicBinary, "atomicAnd");
|
Add(Instruction.AtomicAnd, InstType.AtomicBinary, "atomicAnd");
|
||||||
Add(Instruction.AtomicCompareAndSwap, InstType.AtomicTernary, "atomicCompSwap");
|
Add(Instruction.AtomicCompareAndSwap, InstType.AtomicTernary, "atomicCompSwap");
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
||||||
{
|
{
|
||||||
|
@ -5,11 +5,10 @@ using Spv.Generator;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Instruction = Spv.Generator.Instruction;
|
using Instruction = Spv.Generator.Instruction;
|
||||||
|
using IrOperandType = Ryujinx.Graphics.Shader.IntermediateRepresentation.OperandType;
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
{
|
{
|
||||||
using IrOperandType = IntermediateRepresentation.OperandType;
|
|
||||||
|
|
||||||
partial class CodeGenContext : Module
|
partial class CodeGenContext : Module
|
||||||
{
|
{
|
||||||
private const uint SpirvVersionMajor = 1;
|
private const uint SpirvVersionMajor = 1;
|
||||||
|
@ -6,12 +6,11 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using static Spv.Specification;
|
using static Spv.Specification;
|
||||||
|
using SpvInstruction = Spv.Generator.Instruction;
|
||||||
|
using SpvLiteralInteger = Spv.Generator.LiteralInteger;
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
{
|
{
|
||||||
using SpvInstruction = Spv.Generator.Instruction;
|
|
||||||
using SpvLiteralInteger = Spv.Generator.LiteralInteger;
|
|
||||||
|
|
||||||
static class Instructions
|
static class Instructions
|
||||||
{
|
{
|
||||||
private const MemorySemanticsMask DefaultMemorySemantics =
|
private const MemorySemanticsMask DefaultMemorySemantics =
|
||||||
@ -27,7 +26,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||||||
{
|
{
|
||||||
_instTable = new Func<CodeGenContext, AstOperation, OperationResult>[(int)Instruction.Count];
|
_instTable = new Func<CodeGenContext, AstOperation, OperationResult>[(int)Instruction.Count];
|
||||||
|
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
#pragma warning disable IDE0055 // Disable formatting
|
||||||
Add(Instruction.Absolute, GenerateAbsolute);
|
Add(Instruction.Absolute, GenerateAbsolute);
|
||||||
Add(Instruction.Add, GenerateAdd);
|
Add(Instruction.Add, GenerateAdd);
|
||||||
Add(Instruction.AtomicAdd, GenerateAtomicAdd);
|
Add(Instruction.AtomicAdd, GenerateAtomicAdd);
|
||||||
|
@ -6,14 +6,13 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using static Spv.Specification;
|
using static Spv.Specification;
|
||||||
|
using SpvInstruction = Spv.Generator.Instruction;
|
||||||
|
using SpvInstructionPool = Spv.Generator.GeneratorPool<Spv.Generator.Instruction>;
|
||||||
|
using SpvLiteralInteger = Spv.Generator.LiteralInteger;
|
||||||
|
using SpvLiteralIntegerPool = Spv.Generator.GeneratorPool<Spv.Generator.LiteralInteger>;
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
{
|
{
|
||||||
using SpvInstruction = Spv.Generator.Instruction;
|
|
||||||
using SpvInstructionPool = Spv.Generator.GeneratorPool<Spv.Generator.Instruction>;
|
|
||||||
using SpvLiteralInteger = Spv.Generator.LiteralInteger;
|
|
||||||
using SpvLiteralIntegerPool = Spv.Generator.GeneratorPool<Spv.Generator.LiteralInteger>;
|
|
||||||
|
|
||||||
static class SpirvGenerator
|
static class SpirvGenerator
|
||||||
{
|
{
|
||||||
// Resource pools for Spirv generation. Note: Increase count when more threads are being used.
|
// Resource pools for Spirv generation. Note: Increase count when more threads are being used.
|
||||||
|
@ -3664,9 +3664,9 @@ namespace Ryujinx.Graphics.Shader.Decoders
|
|||||||
|
|
||||||
readonly struct InstLepc
|
readonly struct InstLepc
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0052 // Remove unread private member
|
|
||||||
private readonly ulong _opcode;
|
private readonly ulong _opcode;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
public InstLepc(ulong opcode) => _opcode = opcode;
|
public InstLepc(ulong opcode) => _opcode = opcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4181,9 +4181,9 @@ namespace Ryujinx.Graphics.Shader.Decoders
|
|||||||
|
|
||||||
readonly struct InstRam
|
readonly struct InstRam
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0052 // Remove unread private member
|
|
||||||
private readonly ulong _opcode;
|
private readonly ulong _opcode;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
public InstRam(ulong opcode) => _opcode = opcode;
|
public InstRam(ulong opcode) => _opcode = opcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4252,9 +4252,9 @@ namespace Ryujinx.Graphics.Shader.Decoders
|
|||||||
|
|
||||||
readonly struct InstRtt
|
readonly struct InstRtt
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0052 // Remove unread private member
|
|
||||||
private readonly ulong _opcode;
|
private readonly ulong _opcode;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
public InstRtt(ulong opcode) => _opcode = opcode;
|
public InstRtt(ulong opcode) => _opcode = opcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4270,9 +4270,9 @@ namespace Ryujinx.Graphics.Shader.Decoders
|
|||||||
|
|
||||||
readonly struct InstSam
|
readonly struct InstSam
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0052 // Remove unread private member
|
|
||||||
private readonly ulong _opcode;
|
private readonly ulong _opcode;
|
||||||
#pragma warning restore IDE0052
|
|
||||||
public InstSam(ulong opcode) => _opcode = opcode;
|
public InstSam(ulong opcode) => _opcode = opcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
|
|||||||
_opCodes = new TableEntry[1 << EncodingBits];
|
_opCodes = new TableEntry[1 << EncodingBits];
|
||||||
|
|
||||||
#region Instructions
|
#region Instructions
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
#pragma warning disable IDE0055 // Disable formatting
|
||||||
Add("1110111110100xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", InstName.Al2p, InstEmit.Al2p, InstProps.Rd | InstProps.Ra);
|
Add("1110111110100xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", InstName.Al2p, InstEmit.Al2p, InstProps.Rd | InstProps.Ra);
|
||||||
Add("1110111111011xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", InstName.Ald, InstEmit.Ald, InstProps.Rd | InstProps.Ra);
|
Add("1110111111011xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", InstName.Ald, InstEmit.Ald, InstProps.Rd | InstProps.Ra);
|
||||||
Add("1110111111110xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", InstName.Ast, InstEmit.Ast, InstProps.Ra | InstProps.Rb2 | InstProps.Rc);
|
Add("1110111111110xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", InstName.Ast, InstEmit.Ast, InstProps.Ra | InstProps.Rb2 | InstProps.Rc);
|
||||||
|
@ -22,9 +22,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
|||||||
|
|
||||||
public static void Depbar(EmitterContext context)
|
public static void Depbar(EmitterContext context)
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
_ = context.GetOp<InstDepbar>();
|
||||||
InstDepbar op = context.GetOp<InstDepbar>();
|
|
||||||
#pragma warning restore IDE0059
|
|
||||||
|
|
||||||
// No operation.
|
// No operation.
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user