mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-05 11:59:15 +00:00
Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)
See merge request ryubing/ryujinx!47
This commit is contained in:
@@ -4,10 +4,9 @@ namespace Ryujinx.Graphics.Vic.Types
|
||||
{
|
||||
readonly struct ClearRectStruct
|
||||
{
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
|
||||
private readonly long _word0;
|
||||
private readonly long _word1;
|
||||
#pragma warning restore CS0649
|
||||
|
||||
public int ClearRect0Left => (int)_word0.Extract(0, 14);
|
||||
public int ClearRect0Right => (int)_word0.Extract(16, 14);
|
||||
|
||||
@@ -4,13 +4,13 @@ namespace Ryujinx.Graphics.Vic.Types
|
||||
{
|
||||
struct ConfigStruct
|
||||
{
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
|
||||
public PipeConfig PipeConfig;
|
||||
public OutputConfig OutputConfig;
|
||||
public OutputSurfaceConfig OutputSurfaceConfig;
|
||||
public MatrixStruct OutColorMatrix;
|
||||
public Array4<ClearRectStruct> ClearRectStruct;
|
||||
public Array8<SlotStruct> SlotStruct;
|
||||
#pragma warning restore CS0649
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,9 @@ namespace Ryujinx.Graphics.Vic.Types
|
||||
{
|
||||
readonly struct OutputConfig
|
||||
{
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
|
||||
private readonly long _word0;
|
||||
private readonly long _word1;
|
||||
#pragma warning restore CS0649
|
||||
|
||||
public int AlphaFillMode => (int)_word0.Extract(0, 3);
|
||||
public int AlphaFillSlot => (int)_word0.Extract(3, 3);
|
||||
|
||||
@@ -4,10 +4,9 @@ namespace Ryujinx.Graphics.Vic.Types
|
||||
{
|
||||
readonly struct OutputSurfaceConfig
|
||||
{
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
|
||||
private readonly long _word0;
|
||||
private readonly long _word1;
|
||||
#pragma warning restore CS0649
|
||||
|
||||
public PixelFormat OutPixelFormat => (PixelFormat)_word0.Extract(0, 7);
|
||||
public int OutChromaLocHoriz => (int)_word0.Extract(7, 2);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Ryujinx.Common.Utilities;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.Graphics.Vic.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
readonly struct PipeConfig
|
||||
{
|
||||
#pragma warning disable CS0169, CS0649, IDE0051 // Remove unused private member
|
||||
private readonly long _word0;
|
||||
private readonly long _word1;
|
||||
#pragma warning restore CS0169, CS0649, IDE0051
|
||||
|
||||
public int DownsampleHoriz => (int)_word0.Extract(0, 11);
|
||||
public int DownsampleVert => (int)_word0.Extract(16, 11);
|
||||
|
||||
@@ -11,9 +11,8 @@ namespace Ryujinx.Graphics.Vic.Types
|
||||
private readonly long _word4;
|
||||
private readonly long _word5;
|
||||
private readonly long _word6;
|
||||
#pragma warning disable IDE0051 // Remove unused private member
|
||||
|
||||
private readonly long _word7;
|
||||
#pragma warning restore IDE0051
|
||||
|
||||
public bool SlotEnable => _word0.Extract(0);
|
||||
public bool DeNoise => _word0.Extract(1);
|
||||
|
||||
Reference in New Issue
Block a user