Initial support for the guest OpenGL driver (NVIDIA and Nouveau)
This commit is contained in:
parent
6a98c643ca
commit
e25b7c9848
25 changed files with 581 additions and 102 deletions
16
Ryujinx.Graphics.Gpu/State/BlendStateCommon.cs
Normal file
16
Ryujinx.Graphics.Gpu/State/BlendStateCommon.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using Ryujinx.Graphics.GAL.Blend;
|
||||
|
||||
namespace Ryujinx.Graphics.Gpu.State
|
||||
{
|
||||
struct BlendStateCommon
|
||||
{
|
||||
public Boolean32 SeparateAlpha;
|
||||
public BlendOp ColorOp;
|
||||
public BlendFactor ColorSrcFactor;
|
||||
public BlendFactor ColorDstFactor;
|
||||
public BlendOp AlphaOp;
|
||||
public BlendFactor AlphaSrcFactor;
|
||||
public uint Unknown0x1354;
|
||||
public BlendFactor AlphaDstFactor;
|
||||
}
|
||||
}
|
|
@ -162,6 +162,28 @@ namespace Ryujinx.Graphics.Gpu.State
|
|||
return modified;
|
||||
}
|
||||
|
||||
public bool QueryModified(
|
||||
MethodOffset m1,
|
||||
MethodOffset m2,
|
||||
MethodOffset m3,
|
||||
MethodOffset m4,
|
||||
MethodOffset m5)
|
||||
{
|
||||
bool modified = _registers[(int)m1].Modified ||
|
||||
_registers[(int)m2].Modified ||
|
||||
_registers[(int)m3].Modified ||
|
||||
_registers[(int)m4].Modified ||
|
||||
_registers[(int)m5].Modified;
|
||||
|
||||
_registers[(int)m1].Modified = false;
|
||||
_registers[(int)m2].Modified = false;
|
||||
_registers[(int)m3].Modified = false;
|
||||
_registers[(int)m4].Modified = false;
|
||||
_registers[(int)m5].Modified = false;
|
||||
|
||||
return modified;
|
||||
}
|
||||
|
||||
public T Get<T>(MethodOffset offset, int index) where T : struct
|
||||
{
|
||||
Register register = _registers[(int)offset];
|
||||
|
|
|
@ -32,11 +32,16 @@ namespace Ryujinx.Graphics.Gpu.State
|
|||
RtDepthStencilState = 0x3f8,
|
||||
VertexAttribState = 0x458,
|
||||
RtDepthStencilSize = 0x48a,
|
||||
SamplerIndex = 0x48d,
|
||||
DepthTestEnable = 0x4b3,
|
||||
BlendIndependent = 0x4b9,
|
||||
DepthWriteEnable = 0x4ba,
|
||||
DepthTestFunc = 0x4c3,
|
||||
BlendStateCommon = 0x4cf,
|
||||
BlendEnableCommon = 0x4d7,
|
||||
BlendEnable = 0x4d8,
|
||||
StencilTestState = 0x4e0,
|
||||
YControl = 0x4eb,
|
||||
FirstVertex = 0x50d,
|
||||
FirstInstance = 0x50e,
|
||||
ResetCounter = 0x54c,
|
||||
|
|
8
Ryujinx.Graphics.Gpu/State/SamplerIndex.cs
Normal file
8
Ryujinx.Graphics.Gpu/State/SamplerIndex.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ryujinx.Graphics.Gpu.State
|
||||
{
|
||||
enum SamplerIndex
|
||||
{
|
||||
Independently = 0,
|
||||
ViaHeaderIndex = 1
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue