aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Carvalho <marcolucio27@gmail.com>2023-06-04 17:30:04 -0300
committerGitHub <noreply@github.com>2023-06-04 20:30:04 +0000
commit8954ff3af20b8b6bb3940c073b24cda1c81703d5 (patch)
tree6c09cbd05e9d8bdbb09d986d0deefe4e52ca27f7
parentd2f3adbf69396488bfc5ab7b515a6f6bcfdf0c8b (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.cs47
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 ed74cc26..a4651f84 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 @@
-using System;
+using Ryujinx.Common.Memory;
+using System;
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
{
[StructLayout(LayoutKind.Sequential)]
- struct ZbcColorArray
- {
- private uint element0;
- private uint element1;
- private uint element2;
- private uint element3;
-
- public uint this[int index]
- {
- get
- {
- if (index == 0)
- {
- return element0;
- }
- else if (index == 1)
- {
- return element1;
- }
- else if (index == 2)
- {
- return element2;
- }
- else if (index == 2)
- {
- return element3;
- }
-
- throw new IndexOutOfRangeException();
- }
- }
- }
-
- [StructLayout(LayoutKind.Sequential)]
struct ZbcSetTableArguments
{
- public ZbcColorArray ColorDs;
- public ZbcColorArray ColorL2;
- public uint Depth;
- public uint Format;
- public uint Type;
+ public Array4<uint> ColorDs;
+ public Array4<uint> ColorL2;
+ public uint Depth;
+ public uint Format;
+ public uint Type;
}
}