From 0202f150d4d5974d79029500317de2d1b102da8c Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 31 Jan 2020 00:42:03 -0300 Subject: [PATCH] Enable stencil texturing (fixes #866) (#910) --- Ryujinx.Graphics.OpenGL/EnumConversion.cs | 4 ++-- Ryujinx.Graphics.OpenGL/TextureView.cs | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Ryujinx.Graphics.OpenGL/EnumConversion.cs b/Ryujinx.Graphics.OpenGL/EnumConversion.cs index 0d5ea823..014ddfc1 100644 --- a/Ryujinx.Graphics.OpenGL/EnumConversion.cs +++ b/Ryujinx.Graphics.OpenGL/EnumConversion.cs @@ -193,9 +193,9 @@ namespace Ryujinx.Graphics.OpenGL switch (mode) { case DepthStencilMode.Depth: - return All.Depth; + return All.DepthComponent; case DepthStencilMode.Stencil: - return All.Stencil; + return All.StencilIndex; } Logger.PrintDebug(LogClass.Gpu, $"Invalid {nameof(DepthStencilMode)} enum value: {mode}."); diff --git a/Ryujinx.Graphics.OpenGL/TextureView.cs b/Ryujinx.Graphics.OpenGL/TextureView.cs index 2efaf7c0..8fa78e5b 100644 --- a/Ryujinx.Graphics.OpenGL/TextureView.cs +++ b/Ryujinx.Graphics.OpenGL/TextureView.cs @@ -100,9 +100,7 @@ namespace Ryujinx.Graphics.OpenGL } GL.TexParameter(target, TextureParameterName.TextureMaxLevel, maxLevel); - - // TODO: This requires ARB_stencil_texturing, we should uncomment and test this. - // GL.TexParameter(target, TextureParameterName.DepthStencilTextureMode, (int)_info.DepthStencilMode.Convert()); + GL.TexParameter(target, TextureParameterName.DepthStencilTextureMode, (int)_info.DepthStencilMode.Convert()); } public ITexture CreateView(TextureCreateInfo info, int firstLayer, int firstLevel)