Implement BC6H_SF16 & BC6H_UF16

This commit is contained in:
Unknown 2018-07-13 23:22:48 +02:00 committed by greggameplayer
parent 3b00333b0c
commit fb85e43ba4
5 changed files with 16 additions and 6 deletions

View file

@ -5,6 +5,8 @@ namespace Ryujinx.Graphics.Gal
R32G32B32A32 = 0x1,
R16G16B16A16 = 0x3,
A8B8G8R8 = 0x8,
BC6H_SF16 = 0x10,
BC6H_UF16 = 0x11,
R32 = 0xf,
A1B5G5R5 = 0x14,
B5G6R5 = 0x15,

View file

@ -148,12 +148,14 @@ namespace Ryujinx.Graphics.Gal.OpenGL
{
switch (Format)
{
case GalTextureFormat.BC7U: return InternalFormat.CompressedRgbaBptcUnorm;
case GalTextureFormat.BC1: return InternalFormat.CompressedRgbaS3tcDxt1Ext;
case GalTextureFormat.BC2: return InternalFormat.CompressedRgbaS3tcDxt3Ext;
case GalTextureFormat.BC3: return InternalFormat.CompressedRgbaS3tcDxt5Ext;
case GalTextureFormat.BC4: return InternalFormat.CompressedRedRgtc1;
case GalTextureFormat.BC5: return InternalFormat.CompressedRgRgtc2;
case GalTextureFormat.BC7U: return InternalFormat.CompressedRgbaBptcUnorm;
case GalTextureFormat.BC6H_UF16: return InternalFormat.CompressedRgbBptcUnsignedFloat;
case GalTextureFormat.BC6H_SF16: return InternalFormat.CompressedRgbBptcSignedFloat;
case GalTextureFormat.BC1: return InternalFormat.CompressedRgbaS3tcDxt1Ext;
case GalTextureFormat.BC2: return InternalFormat.CompressedRgbaS3tcDxt3Ext;
case GalTextureFormat.BC3: return InternalFormat.CompressedRgbaS3tcDxt5Ext;
case GalTextureFormat.BC4: return InternalFormat.CompressedRedRgtc1;
case GalTextureFormat.BC5: return InternalFormat.CompressedRgRgtc2;
}
throw new NotImplementedException(Format.ToString());

View file

@ -213,6 +213,8 @@ namespace Ryujinx.Graphics.Gal.OpenGL
switch (Format)
{
case GalTextureFormat.BC7U:
case GalTextureFormat.BC6H_UF16:
case GalTextureFormat.BC6H_SF16:
case GalTextureFormat.BC1:
case GalTextureFormat.BC2:
case GalTextureFormat.BC3:

View file

@ -55,6 +55,8 @@ namespace Ryujinx.HLE.Gpu.Texture
}
case GalTextureFormat.BC7U:
case GalTextureFormat.BC6H_SF16:
case GalTextureFormat.BC6H_UF16:
case GalTextureFormat.BC2:
case GalTextureFormat.BC3:
case GalTextureFormat.BC5:

View file

@ -20,6 +20,8 @@ namespace Ryujinx.HLE.Gpu.Texture
case GalTextureFormat.R16: return Read2Bpp (Memory, Texture);
case GalTextureFormat.R8: return Read1Bpp (Memory, Texture);
case GalTextureFormat.BC7U: return Read16BptCompressedTexture(Memory, Texture, 4, 4);
case GalTextureFormat.BC6H_SF16: return Read16BptCompressedTexture(Memory, Texture, 4, 4);
case GalTextureFormat.BC6H_UF16: return Read16BptCompressedTexture(Memory, Texture, 4, 4);
case GalTextureFormat.BC1: return Read8Bpt4x4 (Memory, Texture);
case GalTextureFormat.BC2: return Read16BptCompressedTexture(Memory, Texture, 4, 4);
case GalTextureFormat.BC3: return Read16BptCompressedTexture(Memory, Texture, 4, 4);