Swap BGR565 components by changing the format (#2577)

This commit is contained in:
gdkchan 2021-08-26 17:47:21 -03:00 committed by GitHub
parent 6d9bc7cf90
commit 5b8ceb9173
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -203,9 +203,20 @@ namespace Ryujinx.Graphics.OpenGL.Image
PixelType pixelType = format.PixelType;
if (forceBgra)
{
if (pixelType == PixelType.UnsignedShort565)
{
pixelType = PixelType.UnsignedShort565Reversed;
}
else if (pixelType == PixelType.UnsignedShort565Reversed)
{
pixelType = PixelType.UnsignedShort565;
}
else
{
pixelFormat = PixelFormat.Bgra;
}
}
int faces = 1;