diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-08-26 17:47:21 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-26 22:47:21 +0200 |
commit | 5b8ceb917308378c535fb4cd2288b8f19524bea0 (patch) | |
tree | f5423e621f5bfd7c37ecb6f635629dcd7f771b68 /Ryujinx.Graphics.OpenGL/Image/TextureView.cs | |
parent | 6d9bc7cf90e8016feea97eedb3cdd562c4628026 (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.cs | 13 |
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; |