Add A4B4G4R4 image format
This commit is contained in:
parent
723b7628d1
commit
cbd84c4e25
5 changed files with 7 additions and 1 deletions
|
@ -9,6 +9,7 @@ namespace Ryujinx.Graphics.Gal
|
||||||
R32 = 0xf,
|
R32 = 0xf,
|
||||||
BC6H_SF16 = 0x10,
|
BC6H_SF16 = 0x10,
|
||||||
BC6H_UF16 = 0x11,
|
BC6H_UF16 = 0x11,
|
||||||
|
A4B4G4R4 = 0x12,
|
||||||
A1B5G5R5 = 0x14,
|
A1B5G5R5 = 0x14,
|
||||||
B5G6R5 = 0x15,
|
B5G6R5 = 0x15,
|
||||||
BC7U = 0x17,
|
BC7U = 0x17,
|
||||||
|
|
|
@ -40,6 +40,7 @@ namespace Ryujinx.Graphics.Gal
|
||||||
case GalTextureFormat.R16G16B16A16: return GalImageFormat.R16G16B16A16_UNORM;
|
case GalTextureFormat.R16G16B16A16: return GalImageFormat.R16G16B16A16_UNORM;
|
||||||
case GalTextureFormat.A8B8G8R8: return GalImageFormat.A8B8G8R8_UNORM_PACK32;
|
case GalTextureFormat.A8B8G8R8: return GalImageFormat.A8B8G8R8_UNORM_PACK32;
|
||||||
case GalTextureFormat.A2B10G10R10: return GalImageFormat.A2B10G10R10_UNORM_PACK32;
|
case GalTextureFormat.A2B10G10R10: return GalImageFormat.A2B10G10R10_UNORM_PACK32;
|
||||||
|
case GalTextureFormat.A4B4G4R4: return GalImageFormat.R4G4B4A4_UNORM_PACK16;
|
||||||
case GalTextureFormat.A1B5G5R5: return GalImageFormat.A1R5G5B5_UNORM_PACK16;
|
case GalTextureFormat.A1B5G5R5: return GalImageFormat.A1R5G5B5_UNORM_PACK16;
|
||||||
case GalTextureFormat.B5G6R5: return GalImageFormat.B5G6R5_UNORM_PACK16;
|
case GalTextureFormat.B5G6R5: return GalImageFormat.B5G6R5_UNORM_PACK16;
|
||||||
case GalTextureFormat.BC7U: return GalImageFormat.BC7_UNORM_BLOCK;
|
case GalTextureFormat.BC7U: return GalImageFormat.BC7_UNORM_BLOCK;
|
||||||
|
@ -120,7 +121,7 @@ namespace Ryujinx.Graphics.Gal
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new NotImplementedException(Format.ToString() + " " + Type.ToString());
|
throw new NotImplementedException("0x" + Format.ToString("x2") + " " + Type.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GalImageFormat ConvertFrameBuffer(GalFrameBufferFormat Format)
|
public static GalImageFormat ConvertFrameBuffer(GalFrameBufferFormat Format)
|
||||||
|
@ -181,6 +182,7 @@ namespace Ryujinx.Graphics.Gal
|
||||||
case GalImageFormat.R32_UINT:
|
case GalImageFormat.R32_UINT:
|
||||||
case GalImageFormat.BC6H_SFLOAT_BLOCK:
|
case GalImageFormat.BC6H_SFLOAT_BLOCK:
|
||||||
case GalImageFormat.BC6H_UFLOAT_BLOCK:
|
case GalImageFormat.BC6H_UFLOAT_BLOCK:
|
||||||
|
case GalImageFormat.R4G4B4A4_UNORM_PACK16:
|
||||||
case GalImageFormat.A1R5G5B5_UNORM_PACK16:
|
case GalImageFormat.A1R5G5B5_UNORM_PACK16:
|
||||||
case GalImageFormat.B5G6R5_UNORM_PACK16:
|
case GalImageFormat.B5G6R5_UNORM_PACK16:
|
||||||
case GalImageFormat.BC7_UNORM_BLOCK:
|
case GalImageFormat.BC7_UNORM_BLOCK:
|
||||||
|
|
|
@ -145,6 +145,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
case GalImageFormat.R32_SFLOAT: return (PixelInternalFormat.R32f, PixelFormat.Red, PixelType.Float);
|
case GalImageFormat.R32_SFLOAT: return (PixelInternalFormat.R32f, PixelFormat.Red, PixelType.Float);
|
||||||
case GalImageFormat.R32_SINT: return (PixelInternalFormat.R32i, PixelFormat.Red, PixelType.Int);
|
case GalImageFormat.R32_SINT: return (PixelInternalFormat.R32i, PixelFormat.Red, PixelType.Int);
|
||||||
case GalImageFormat.R32_UINT: return (PixelInternalFormat.R32ui, PixelFormat.Red, PixelType.UnsignedInt);
|
case GalImageFormat.R32_UINT: return (PixelInternalFormat.R32ui, PixelFormat.Red, PixelType.UnsignedInt);
|
||||||
|
case GalImageFormat.R4G4B4A4_UNORM_PACK16: return (PixelInternalFormat.Rgba4, PixelFormat.Rgba, PixelType.UnsignedShort4444Reversed);
|
||||||
case GalImageFormat.A1R5G5B5_UNORM_PACK16: return (PixelInternalFormat.Rgb5A1, PixelFormat.Rgba, PixelType.UnsignedShort5551);
|
case GalImageFormat.A1R5G5B5_UNORM_PACK16: return (PixelInternalFormat.Rgb5A1, PixelFormat.Rgba, PixelType.UnsignedShort5551);
|
||||||
case GalImageFormat.B5G6R5_UNORM_PACK16: return (PixelInternalFormat.Rgba, PixelFormat.Rgb, PixelType.UnsignedShort565);
|
case GalImageFormat.B5G6R5_UNORM_PACK16: return (PixelInternalFormat.Rgba, PixelFormat.Rgb, PixelType.UnsignedShort565);
|
||||||
case GalImageFormat.R16G16_SFLOAT: return (PixelInternalFormat.Rg16f, PixelFormat.Rg, PixelType.HalfFloat);
|
case GalImageFormat.R16G16_SFLOAT: return (PixelInternalFormat.Rg16f, PixelFormat.Rg, PixelType.HalfFloat);
|
||||||
|
|
|
@ -68,6 +68,7 @@ namespace Ryujinx.HLE.Gpu.Texture
|
||||||
case GalImageFormat.D24_UNORM_S8_UINT:
|
case GalImageFormat.D24_UNORM_S8_UINT:
|
||||||
return Image.Width * Image.Height * 4;
|
return Image.Width * Image.Height * 4;
|
||||||
|
|
||||||
|
case GalImageFormat.R4G4B4A4_UNORM_PACK16:
|
||||||
case GalImageFormat.A1R5G5B5_UNORM_PACK16:
|
case GalImageFormat.A1R5G5B5_UNORM_PACK16:
|
||||||
case GalImageFormat.B5G6R5_UNORM_PACK16:
|
case GalImageFormat.B5G6R5_UNORM_PACK16:
|
||||||
case GalImageFormat.R8G8_SINT:
|
case GalImageFormat.R8G8_SINT:
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace Ryujinx.HLE.Gpu.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);
|
||||||
|
case GalTextureFormat.A4B4G4R4: return Read2Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.G8R8: return Read2Bpp (Memory, Texture);
|
case GalTextureFormat.G8R8: return Read2Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.R16: return Read2Bpp (Memory, Texture);
|
case GalTextureFormat.R16: return Read2Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.R8: return Read1Bpp (Memory, Texture);
|
case GalTextureFormat.R8: return Read1Bpp (Memory, Texture);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue