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 <jonahr@google.com>
Reviewed-by: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
This commit is contained in:
Alexey Knyazev
2020-09-15 15:21:58 +04:00
committed by Commit Bot
parent 57193e8bb7
commit 15823ab020
3 changed files with 479 additions and 3 deletions

View File

@@ -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"
}

View File

@@ -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)"
}
}
},

View File

@@ -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);