diff options
author | Marco Carvalho <marcolucio27@gmail.com> | 2023-06-04 17:30:04 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-04 20:30:04 +0000 |
commit | 8954ff3af20b8b6bb3940c073b24cda1c81703d5 (patch) | |
tree | 6c09cbd05e9d8bdbb09d986d0deefe4e52ca27f7 | |
parent | d2f3adbf69396488bfc5ab7b515a6f6bcfdf0c8b (diff) |
Replacing ZbcColorArray with Array4<uint> (#5210)1.1.864
* Related "if/else if" statements should not have the same condition
* replacing ZbcColorArray with Array4<uint>
* fix alignment
-rw-r--r-- | src/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs b/src/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs index ed74cc263..a4651f844 100644 --- a/src/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs +++ b/src/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs | |||
@@ -1,49 +1,16 @@ | |||
1 | using System; | 1 | using Ryujinx.Common.Memory; |
2 | using System; | ||
2 | using System.Runtime.InteropServices; | 3 | using System.Runtime.InteropServices; |
3 | 4 | ||
4 | namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types | 5 | namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types |
5 | { | 6 | { |
6 | [StructLayout(LayoutKind.Sequential)] | 7 | [StructLayout(LayoutKind.Sequential)] |
7 | struct ZbcColorArray | ||
8 | { | ||
9 | private uint element0; | ||
10 | private uint element1; | ||
11 | private uint element2; | ||
12 | private uint element3; | ||
13 | |||
14 | public uint this[int index] | ||
15 | { | ||
16 | get | ||
17 | { | ||
18 | if (index == 0) | ||
19 | { | ||
20 | return element0; | ||
21 | } | ||
22 | else if (index == 1) | ||
23 | { | ||
24 | return element1; | ||
25 | } | ||
26 | else if (index == 2) | ||
27 | { | ||
28 | return element2; | ||
29 | } | ||
30 | else if (index == 2) | ||
31 | { | ||
32 | return element3; | ||
33 | } | ||
34 | |||
35 | throw new IndexOutOfRangeException(); | ||
36 | } | ||
37 | } | ||
38 | } | ||
39 | |||
40 | [StructLayout(LayoutKind.Sequential)] | ||
41 | struct ZbcSetTableArguments | 8 | struct ZbcSetTableArguments |
42 | { | 9 | { |
43 | public ZbcColorArray ColorDs; | 10 | public Array4<uint> ColorDs; |
44 | public ZbcColorArray ColorL2; | 11 | public Array4<uint> ColorL2; |
45 | public uint Depth; | 12 | public uint Depth; |
46 | public uint Format; | 13 | public uint Format; |
47 | public uint Type; | 14 | public uint Type; |
48 | } | 15 | } |
49 | } | 16 | } |