diff options
| author | Thomas Guillemard <me@thog.eu> | 2019-11-08 15:49:28 +0100 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2019-11-08 15:49:28 +0100 |
| commit | 88593bf8727e0da05a8f319951dce19f27e287d6 (patch) | |
| tree | 7e02569fee306f462596e26068695d63107122c5 /Ryujinx.HLE/HOS/Services/Nv | |
| parent | 5116951222fe8aa934ac8277a9ff34926e8ac73f (diff) | |
Add detail of ZbcSetTableArguments (#810)
* Add detail of ZbcSetTableArguments
This is a missing part of the #800 PR that cause an assert to be
triggered in debug mode.
Also, remove Fence in SurfaceFlinger as it's a duplicate of NvFence.
* Fix critical issue in size checking of ioctl
oops
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Nv')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs | 43 |
2 files changed, 42 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs index 9e22d17e..2b9f09fa 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs @@ -91,7 +91,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv if (isRead && isWrite) { - if (outputDataPosition < inputDataSize) + if (outputDataSize < inputDataSize) { arguments = null; diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs index e21e437e..ed74cc26 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/ZbcSetTableArguments.cs @@ -1,10 +1,49 @@ -using System.Runtime.InteropServices; +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 { - // TODO + public ZbcColorArray ColorDs; + public ZbcColorArray ColorL2; + public uint Depth; + public uint Format; + public uint Type; } } |
