From 15823ab0201f6dd3a68c2eaee0a39e1680a21813 Mon Sep 17 00:00:00 2001 From: Alexey Knyazev Date: Tue, 15 Sep 2020 15:21:58 +0400 Subject: [PATCH] Metal: Implement ASTC LDR support Bug: angleproject:2634 Change-Id: If7ea09de384c8bc8727523f20fe17641127fcf9f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2411982 Commit-Queue: Jonah Ryan-Davis Reviewed-by: Le Hoang Quyen Reviewed-by: Jonah Ryan-Davis --- .../Metal_format_table.json | 4 +- .../renderer/metal/mtl_format_map.json | 114 +++++- .../metal/mtl_format_table_autogen.mm | 364 ++++++++++++++++++ 3 files changed, 479 insertions(+), 3 deletions(-) diff --git a/scripts/code_generation_hashes/Metal_format_table.json b/scripts/code_generation_hashes/Metal_format_table.json index 7001c2d43..aaf66b7c7 100644 --- a/scripts/code_generation_hashes/Metal_format_table.json +++ b/scripts/code_generation_hashes/Metal_format_table.json @@ -6,7 +6,7 @@ "src/libANGLE/renderer/metal/gen_mtl_format_table.py": "91579339b484425ef81b0e900a5c04ed", "src/libANGLE/renderer/metal/mtl_format_map.json": - "0ef0eef6ce842b9439bfa1cc68b3fb77", + "bd60f72f1dc35054ce439c3edad1caab", "src/libANGLE/renderer/metal/mtl_format_table_autogen.mm": - "1f563eeba716d013ef39af6937576591" + "bebdaf4b73c3319075a775e715e35e42" } \ No newline at end of file diff --git a/src/libANGLE/renderer/metal/mtl_format_map.json b/src/libANGLE/renderer/metal/mtl_format_map.json index f1a31d3a9..6fca24064 100644 --- a/src/libANGLE/renderer/metal/mtl_format_map.json +++ b/src/libANGLE/renderer/metal/mtl_format_map.json @@ -101,7 +101,35 @@ "EAC_R11_UNORM_BLOCK": "MTLPixelFormatEAC_R11Unorm", "EAC_R11_SNORM_BLOCK": "MTLPixelFormatEAC_R11Snorm", "EAC_R11G11_UNORM_BLOCK": "MTLPixelFormatEAC_RG11Unorm", - "EAC_R11G11_SNORM_BLOCK": "MTLPixelFormatEAC_RG11Snorm" + "EAC_R11G11_SNORM_BLOCK": "MTLPixelFormatEAC_RG11Snorm", + "ASTC_4x4_UNORM_BLOCK": "MTLPixelFormatASTC_4x4_LDR", + "ASTC_4x4_SRGB_BLOCK": "MTLPixelFormatASTC_4x4_sRGB", + "ASTC_5x4_UNORM_BLOCK": "MTLPixelFormatASTC_5x4_LDR", + "ASTC_5x4_SRGB_BLOCK": "MTLPixelFormatASTC_5x4_sRGB", + "ASTC_5x5_UNORM_BLOCK": "MTLPixelFormatASTC_5x5_LDR", + "ASTC_5x5_SRGB_BLOCK": "MTLPixelFormatASTC_5x5_sRGB", + "ASTC_6x5_UNORM_BLOCK": "MTLPixelFormatASTC_6x5_LDR", + "ASTC_6x5_SRGB_BLOCK": "MTLPixelFormatASTC_6x5_sRGB", + "ASTC_6x6_UNORM_BLOCK": "MTLPixelFormatASTC_6x6_LDR", + "ASTC_6x6_SRGB_BLOCK": "MTLPixelFormatASTC_6x6_sRGB", + "ASTC_8x5_UNORM_BLOCK": "MTLPixelFormatASTC_8x5_LDR", + "ASTC_8x5_SRGB_BLOCK": "MTLPixelFormatASTC_8x5_sRGB", + "ASTC_8x6_UNORM_BLOCK": "MTLPixelFormatASTC_8x6_LDR", + "ASTC_8x6_SRGB_BLOCK": "MTLPixelFormatASTC_8x6_sRGB", + "ASTC_8x8_UNORM_BLOCK": "MTLPixelFormatASTC_8x8_LDR", + "ASTC_8x8_SRGB_BLOCK": "MTLPixelFormatASTC_8x8_sRGB", + "ASTC_10x5_UNORM_BLOCK": "MTLPixelFormatASTC_10x5_LDR", + "ASTC_10x5_SRGB_BLOCK": "MTLPixelFormatASTC_10x5_sRGB", + "ASTC_10x6_UNORM_BLOCK": "MTLPixelFormatASTC_10x6_LDR", + "ASTC_10x6_SRGB_BLOCK": "MTLPixelFormatASTC_10x6_sRGB", + "ASTC_10x8_UNORM_BLOCK": "MTLPixelFormatASTC_10x8_LDR", + "ASTC_10x8_SRGB_BLOCK": "MTLPixelFormatASTC_10x8_sRGB", + "ASTC_10x10_UNORM_BLOCK": "MTLPixelFormatASTC_10x10_LDR", + "ASTC_10x10_SRGB_BLOCK": "MTLPixelFormatASTC_10x10_sRGB", + "ASTC_12x10_UNORM_BLOCK": "MTLPixelFormatASTC_12x10_LDR", + "ASTC_12x10_SRGB_BLOCK": "MTLPixelFormatASTC_12x10_sRGB", + "ASTC_12x12_UNORM_BLOCK": "MTLPixelFormatASTC_12x12_LDR", + "ASTC_12x12_SRGB_BLOCK": "MTLPixelFormatASTC_12x12_sRGB" }, "map_mac": { "D16_UNORM": "MTLPixelFormatDepth16Unorm", @@ -715,6 +743,90 @@ }, "MTLPixelFormatEAC_RG11Snorm":{ "filterable": "true" + }, + "MTLPixelFormatASTC_4x4_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_4x4_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_5x4_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_5x4_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_5x5_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_5x5_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_6x5_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_6x5_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_6x6_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_6x6_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_8x5_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_8x5_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_8x6_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_8x6_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_8x8_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_8x8_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_10x5_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_10x5_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_10x6_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_10x6_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_10x8_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_10x8_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_10x10_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_10x10_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_12x10_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_12x10_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_12x12_LDR":{ + "filterable": "display->supportsIOSGPUFamily(2)" + }, + "MTLPixelFormatASTC_12x12_sRGB":{ + "filterable": "display->supportsIOSGPUFamily(2)" } } }, diff --git a/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm b/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm index 21ea3ebbb..f4b639cc9 100644 --- a/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm +++ b/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm @@ -1017,6 +1017,258 @@ void Format::init(const DisplayMtl *display, angle::FormatID intendedFormatId_) break; #elif TARGET_OS_IOS || TARGET_OS_TV // TARGET_OS_OSX || TARGET_OS_MACCATALYST + case angle::FormatID::ASTC_10x10_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_10x10_sRGB; + this->actualFormatId = angle::FormatID::ASTC_10x10_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_10x10_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_10x10_LDR; + this->actualFormatId = angle::FormatID::ASTC_10x10_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_10x5_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_10x5_sRGB; + this->actualFormatId = angle::FormatID::ASTC_10x5_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_10x5_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_10x5_LDR; + this->actualFormatId = angle::FormatID::ASTC_10x5_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_10x6_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_10x6_sRGB; + this->actualFormatId = angle::FormatID::ASTC_10x6_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_10x6_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_10x6_LDR; + this->actualFormatId = angle::FormatID::ASTC_10x6_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_10x8_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_10x8_sRGB; + this->actualFormatId = angle::FormatID::ASTC_10x8_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_10x8_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_10x8_LDR; + this->actualFormatId = angle::FormatID::ASTC_10x8_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_12x10_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_12x10_sRGB; + this->actualFormatId = angle::FormatID::ASTC_12x10_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_12x10_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_12x10_LDR; + this->actualFormatId = angle::FormatID::ASTC_12x10_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_12x12_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_12x12_sRGB; + this->actualFormatId = angle::FormatID::ASTC_12x12_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_12x12_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_12x12_LDR; + this->actualFormatId = angle::FormatID::ASTC_12x12_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_4x4_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_4x4_sRGB; + this->actualFormatId = angle::FormatID::ASTC_4x4_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_4x4_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_4x4_LDR; + this->actualFormatId = angle::FormatID::ASTC_4x4_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_5x4_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_5x4_sRGB; + this->actualFormatId = angle::FormatID::ASTC_5x4_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_5x4_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_5x4_LDR; + this->actualFormatId = angle::FormatID::ASTC_5x4_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_5x5_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_5x5_sRGB; + this->actualFormatId = angle::FormatID::ASTC_5x5_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_5x5_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_5x5_LDR; + this->actualFormatId = angle::FormatID::ASTC_5x5_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_6x5_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_6x5_sRGB; + this->actualFormatId = angle::FormatID::ASTC_6x5_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_6x5_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_6x5_LDR; + this->actualFormatId = angle::FormatID::ASTC_6x5_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_6x6_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_6x6_sRGB; + this->actualFormatId = angle::FormatID::ASTC_6x6_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_6x6_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_6x6_LDR; + this->actualFormatId = angle::FormatID::ASTC_6x6_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_8x5_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_8x5_sRGB; + this->actualFormatId = angle::FormatID::ASTC_8x5_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_8x5_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_8x5_LDR; + this->actualFormatId = angle::FormatID::ASTC_8x5_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_8x6_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_8x6_sRGB; + this->actualFormatId = angle::FormatID::ASTC_8x6_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_8x6_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_8x6_LDR; + this->actualFormatId = angle::FormatID::ASTC_8x6_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_8x8_SRGB_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_8x8_sRGB; + this->actualFormatId = angle::FormatID::ASTC_8x8_SRGB_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + + case angle::FormatID::ASTC_8x8_UNORM_BLOCK: + + this->metalFormat = MTLPixelFormatASTC_8x8_LDR; + this->actualFormatId = angle::FormatID::ASTC_8x8_UNORM_BLOCK; + this->initFunction = nullptr; + + this->swizzled = false; + break; + case angle::FormatID::EAC_R11G11_SNORM_BLOCK: this->metalFormat = MTLPixelFormatEAC_RG11Snorm; @@ -2652,6 +2904,118 @@ void FormatTable::initNativeFormatCapsAutogen(const DisplayMtl *display) /** blendable*/ true, /** multisample*/ true, /** resolve*/ true, /** colorRenderable*/ true, /** depthRenderable*/ false); + setFormatCaps(MTLPixelFormatASTC_10x10_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_10x10_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_10x5_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_10x5_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_10x6_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_10x6_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_10x8_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_10x8_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_12x10_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_12x10_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_12x12_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_12x12_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_4x4_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_4x4_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_5x4_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_5x4_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_5x5_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_5x5_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_6x5_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_6x5_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_6x6_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_6x6_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_8x5_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_8x5_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_8x6_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_8x6_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_8x8_LDR, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + + setFormatCaps(MTLPixelFormatASTC_8x8_sRGB, /** filterable*/ display->supportsIOSGPUFamily(2), + /** writable*/ false, /** blendable*/ false, /** multisample*/ false, + /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); + setFormatCaps(MTLPixelFormatB5G6R5Unorm, /** filterable*/ true, /** writable*/ false, /** blendable*/ true, /** multisample*/ true, /** resolve*/ true, /** colorRenderable*/ true, /** depthRenderable*/ false);