Downgrade Silk.NET

This commit is contained in:
IsaacMarovitz 2024-05-11 13:32:35 -04:00
parent 62b838850b
commit b55ef55ab0
No known key found for this signature in database
GPG key ID: 7B138C0A9A1D297E
9 changed files with 59 additions and 55 deletions

View file

@ -38,10 +38,10 @@
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
<PackageVersion Include="shaderc.net" Version="0.1.0" />
<PackageVersion Include="SharpZipLib" Version="1.4.2" />
<PackageVersion Include="Silk.NET.OpenGL.Legacy" Version="2.21.0" />
<PackageVersion Include="Silk.NET.OpenGL.Legacy.Extensions.ARB" Version="2.21.0" />
<PackageVersion Include="Silk.NET.OpenGL.Legacy.Extensions.EXT" Version="2.21.0" />
<PackageVersion Include="Silk.NET.OpenGL.Legacy.Extensions.NV" Version="2.21.0" />
<PackageVersion Include="Silk.NET.OpenGL.Legacy" Version="2.16.0" />
<PackageVersion Include="Silk.NET.OpenGL.Legacy.Extensions.ARB" Version="2.16.0" />
<PackageVersion Include="Silk.NET.OpenGL.Legacy.Extensions.EXT" Version="2.16.0" />
<PackageVersion Include="Silk.NET.OpenGL.Legacy.Extensions.NV" Version="2.16.0" />
<PackageVersion Include="Silk.NET.Vulkan" Version="2.16.0" />
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.16.0" />
<PackageVersion Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.16.0" />
@ -52,4 +52,4 @@
<PackageVersion Include="System.Management" Version="8.0.0" />
<PackageVersion Include="UnicornEngine.Unicorn" Version="2.0.2-rc1-fb78016" />
</ItemGroup>
</Project>
</Project>

View file

@ -120,10 +120,10 @@ namespace Ryujinx.Graphics.OpenGL.Effects
var textureView = _intermediaryTexture.CreateView(_intermediaryTexture.Info, 0, 0) as TextureView;
uint previousProgram = (uint)_gd.Api.GetInteger(GetPName.CurrentProgram);
int previousUnit = _gd.Api.GetInteger(GetPName.ActiveTexture);
uint previousProgram = (uint)_gd.Api.GetInteger(GLEnum.CurrentProgram);
int previousUnit = _gd.Api.GetInteger(GLEnum.ActiveTexture);
_gd.Api.ActiveTexture(TextureUnit.Texture0);
uint previousTextureBinding = (uint)_gd.Api.GetInteger(GetPName.TextureBinding2D);
uint previousTextureBinding = (uint)_gd.Api.GetInteger(GLEnum.TextureBinding2D);
_gd.Api.BindImageTexture(0, textureView.Handle, 0, false, 0, BufferAccessARB.ReadWrite, InternalFormat.Rgba8);

View file

@ -49,10 +49,10 @@ namespace Ryujinx.Graphics.OpenGL.Effects
var textureView = _textureStorage.CreateView(view.Info, 0, 0) as TextureView;
uint previousProgram = (uint)_gd.Api.GetInteger(GetPName.CurrentProgram);
int previousUnit = _gd.Api.GetInteger(GetPName.ActiveTexture);
uint previousProgram = (uint)_gd.Api.GetInteger(GLEnum.CurrentProgram);
int previousUnit = _gd.Api.GetInteger(GLEnum.ActiveTexture);
_gd.Api.ActiveTexture(TextureUnit.Texture0);
uint previousTextureBinding = (uint)_gd.Api.GetInteger(GetPName.TextureBinding2D);
uint previousTextureBinding = (uint)_gd.Api.GetInteger(GLEnum.TextureBinding2D);
_gd.Api.BindImageTexture(0, textureView.Handle, 0, false, 0, BufferAccessARB.ReadWrite, InternalFormat.Rgba8);
_gd.Api.UseProgram(_shaderProgram);

View file

@ -184,14 +184,14 @@ namespace Ryujinx.Graphics.OpenGL.Effects.Smaa
var areaTexture = _areaTexture.DefaultView as TextureView;
var searchTexture = _searchTexture.DefaultView as TextureView;
uint previousFramebuffer = (uint)_gd.Api.GetInteger(GetPName.DrawFramebufferBinding);
int previousUnit = _gd.Api.GetInteger(GetPName.ActiveTexture);
uint previousFramebuffer = (uint)_gd.Api.GetInteger(GLEnum.DrawFramebufferBinding);
int previousUnit = _gd.Api.GetInteger(GLEnum.ActiveTexture);
_gd.Api.ActiveTexture(TextureUnit.Texture0);
uint previousTextureBinding0 = (uint)_gd.Api.GetInteger(GetPName.TextureBinding2D);
uint previousTextureBinding0 = (uint)_gd.Api.GetInteger(GLEnum.TextureBinding2D);
_gd.Api.ActiveTexture(TextureUnit.Texture1);
uint previousTextureBinding1 = (uint)_gd.Api.GetInteger(GetPName.TextureBinding2D);
uint previousTextureBinding1 = (uint)_gd.Api.GetInteger(GLEnum.TextureBinding2D);
_gd.Api.ActiveTexture(TextureUnit.Texture2);
uint previousTextureBinding2 = (uint)_gd.Api.GetInteger(GetPName.TextureBinding2D);
uint previousTextureBinding2 = (uint)_gd.Api.GetInteger(GLEnum.TextureBinding2D);
var framebuffer = new Framebuffer(_gd.Api);
framebuffer.Bind();
@ -209,7 +209,7 @@ namespace Ryujinx.Graphics.OpenGL.Effects.Smaa
uint dispatchX = (uint)BitUtils.DivRoundUp(view.Width, IPostProcessingEffect.LocalGroupSize);
uint dispatchY = (uint)BitUtils.DivRoundUp(view.Height, IPostProcessingEffect.LocalGroupSize);
uint previousProgram = (uint)_gd.Api.GetInteger(GetPName.CurrentProgram);
uint previousProgram = (uint)_gd.Api.GetInteger(GLEnum.CurrentProgram);
_gd.Api.BindImageTexture(0, edgeOutput.Handle, 0, false, 0, BufferAccessARB.ReadWrite, InternalFormat.Rgba8);
_gd.Api.UseProgram(_edgeShaderPrograms[Quality]);
view.Bind(0);

View file

@ -14,9 +14,9 @@ namespace Ryujinx.Graphics.OpenGL
switch (mode)
{
case AddressMode.Clamp:
#pragma warning disable CS0618 // Type or member is obsolete
#pragma warning disable CS0612 // Type or member is obsolete
return TextureWrapMode.Clamp;
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0612 // Type or member is obsolete
case AddressMode.Repeat:
return TextureWrapMode.Repeat;
case AddressMode.MirrorClamp:
@ -35,9 +35,9 @@ namespace Ryujinx.Graphics.OpenGL
Logger.Debug?.Print(LogClass.Gpu, $"Invalid {nameof(AddressMode)} enum value: {mode}.");
#pragma warning disable CS0618 // Type or member is obsolete
#pragma warning disable CS0612 // Type or member is obsolete
return TextureWrapMode.Clamp;
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0612 // Type or member is obsolete
}
public static NV Convert(this AdvancedBlendOp op)
@ -455,9 +455,9 @@ namespace Ryujinx.Graphics.OpenGL
case PrimitiveTopology.Quads:
return PrimitiveType.Quads;
case PrimitiveTopology.QuadStrip:
#pragma warning disable CS0618 // Type or member is obsolete
#pragma warning disable CS0612 // Type or member is obsolete
return PrimitiveType.QuadStrip;
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0612 // Type or member is obsolete
case PrimitiveTopology.Polygon:
return PrimitiveType.TriangleFan;
case PrimitiveTopology.LinesAdjacency:

View file

@ -1,5 +1,6 @@
using Ryujinx.Graphics.GAL;
using Silk.NET.OpenGL.Legacy;
using Silk.NET.OpenGL.Legacy.Extensions.NV;
using System;
namespace Ryujinx.Graphics.OpenGL
@ -21,7 +22,7 @@ namespace Ryujinx.Graphics.OpenGL
Add(Format.R8Snorm, new FormatInfo(1, true, false, InternalFormat.R8SNorm, PixelFormat.Red, PixelType.Byte));
Add(Format.R8Uint, new FormatInfo(1, false, false, InternalFormat.R8ui, PixelFormat.RedInteger, PixelType.UnsignedByte));
Add(Format.R8Sint, new FormatInfo(1, false, false, InternalFormat.R8i, PixelFormat.RedInteger, PixelType.Byte));
Add(Format.R16Float, new FormatInfo(1, false, false, InternalFormat.R16f, PixelFormat.Red, PixelType.HalfFloat));
Add(Format.R16Float, new FormatInfo(1, false, false, InternalFormat.R16f, PixelFormat.Red, (PixelType)NV.HalfFloatNV));
Add(Format.R16Unorm, new FormatInfo(1, true, false, InternalFormat.R16, PixelFormat.Red, PixelType.UnsignedShort));
Add(Format.R16Snorm, new FormatInfo(1, true, false, InternalFormat.R16SNorm, PixelFormat.Red, PixelType.Short));
Add(Format.R16Uint, new FormatInfo(1, false, false, InternalFormat.R16ui, PixelFormat.RedInteger, PixelType.UnsignedShort));
@ -33,7 +34,7 @@ namespace Ryujinx.Graphics.OpenGL
Add(Format.R8G8Snorm, new FormatInfo(2, true, false, InternalFormat.RG8SNorm, PixelFormat.RG, PixelType.Byte));
Add(Format.R8G8Uint, new FormatInfo(2, false, false, InternalFormat.RG8ui, PixelFormat.RGInteger, PixelType.UnsignedByte));
Add(Format.R8G8Sint, new FormatInfo(2, false, false, InternalFormat.RG8i, PixelFormat.RGInteger, PixelType.Byte));
Add(Format.R16G16Float, new FormatInfo(2, false, false, InternalFormat.RG16f, PixelFormat.RG, PixelType.HalfFloat));
Add(Format.R16G16Float, new FormatInfo(2, false, false, InternalFormat.RG16f, PixelFormat.RG, (PixelType)NV.HalfFloatNV));
Add(Format.R16G16Unorm, new FormatInfo(2, true, false, InternalFormat.RG16, PixelFormat.RG, PixelType.UnsignedShort));
Add(Format.R16G16Snorm, new FormatInfo(2, true, false, InternalFormat.RG16SNorm, PixelFormat.RG, PixelType.Short));
Add(Format.R16G16Uint, new FormatInfo(2, false, false, InternalFormat.RG16ui, PixelFormat.RGInteger, PixelType.UnsignedShort));
@ -45,7 +46,7 @@ namespace Ryujinx.Graphics.OpenGL
Add(Format.R8G8B8Snorm, new FormatInfo(3, true, false, InternalFormat.Rgb8SNorm, PixelFormat.Rgb, PixelType.Byte));
Add(Format.R8G8B8Uint, new FormatInfo(3, false, false, InternalFormat.Rgb8ui, PixelFormat.RgbInteger, PixelType.UnsignedByte));
Add(Format.R8G8B8Sint, new FormatInfo(3, false, false, InternalFormat.Rgb8i, PixelFormat.RgbInteger, PixelType.Byte));
Add(Format.R16G16B16Float, new FormatInfo(3, false, false, InternalFormat.Rgb16f, PixelFormat.Rgb, PixelType.HalfFloat));
Add(Format.R16G16B16Float, new FormatInfo(3, false, false, InternalFormat.Rgb16f, PixelFormat.Rgb, (PixelType)NV.HalfFloatNV));
Add(Format.R16G16B16Unorm, new FormatInfo(3, true, false, InternalFormat.Rgb16, PixelFormat.Rgb, PixelType.UnsignedShort));
Add(Format.R16G16B16Snorm, new FormatInfo(3, true, false, InternalFormat.Rgb16SNorm, PixelFormat.Rgb, PixelType.Short));
Add(Format.R16G16B16Uint, new FormatInfo(3, false, false, InternalFormat.Rgb16ui, PixelFormat.RgbInteger, PixelType.UnsignedShort));
@ -57,7 +58,7 @@ namespace Ryujinx.Graphics.OpenGL
Add(Format.R8G8B8A8Snorm, new FormatInfo(4, true, false, InternalFormat.Rgba8SNorm, PixelFormat.Rgba, PixelType.Byte));
Add(Format.R8G8B8A8Uint, new FormatInfo(4, false, false, InternalFormat.Rgba8ui, PixelFormat.RgbaInteger, PixelType.UnsignedByte));
Add(Format.R8G8B8A8Sint, new FormatInfo(4, false, false, InternalFormat.Rgba8i, PixelFormat.RgbaInteger, PixelType.Byte));
Add(Format.R16G16B16A16Float, new FormatInfo(4, false, false, InternalFormat.Rgba16f, PixelFormat.Rgba, PixelType.HalfFloat));
Add(Format.R16G16B16A16Float, new FormatInfo(4, false, false, InternalFormat.Rgba16f, PixelFormat.Rgba, (PixelType)NV.HalfFloatNV));
Add(Format.R16G16B16A16Unorm, new FormatInfo(4, true, false, InternalFormat.Rgba16, PixelFormat.Rgba, PixelType.UnsignedShort));
Add(Format.R16G16B16A16Snorm, new FormatInfo(4, true, false, InternalFormat.Rgba16SNorm, PixelFormat.Rgba, PixelType.Short));
Add(Format.R16G16B16A16Uint, new FormatInfo(4, false, false, InternalFormat.Rgba16ui, PixelFormat.RgbaInteger, PixelType.UnsignedShort));
@ -67,11 +68,11 @@ namespace Ryujinx.Graphics.OpenGL
Add(Format.R32G32B32A32Sint, new FormatInfo(4, false, false, InternalFormat.Rgba32i, PixelFormat.RgbaInteger, PixelType.Int));
Add(Format.S8Uint, new FormatInfo(1, false, false, InternalFormat.StencilIndex8, PixelFormat.StencilIndex, PixelType.UnsignedByte));
Add(Format.D16Unorm, new FormatInfo(1, false, false, InternalFormat.DepthComponent16, PixelFormat.DepthComponent, PixelType.UnsignedShort));
Add(Format.S8UintD24Unorm, new FormatInfo(1, false, false, InternalFormat.Depth24Stencil8, PixelFormat.DepthStencil, PixelType.UnsignedInt248));
Add(Format.S8UintD24Unorm, new FormatInfo(1, false, false, InternalFormat.Depth24Stencil8, PixelFormat.DepthStencil, (PixelType)NV.UnsignedInt248NV));
Add(Format.X8UintD24Unorm, new FormatInfo(1, false, false, InternalFormat.DepthComponent24, PixelFormat.DepthComponent, PixelType.UnsignedInt));
Add(Format.D32Float, new FormatInfo(1, false, false, InternalFormat.DepthComponent32f, PixelFormat.DepthComponent, PixelType.Float));
Add(Format.D24UnormS8Uint, new FormatInfo(1, false, false, InternalFormat.Depth24Stencil8, PixelFormat.DepthStencil, PixelType.UnsignedInt248));
Add(Format.D32FloatS8Uint, new FormatInfo(1, false, false, InternalFormat.Depth32fStencil8, PixelFormat.DepthStencil, PixelType.Float32UnsignedInt248Rev));
Add(Format.D24UnormS8Uint, new FormatInfo(1, false, false, InternalFormat.Depth24Stencil8, PixelFormat.DepthStencil, (PixelType)NV.UnsignedInt248NV));
Add(Format.D32FloatS8Uint, new FormatInfo(1, false, false, InternalFormat.Depth32fStencil8, PixelFormat.DepthStencil, (PixelType)NV.Float32UnsignedInt248RevNV));
Add(Format.R8G8B8A8Srgb, new FormatInfo(4, false, false, InternalFormat.Srgb8Alpha8, PixelFormat.Rgba, PixelType.UnsignedByte));
Add(Format.R4G4B4A4Unorm, new FormatInfo(4, true, false, InternalFormat.Rgba4, PixelFormat.Rgba, PixelType.UnsignedShort4444Rev));
Add(Format.R5G5B5X1Unorm, new FormatInfo(4, true, false, InternalFormat.Rgb5, PixelFormat.Rgb, PixelType.UnsignedShort1555Rev));
@ -79,8 +80,8 @@ namespace Ryujinx.Graphics.OpenGL
Add(Format.R5G6B5Unorm, new FormatInfo(3, true, false, InternalFormat.Rgb565, PixelFormat.Rgb, PixelType.UnsignedShort565Rev));
Add(Format.R10G10B10A2Unorm, new FormatInfo(4, true, false, InternalFormat.Rgb10A2, PixelFormat.Rgba, PixelType.UnsignedInt2101010Rev));
Add(Format.R10G10B10A2Uint, new FormatInfo(4, false, false, InternalFormat.Rgb10A2ui, PixelFormat.RgbaInteger, PixelType.UnsignedInt2101010Rev));
Add(Format.R11G11B10Float, new FormatInfo(3, false, false, InternalFormat.R11fG11fB10f, PixelFormat.Rgb, PixelType.UnsignedInt10f11f11fRev));
Add(Format.R9G9B9E5Float, new FormatInfo(3, false, false, InternalFormat.Rgb9E5, PixelFormat.Rgb, PixelType.UnsignedInt5999Rev));
Add(Format.R11G11B10Float, new FormatInfo(3, false, false, InternalFormat.R11fG11fB10f, PixelFormat.Rgb, (PixelType)0x8C3B)); // GL_UNSIGNED_INT_10F_11F_11F_REV Defined in Updated Silk.NET
Add(Format.R9G9B9E5Float, new FormatInfo(3, false, false, InternalFormat.Rgb9E5, PixelFormat.Rgb, (PixelType)0x8C3E)); // GL_UNSIGNED_INT_5_9_9_9_REV Defined in Updated Silk.NET
Add(Format.Bc1RgbaUnorm, new FormatInfo(4, true, false, InternalFormat.CompressedRgbaS3TCDxt1Ext));
Add(Format.Bc2Unorm, new FormatInfo(4, true, false, InternalFormat.CompressedRgbaS3TCDxt3Ext));
Add(Format.Bc3Unorm, new FormatInfo(4, true, false, InternalFormat.CompressedRgbaS3TCDxt5Ext));

View file

@ -111,7 +111,7 @@ namespace Ryujinx.Graphics.OpenGL
public static unsafe bool HasExtension(GL api, string name)
{
int numExtensions = api.GetInteger(GetPName.NumExtensions);
int numExtensions = api.GetInteger(GLEnum.NumExtensions);
for (uint extension = 0; extension < numExtensions; extension++)
{

View file

@ -150,7 +150,7 @@ namespace Ryujinx.Graphics.OpenGL
if (stencilMaskChanged)
{
_gd.Api.StencilMaskSeparate(TriangleFace.Front, (uint)stencilMask);
_gd.Api.StencilMaskSeparate(StencilFaceDirection.Front, (uint)stencilMask);
}
if (depthMaskChanged)
@ -176,7 +176,7 @@ namespace Ryujinx.Graphics.OpenGL
if (stencilMaskChanged)
{
_gd.Api.StencilMaskSeparate(TriangleFace.Front, (uint)_stencilFrontMask);
_gd.Api.StencilMaskSeparate(StencilFaceDirection.Front, (uint)_stencilFrontMask);
}
if (depthMaskChanged)
@ -193,11 +193,11 @@ namespace Ryujinx.Graphics.OpenGL
}
else if (depthMask)
{
_gd.Api.ClearBuffer(BufferKind.Depth, 0, ref depthValue);
_gd.Api.ClearBuffer(BufferKind.Depth, 0, in depthValue);
}
else if (stencilMask != 0)
{
_gd.Api.ClearBuffer(BufferKind.Stencil, 0, ref stencilValue);
_gd.Api.ClearBuffer(BufferKind.Stencil, 0, in stencilValue);
}
}
@ -238,9 +238,9 @@ namespace Ryujinx.Graphics.OpenGL
{
DrawQuadsImpl(vertexCount, instanceCount, firstVertex, firstInstance);
}
#pragma warning disable CS0618 // Type or member is obsolete
#pragma warning disable CS0612 // Type or member is obsolete
else if (_primitiveType == PrimitiveType.QuadStrip && !_gd.Capabilities.SupportsQuads)
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0612 // Type or member is obsolete
{
DrawQuadStripImpl(vertexCount, instanceCount, firstVertex, firstInstance);
}
@ -378,9 +378,9 @@ namespace Ryujinx.Graphics.OpenGL
firstVertex,
firstInstance);
}
#pragma warning disable CS0618 // Type or member is obsolete
#pragma warning disable CS0612 // Type or member is obsolete
else if (_primitiveType == PrimitiveType.QuadStrip && !_gd.Capabilities.SupportsQuads)
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0612 // Type or member is obsolete
{
DrawQuadStripIndexedImpl(
indexCount,
@ -436,7 +436,7 @@ namespace Ryujinx.Graphics.OpenGL
_gd.Api.DrawElementsInstancedBaseInstance(
PrimitiveType.TriangleFan,
4,
_elementsType,
(GLEnum)_elementsType,
(void*)(indexBaseOffset + quadIndex * 4 * indexElemSize),
(uint)instanceCount,
(uint)firstInstance);
@ -577,7 +577,7 @@ namespace Ryujinx.Graphics.OpenGL
_gd.Api.DrawElementsInstancedBaseInstance(
_primitiveType,
(uint)indexCount,
_elementsType,
(GLEnum)_elementsType,
(void*)indexBaseOffset,
(uint)instanceCount,
(uint)firstInstance);
@ -783,6 +783,7 @@ namespace Ryujinx.Graphics.OpenGL
_tfEnabled = false;
}
#pragma warning disable CS0612 // Type or member is obsolete
#pragma warning disable CS0618 // Type or member is obsolete
public void SetAlphaTest(bool enable, float reference, CompareOp op)
{
@ -795,8 +796,9 @@ namespace Ryujinx.Graphics.OpenGL
_gd.Api.AlphaFunc((AlphaFunction)op.Convert(), reference);
_gd.Api.Enable(EnableCap.AlphaTest);
}
#pragma warning restore CS0612 // Type or member is obsolete
#pragma warning restore CS0618 // Type or member is obsolete
public void SetBlendState(AdvancedBlendDescriptor blend)
{
if (_gd.Capabilities.SupportsBlendEquationAdvanced)
@ -1112,12 +1114,12 @@ namespace Ryujinx.Graphics.OpenGL
{
if (frontMode == backMode)
{
_gd.Api.PolygonMode(TriangleFace.FrontAndBack, frontMode.Convert());
_gd.Api.PolygonMode(MaterialFace.FrontAndBack, frontMode.Convert());
}
else
{
_gd.Api.PolygonMode(TriangleFace.Front, frontMode.Convert());
_gd.Api.PolygonMode(TriangleFace.Back, backMode.Convert());
_gd.Api.PolygonMode(MaterialFace.Front, frontMode.Convert());
_gd.Api.PolygonMode(MaterialFace.Back, backMode.Convert());
}
}
@ -1260,7 +1262,7 @@ namespace Ryujinx.Graphics.OpenGL
}
}
_gd.Api.ScissorArray(0, (uint)count, ref v[0]);
_gd.Api.ScissorArray(0, (uint)count, in v[0]);
}
public void SetStencilTest(StencilTestDescriptor stencilTest)
@ -1274,32 +1276,32 @@ namespace Ryujinx.Graphics.OpenGL
}
_gd.Api.StencilOpSeparate(
TriangleFace.Front,
StencilFaceDirection.Front,
stencilTest.FrontSFail.Convert(),
stencilTest.FrontDpFail.Convert(),
stencilTest.FrontDpPass.Convert());
_gd.Api.StencilFuncSeparate(
TriangleFace.Front,
StencilFaceDirection.Front,
(StencilFunction)stencilTest.FrontFunc.Convert(),
stencilTest.FrontFuncRef,
(uint)stencilTest.FrontFuncMask);
_gd.Api.StencilMaskSeparate(TriangleFace.Front, (uint)stencilTest.FrontMask);
_gd.Api.StencilMaskSeparate(StencilFaceDirection.Front, (uint)stencilTest.FrontMask);
_gd.Api.StencilOpSeparate(
TriangleFace.Back,
StencilFaceDirection.Back,
stencilTest.BackSFail.Convert(),
stencilTest.BackDpFail.Convert(),
stencilTest.BackDpPass.Convert());
_gd.Api.StencilFuncSeparate(
TriangleFace.Back,
StencilFaceDirection.Back,
(StencilFunction)stencilTest.BackFunc.Convert(),
stencilTest.BackFuncRef,
(uint)stencilTest.BackFuncMask);
_gd.Api.StencilMaskSeparate(TriangleFace.Back, (uint)stencilTest.BackMask);
_gd.Api.StencilMaskSeparate(StencilFaceDirection.Back, (uint)stencilTest.BackMask);
_gd.Api.Enable(EnableCap.StencilTest);

View file

@ -1,5 +1,6 @@
using Ryujinx.Graphics.GAL;
using Silk.NET.OpenGL.Legacy;
using Silk.NET.OpenGL.Legacy.Extensions.NV;
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
@ -107,7 +108,7 @@ namespace Ryujinx.Graphics.OpenGL
int size = fmtInfo.Components;
bool isFloat = fmtInfo.PixelType == PixelType.Float ||
fmtInfo.PixelType == PixelType.HalfFloat;
fmtInfo.PixelType == (PixelType)NV.HalfFloatNV;
if (isFloat || fmtInfo.Normalized || fmtInfo.Scaled)
{