mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-01 14:27:27 +00:00
Implement BF10GF11RF11 TextureFormat (#246)
* add BF10GF11RF11 TextureFormat * return correct PixelFormat & PixelType * return correct texture size * return correct Bytes Per Pixel * correct PixelType
This commit is contained in:
parent
0a13900bc9
commit
120fe6b74a
4 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,7 @@ namespace Ryujinx.Graphics.Gal
|
||||||
G8R8 = 0x18,
|
G8R8 = 0x18,
|
||||||
R16 = 0x1b,
|
R16 = 0x1b,
|
||||||
R8 = 0x1d,
|
R8 = 0x1d,
|
||||||
|
BF10GF11RF11 = 0x21,
|
||||||
BC1 = 0x24,
|
BC1 = 0x24,
|
||||||
BC2 = 0x25,
|
BC2 = 0x25,
|
||||||
BC3 = 0x26,
|
BC3 = 0x26,
|
||||||
|
|
|
@ -139,6 +139,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
case GalTextureFormat.R16: return (PixelFormat.Red, PixelType.HalfFloat);
|
case GalTextureFormat.R16: return (PixelFormat.Red, PixelType.HalfFloat);
|
||||||
case GalTextureFormat.R8: return (PixelFormat.Red, PixelType.UnsignedByte);
|
case GalTextureFormat.R8: return (PixelFormat.Red, PixelType.UnsignedByte);
|
||||||
case GalTextureFormat.ZF32: return (PixelFormat.DepthComponent, PixelType.Float);
|
case GalTextureFormat.ZF32: return (PixelFormat.DepthComponent, PixelType.Float);
|
||||||
|
case GalTextureFormat.BF10GF11RF11: return (PixelFormat.Rgb, PixelType.UnsignedInt10F11F11FRev);
|
||||||
case GalTextureFormat.Z24S8: return (PixelFormat.DepthStencil, PixelType.UnsignedInt248);
|
case GalTextureFormat.Z24S8: return (PixelFormat.DepthStencil, PixelType.UnsignedInt248);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace Ryujinx.HLE.Gpu.Texture
|
||||||
case GalTextureFormat.A8B8G8R8:
|
case GalTextureFormat.A8B8G8R8:
|
||||||
case GalTextureFormat.R32:
|
case GalTextureFormat.R32:
|
||||||
case GalTextureFormat.ZF32:
|
case GalTextureFormat.ZF32:
|
||||||
|
case GalTextureFormat.BF10GF11RF11:
|
||||||
case GalTextureFormat.Z24S8:
|
case GalTextureFormat.Z24S8:
|
||||||
return Texture.Width * Texture.Height * 4;
|
return Texture.Width * Texture.Height * 4;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Ryujinx.HLE.Gpu.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.R32: return Read4Bpp (Memory, Texture);
|
case GalTextureFormat.R32: return Read4Bpp (Memory, Texture);
|
||||||
|
case GalTextureFormat.BF10GF11RF11: return Read4Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.Z24S8: return Read4Bpp (Memory, Texture);
|
case GalTextureFormat.Z24S8: 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