[GPU] Add more shader instructions, add support for rgb565 textures

This commit is contained in:
gdkchan 2018-04-10 16:50:32 -03:00
parent e9cfdef098
commit feb2680a6c
22 changed files with 817 additions and 238 deletions

View file

@ -55,6 +55,18 @@ namespace Ryujinx.Graphics.Gal.OpenGL
throw new ArgumentException(nameof(Type));
}
public static (PixelFormat, PixelType) GetTextureFormat(GalTextureFormat Format)
{
switch (Format)
{
case GalTextureFormat.A8B8G8R8: return (PixelFormat.Rgba, PixelType.UnsignedByte);
case GalTextureFormat.A1B5G5R5: return (PixelFormat.Rgba, PixelType.UnsignedShort5551);
case GalTextureFormat.B5G6R5: return (PixelFormat.Rgb, PixelType.UnsignedShort565);
}
throw new NotImplementedException(Format.ToString());
}
public static PixelInternalFormat GetCompressedTextureFormat(GalTextureFormat Format)
{
switch (Format)