aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Pipeline.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-01-11 16:15:17 -0300
committerGitHub <noreply@github.com>2022-01-11 20:15:17 +0100
commit6e0799580f0d1b473a79471c5d365c6524d97a86 (patch)
tree94df6b825227d6f35c8bf5673c3b25fc8235c47f /Ryujinx.Graphics.OpenGL/Pipeline.cs
parentef24c8983dc3971cd906568d337e49be694ee542 (diff)
Fix render target clear when sizes mismatch (#2994)
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Pipeline.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs
index 6d6e0745..ff5af42d 100644
--- a/Ryujinx.Graphics.OpenGL/Pipeline.cs
+++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs
@@ -6,7 +6,6 @@ using Ryujinx.Graphics.OpenGL.Queries;
using Ryujinx.Graphics.Shader;
using System;
using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
namespace Ryujinx.Graphics.OpenGL
{
@@ -1058,14 +1057,17 @@ namespace Ryujinx.Graphics.OpenGL
_framebuffer.AttachColor(index, color);
- int isBgra = color != null && color.Format.IsBgr() ? 1 : 0;
-
- if (_fpIsBgra[index].X != isBgra)
+ if (color != null)
{
- _fpIsBgra[index].X = isBgra;
- isBgraChanged = true;
+ int isBgra = color.Format.IsBgr() ? 1 : 0;
+
+ if (_fpIsBgra[index].X != isBgra)
+ {
+ _fpIsBgra[index].X = isBgra;
+ isBgraChanged = true;
- RestoreComponentMask(index);
+ RestoreComponentMask(index);
+ }
}
}