diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-12-05 17:34:47 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | e25b7c9848b6ec486eb513297b5c536857665c7f (patch) | |
| tree | c1ccb6c58bed0f7ece835359516330104feb8f4d /Ryujinx.Graphics.GAL | |
| parent | 6a98c643cabeea25dc42e19fe475a687a034a532 (diff) | |
Initial support for the guest OpenGL driver (NVIDIA and Nouveau)
Diffstat (limited to 'Ryujinx.Graphics.GAL')
| -rw-r--r-- | Ryujinx.Graphics.GAL/Blend/BlendFactor.cs | 18 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/Blend/BlendOp.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/CompareOp.cs | 11 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/ITexture.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/Texture/TextureCreateInfo.cs | 5 |
5 files changed, 40 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.GAL/Blend/BlendFactor.cs b/Ryujinx.Graphics.GAL/Blend/BlendFactor.cs index 0eda08a7..f92e5b3a 100644 --- a/Ryujinx.Graphics.GAL/Blend/BlendFactor.cs +++ b/Ryujinx.Graphics.GAL/Blend/BlendFactor.cs @@ -20,6 +20,22 @@ namespace Ryujinx.Graphics.GAL.Blend ConstantColor = 0xc001, OneMinusConstantColor, ConstantAlpha, - OneMinusConstantAlpha + OneMinusConstantAlpha, + + ZeroGl = 0x4000, + OneGl = 0x4001, + SrcColorGl = 0x4300, + OneMinusSrcColorGl = 0x4301, + SrcAlphaGl = 0x4302, + OneMinusSrcAlphaGl = 0x4303, + DstAlphaGl = 0x4304, + OneMinusDstAlphaGl = 0x4305, + DstColorGl = 0x4306, + OneMinusDstColorGl = 0x4307, + SrcAlphaSaturateGl = 0x4308, + Src1ColorGl = 0xc900, + OneMinusSrc1ColorGl = 0xc901, + Src1AlphaGl = 0xc902, + OneMinusSrc1AlphaGl = 0xc903 } }
\ No newline at end of file diff --git a/Ryujinx.Graphics.GAL/Blend/BlendOp.cs b/Ryujinx.Graphics.GAL/Blend/BlendOp.cs index 51a0062d..566dafd9 100644 --- a/Ryujinx.Graphics.GAL/Blend/BlendOp.cs +++ b/Ryujinx.Graphics.GAL/Blend/BlendOp.cs @@ -6,6 +6,12 @@ namespace Ryujinx.Graphics.GAL.Blend Subtract, ReverseSubtract, Minimum, - Maximum + Maximum, + + AddGl = 0x8006, + SubtractGl = 0x8007, + ReverseSubtractGl = 0x8008, + MinimumGl = 0x800a, + MaximumGl = 0x800b } } diff --git a/Ryujinx.Graphics.GAL/CompareOp.cs b/Ryujinx.Graphics.GAL/CompareOp.cs index da5d5067..358ed2b4 100644 --- a/Ryujinx.Graphics.GAL/CompareOp.cs +++ b/Ryujinx.Graphics.GAL/CompareOp.cs @@ -9,6 +9,15 @@ namespace Ryujinx.Graphics.GAL Greater, NotEqual, GreaterOrEqual, - Always + Always, + + NeverGl = 0x200, + LessGl = 0x201, + EqualGl = 0x202, + LessOrEqualGl = 0x203, + GreaterGl = 0x204, + NotEqualGl = 0x205, + GreaterOrEqualGl = 0x206, + AlwaysGl = 0x207, } }
\ No newline at end of file diff --git a/Ryujinx.Graphics.GAL/ITexture.cs b/Ryujinx.Graphics.GAL/ITexture.cs index f170e374..592c0482 100644 --- a/Ryujinx.Graphics.GAL/ITexture.cs +++ b/Ryujinx.Graphics.GAL/ITexture.cs @@ -14,7 +14,7 @@ namespace Ryujinx.Graphics.GAL int GetStorageDebugId(); - byte[] GetData(int face); + byte[] GetData(); void SetData(Span<byte> data); } diff --git a/Ryujinx.Graphics.GAL/Texture/TextureCreateInfo.cs b/Ryujinx.Graphics.GAL/Texture/TextureCreateInfo.cs index ad365f6b..c6a73d91 100644 --- a/Ryujinx.Graphics.GAL/Texture/TextureCreateInfo.cs +++ b/Ryujinx.Graphics.GAL/Texture/TextureCreateInfo.cs @@ -66,6 +66,11 @@ namespace Ryujinx.Graphics.GAL.Texture return GetMipStride(level) * GetLevelHeight(level) * GetLevelDepth(level); } + public int GetMipSize2D(int level) + { + return GetMipStride(level) * GetLevelHeight(level); + } + public int GetMipStride(int level) { return BitUtils.AlignUp(GetLevelWidth(level) * BytesPerPixel, 4); |
