mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 09:35:27 +00:00
Replacing ZbcColorArray with Array4<uint> (#5210)
* Related "if/else if" statements should not have the same condition * replacing ZbcColorArray with Array4<uint> * fix alignment
This commit is contained in:
parent
d2f3adbf69
commit
8954ff3af2
|
@ -1,49 +1,16 @@
|
||||||
using System;
|
using Ryujinx.Common.Memory;
|
||||||
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
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)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
struct ZbcSetTableArguments
|
struct ZbcSetTableArguments
|
||||||
{
|
{
|
||||||
public ZbcColorArray ColorDs;
|
public Array4<uint> ColorDs;
|
||||||
public ZbcColorArray ColorL2;
|
public Array4<uint> ColorL2;
|
||||||
public uint Depth;
|
public uint Depth;
|
||||||
public uint Format;
|
public uint Format;
|
||||||
public uint Type;
|
public uint Type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue