aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-08-26 17:47:21 -0300
committerGitHub <noreply@github.com>2021-08-26 22:47:21 +0200
commit5b8ceb917308378c535fb4cd2288b8f19524bea0 (patch)
treef5423e621f5bfd7c37ecb6f635629dcd7f771b68 /Ryujinx.Graphics.OpenGL/Image/TextureView.cs
parent6d9bc7cf90e8016feea97eedb3cdd562c4628026 (diff)
Swap BGR565 components by changing the format (#2577)
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Image/TextureView.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Image/TextureView.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Image/TextureView.cs b/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
index d4d49075..a70ab595 100644
--- a/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
+++ b/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
@@ -204,7 +204,18 @@ namespace Ryujinx.Graphics.OpenGL.Image
if (forceBgra)
{
- pixelFormat = PixelFormat.Bgra;
+ if (pixelType == PixelType.UnsignedShort565)
+ {
+ pixelType = PixelType.UnsignedShort565Reversed;
+ }
+ else if (pixelType == PixelType.UnsignedShort565Reversed)
+ {
+ pixelType = PixelType.UnsignedShort565;
+ }
+ else
+ {
+ pixelFormat = PixelFormat.Bgra;
+ }
}
int faces = 1;