aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/EmitterContext.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs b/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
index 2f839b7a..3dcb04ad 100644
--- a/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
+++ b/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
@@ -167,6 +167,7 @@ namespace Ryujinx.Graphics.Shader.Translation
this.Copy(dest, src);
}
+ bool supportsBgra = Config.GpuAccessor.QueryHostSupportsBgraFormat();
int regIndexBase = 0;
for (int rtIndex = 0; rtIndex < 8; rtIndex++)
@@ -185,7 +186,7 @@ namespace Ryujinx.Graphics.Shader.Translation
Operand src = Register(regIndexBase + component, RegisterType.Gpr);
// Perform B <-> R swap if needed, for BGRA formats (not supported on OpenGL).
- if (component == 0 || component == 2)
+ if (!supportsBgra && (component == 0 || component == 2))
{
Operand isBgra = Attribute(AttributeConsts.FragmentOutputIsBgraBase + rtIndex * 4);