From 66e7fdb8710ff24bfb80c9c638ce2e6fa9563068 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Mon, 8 Aug 2022 14:39:22 -0300 Subject: OpenGL: Fix clears of unbound color targets (#3564) --- Ryujinx.Graphics.OpenGL/Pipeline.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs') diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs index 58d165d9..fc28c86e 100644 --- a/Ryujinx.Graphics.OpenGL/Pipeline.cs +++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs @@ -112,6 +112,8 @@ namespace Ryujinx.Graphics.OpenGL public void ClearRenderTargetColor(int index, int layer, int layerCount, uint componentMask, ColorF color) { + EnsureFramebuffer(); + GL.ColorMask( index, (componentMask & 1) != 0, @@ -142,6 +144,8 @@ namespace Ryujinx.Graphics.OpenGL public void ClearRenderTargetDepthStencil(int layer, int layerCount, float depthValue, bool depthMask, int stencilValue, int stencilMask) { + EnsureFramebuffer(); + bool stencilMaskChanged = stencilMask != 0 && stencilMask != _stencilFrontMask; -- cgit v1.2.3