aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Pipeline.cs
diff options
context:
space:
mode:
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);
+ }
}
}