mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-09 12:19:12 +00:00
Implement R16_G16
This commit is contained in:
parent
095db47e13
commit
458c8c50db
4 changed files with 14 additions and 10 deletions
|
@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Gal
|
||||||
R32G32B32A32 = 0x1,
|
R32G32B32A32 = 0x1,
|
||||||
R16G16B16A16 = 0x3,
|
R16G16B16A16 = 0x3,
|
||||||
A8B8G8R8 = 0x8,
|
A8B8G8R8 = 0x8,
|
||||||
|
R16_G16 = 0xc,
|
||||||
R32 = 0xf,
|
R32 = 0xf,
|
||||||
A1B5G5R5 = 0x14,
|
A1B5G5R5 = 0x14,
|
||||||
B5G6R5 = 0x15,
|
B5G6R5 = 0x15,
|
||||||
|
|
|
@ -129,15 +129,16 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
{
|
{
|
||||||
switch (Format)
|
switch (Format)
|
||||||
{
|
{
|
||||||
case GalTextureFormat.R32G32B32A32: return (PixelFormat.Rgba, PixelType.Float);
|
case GalTextureFormat.R32G32B32A32: return (PixelFormat.Rgba, PixelType.Float);
|
||||||
case GalTextureFormat.R16G16B16A16: return (PixelFormat.Rgba, PixelType.HalfFloat);
|
case GalTextureFormat.R16G16B16A16: return (PixelFormat.Rgba, PixelType.HalfFloat);
|
||||||
case GalTextureFormat.A8B8G8R8: return (PixelFormat.Rgba, PixelType.UnsignedByte);
|
case GalTextureFormat.A8B8G8R8: return (PixelFormat.Rgba, PixelType.UnsignedByte);
|
||||||
case GalTextureFormat.R32: return (PixelFormat.Red, PixelType.Float);
|
case GalTextureFormat.R16_G16: return (PixelFormat.RgInteger, PixelType.UnsignedShort);
|
||||||
case GalTextureFormat.A1B5G5R5: return (PixelFormat.Rgba, PixelType.UnsignedShort5551);
|
case GalTextureFormat.R32: return (PixelFormat.Red, PixelType.Float);
|
||||||
case GalTextureFormat.B5G6R5: return (PixelFormat.Rgb, PixelType.UnsignedShort565);
|
case GalTextureFormat.A1B5G5R5: return (PixelFormat.Rgba, PixelType.UnsignedShort5551);
|
||||||
case GalTextureFormat.G8R8: return (PixelFormat.Rg, PixelType.UnsignedByte);
|
case GalTextureFormat.B5G6R5: return (PixelFormat.Rgb, PixelType.UnsignedShort565);
|
||||||
case GalTextureFormat.R16: return (PixelFormat.Red, PixelType.HalfFloat);
|
case GalTextureFormat.G8R8: return (PixelFormat.Rg, PixelType.UnsignedByte);
|
||||||
case GalTextureFormat.R8: return (PixelFormat.Red, PixelType.UnsignedByte);
|
case GalTextureFormat.R16: return (PixelFormat.Red, PixelType.HalfFloat);
|
||||||
|
case GalTextureFormat.R8: return (PixelFormat.Red, PixelType.UnsignedByte);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new NotImplementedException(Format.ToString());
|
throw new NotImplementedException(Format.ToString());
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace Ryujinx.HLE.Gpu.Texture
|
||||||
case GalTextureFormat.R32G32B32A32: return Texture.Width * Texture.Height * 16;
|
case GalTextureFormat.R32G32B32A32: return Texture.Width * Texture.Height * 16;
|
||||||
case GalTextureFormat.R16G16B16A16: return Texture.Width * Texture.Height * 8;
|
case GalTextureFormat.R16G16B16A16: return Texture.Width * Texture.Height * 8;
|
||||||
case GalTextureFormat.A8B8G8R8: return Texture.Width * Texture.Height * 4;
|
case GalTextureFormat.A8B8G8R8: return Texture.Width * Texture.Height * 4;
|
||||||
|
case GalTextureFormat.R16_G16: return Texture.Width * Texture.Height * 4;
|
||||||
case GalTextureFormat.R32: return Texture.Width * Texture.Height * 4;
|
case GalTextureFormat.R32: return Texture.Width * Texture.Height * 4;
|
||||||
case GalTextureFormat.A1B5G5R5: return Texture.Width * Texture.Height * 2;
|
case GalTextureFormat.A1B5G5R5: return Texture.Width * Texture.Height * 2;
|
||||||
case GalTextureFormat.B5G6R5: return Texture.Width * Texture.Height * 2;
|
case GalTextureFormat.B5G6R5: return Texture.Width * Texture.Height * 2;
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Ryujinx.HLE.Gpu.Texture
|
||||||
case GalTextureFormat.R32G32B32A32: return Read16Bpp (Memory, Texture);
|
case GalTextureFormat.R32G32B32A32: return Read16Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.R16G16B16A16: return Read8Bpp (Memory, Texture);
|
case GalTextureFormat.R16G16B16A16: return Read8Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.A8B8G8R8: return Read4Bpp (Memory, Texture);
|
case GalTextureFormat.A8B8G8R8: return Read4Bpp (Memory, Texture);
|
||||||
|
case GalTextureFormat.R16_G16: return Read4Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.R32: return Read4Bpp (Memory, Texture);
|
case GalTextureFormat.R32: return Read4Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.A1B5G5R5: return Read5551 (Memory, Texture);
|
case GalTextureFormat.A1B5G5R5: return Read5551 (Memory, Texture);
|
||||||
case GalTextureFormat.B5G6R5: return Read565 (Memory, Texture);
|
case GalTextureFormat.B5G6R5: return Read565 (Memory, Texture);
|
||||||
|
|
Loading…
Reference in a new issue