mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-27 04:54:17 +01:00
Merge pull request #9025 from FernandoS27/slava-ukrayini
Texture Cache: Add ASTC 10x5 Format.
This commit is contained in:
commit
31d4bc6953
@ -99,6 +99,8 @@ constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> FORMAT_TAB
|
||||
{GL_COMPRESSED_RGBA_ASTC_6x6_KHR}, // ASTC_2D_6X6_UNORM
|
||||
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR}, // ASTC_2D_6X6_SRGB
|
||||
{GL_COMPRESSED_RGBA_ASTC_10x6_KHR}, // ASTC_2D_10X6_UNORM
|
||||
{GL_COMPRESSED_RGBA_ASTC_10x5_KHR}, // ASTC_2D_10X5_UNORM
|
||||
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR}, // ASTC_2D_10X5_SRGB
|
||||
{GL_COMPRESSED_RGBA_ASTC_10x10_KHR}, // ASTC_2D_10X10_UNORM
|
||||
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR}, // ASTC_2D_10X10_SRGB
|
||||
{GL_COMPRESSED_RGBA_ASTC_12x12_KHR}, // ASTC_2D_12X12_UNORM
|
||||
|
@ -196,6 +196,8 @@ struct FormatTuple {
|
||||
{VK_FORMAT_ASTC_6x6_UNORM_BLOCK}, // ASTC_2D_6X6_UNORM
|
||||
{VK_FORMAT_ASTC_6x6_SRGB_BLOCK}, // ASTC_2D_6X6_SRGB
|
||||
{VK_FORMAT_ASTC_10x6_UNORM_BLOCK}, // ASTC_2D_10X6_UNORM
|
||||
{VK_FORMAT_ASTC_10x5_UNORM_BLOCK}, // ASTC_2D_10X5_UNORM
|
||||
{VK_FORMAT_ASTC_10x5_SRGB_BLOCK}, // ASTC_2D_10X5_SRGB
|
||||
{VK_FORMAT_ASTC_10x10_UNORM_BLOCK}, // ASTC_2D_10X10_UNORM
|
||||
{VK_FORMAT_ASTC_10x10_SRGB_BLOCK}, // ASTC_2D_10X10_SRGB
|
||||
{VK_FORMAT_ASTC_12x12_UNORM_BLOCK}, // ASTC_2D_12X12_UNORM
|
||||
|
@ -247,6 +247,8 @@ bool IsPixelFormatASTC(PixelFormat format) {
|
||||
case PixelFormat::ASTC_2D_6X6_UNORM:
|
||||
case PixelFormat::ASTC_2D_6X6_SRGB:
|
||||
case PixelFormat::ASTC_2D_10X6_UNORM:
|
||||
case PixelFormat::ASTC_2D_10X5_UNORM:
|
||||
case PixelFormat::ASTC_2D_10X5_SRGB:
|
||||
case PixelFormat::ASTC_2D_10X10_UNORM:
|
||||
case PixelFormat::ASTC_2D_10X10_SRGB:
|
||||
case PixelFormat::ASTC_2D_12X12_UNORM:
|
||||
@ -276,6 +278,7 @@ bool IsPixelFormatSRGB(PixelFormat format) {
|
||||
case PixelFormat::ASTC_2D_5X5_SRGB:
|
||||
case PixelFormat::ASTC_2D_10X8_SRGB:
|
||||
case PixelFormat::ASTC_2D_6X6_SRGB:
|
||||
case PixelFormat::ASTC_2D_10X5_SRGB:
|
||||
case PixelFormat::ASTC_2D_10X10_SRGB:
|
||||
case PixelFormat::ASTC_2D_12X12_SRGB:
|
||||
case PixelFormat::ASTC_2D_8X6_SRGB:
|
||||
|
@ -94,6 +94,8 @@ enum class PixelFormat {
|
||||
ASTC_2D_6X6_UNORM,
|
||||
ASTC_2D_6X6_SRGB,
|
||||
ASTC_2D_10X6_UNORM,
|
||||
ASTC_2D_10X5_UNORM,
|
||||
ASTC_2D_10X5_SRGB,
|
||||
ASTC_2D_10X10_UNORM,
|
||||
ASTC_2D_10X10_SRGB,
|
||||
ASTC_2D_12X12_UNORM,
|
||||
@ -228,6 +230,8 @@ constexpr std::array<u8, MaxPixelFormat> BLOCK_WIDTH_TABLE = {{
|
||||
6, // ASTC_2D_6X6_UNORM
|
||||
6, // ASTC_2D_6X6_SRGB
|
||||
10, // ASTC_2D_10X6_UNORM
|
||||
10, // ASTC_2D_10X5_UNORM
|
||||
10, // ASTC_2D_10X5_SRGB
|
||||
10, // ASTC_2D_10X10_UNORM
|
||||
10, // ASTC_2D_10X10_SRGB
|
||||
12, // ASTC_2D_12X12_UNORM
|
||||
@ -331,6 +335,8 @@ constexpr std::array<u8, MaxPixelFormat> BLOCK_HEIGHT_TABLE = {{
|
||||
6, // ASTC_2D_6X6_UNORM
|
||||
6, // ASTC_2D_6X6_SRGB
|
||||
6, // ASTC_2D_10X6_UNORM
|
||||
5, // ASTC_2D_10X5_UNORM
|
||||
5, // ASTC_2D_10X5_SRGB
|
||||
10, // ASTC_2D_10X10_UNORM
|
||||
10, // ASTC_2D_10X10_SRGB
|
||||
12, // ASTC_2D_12X12_UNORM
|
||||
@ -434,6 +440,8 @@ constexpr std::array<u8, MaxPixelFormat> BITS_PER_BLOCK_TABLE = {{
|
||||
128, // ASTC_2D_6X6_UNORM
|
||||
128, // ASTC_2D_6X6_SRGB
|
||||
128, // ASTC_2D_10X6_UNORM
|
||||
128, // ASTC_2D_10X5_UNORM
|
||||
128, // ASTC_2D_10X5_SRGB
|
||||
128, // ASTC_2D_10X10_UNORM
|
||||
128, // ASTC_2D_10X10_SRGB
|
||||
128, // ASTC_2D_12X12_UNORM
|
||||
|
@ -208,6 +208,10 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red,
|
||||
return PixelFormat::ASTC_2D_6X6_SRGB;
|
||||
case Hash(TextureFormat::ASTC_2D_10X6, UNORM, LINEAR):
|
||||
return PixelFormat::ASTC_2D_10X6_UNORM;
|
||||
case Hash(TextureFormat::ASTC_2D_10X5, UNORM, LINEAR):
|
||||
return PixelFormat::ASTC_2D_10X5_UNORM;
|
||||
case Hash(TextureFormat::ASTC_2D_10X5, UNORM, SRGB):
|
||||
return PixelFormat::ASTC_2D_10X5_SRGB;
|
||||
case Hash(TextureFormat::ASTC_2D_10X10, UNORM, LINEAR):
|
||||
return PixelFormat::ASTC_2D_10X10_UNORM;
|
||||
case Hash(TextureFormat::ASTC_2D_10X10, UNORM, SRGB):
|
||||
|
@ -177,6 +177,10 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str
|
||||
return "ASTC_2D_6X6_SRGB";
|
||||
case PixelFormat::ASTC_2D_10X6_UNORM:
|
||||
return "ASTC_2D_10X6_UNORM";
|
||||
case PixelFormat::ASTC_2D_10X5_UNORM:
|
||||
return "ASTC_2D_10X5_UNORM";
|
||||
case PixelFormat::ASTC_2D_10X5_SRGB:
|
||||
return "ASTC_2D_10X5_SRGB";
|
||||
case PixelFormat::ASTC_2D_10X10_UNORM:
|
||||
return "ASTC_2D_10X10_UNORM";
|
||||
case PixelFormat::ASTC_2D_10X10_SRGB:
|
||||
|
Loading…
Reference in New Issue
Block a user