⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286899 in webkit


Ignore:
Timestamp:
Dec 10, 2021, 7:24:50 PM (5 years ago)
Author:
Kyle Piddington
Message:

[ANGLE] ASTC-HDR is unavailable on some platforms
https://bugs.webkit.org/show_bug.cgi?id=234164

Reviewed by Kenneth Russell.

Update autogenerated format table to avoid using ASTC_HDR on
platforms that don't have the enum.

  • src/libANGLE/renderer/metal/gen_mtl_format_table.py:

(gen_image_map_switch_astc_case_iosmac):
(gen_image_map_switch_astc_case_tvos):
(gen_image_map_switch_astc_case_tvos.gen_format_assign_code):
(gen_image_map_switch_string):
(gen_image_mtl_to_angle_switch_string):
(gen_mtl_format_caps_init_string):
(gen_image_map_switch_astc_case): Deleted.
(gen_image_map_switch_astc_case.gen_format_assign_code): Deleted.

  • src/libANGLE/renderer/metal/mtl_format_map.json:
  • src/libANGLE/renderer/metal/mtl_format_table_autogen.mm:

(rx::mtl::Format::MetalToAngleFormatID):
(rx::mtl::Format::init):
(rx::mtl::FormatTable::initNativeFormatCapsAutogen):

Location:
trunk/Source/ThirdParty/ANGLE
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r286896 r286899  
     12021-12-10  Kyle Piddington  <kpiddington@apple.com>
     2
     3        [ANGLE] ASTC-HDR is unavailable on some platforms
     4        https://bugs.webkit.org/show_bug.cgi?id=234164
     5
     6        Reviewed by Kenneth Russell.
     7
     8        Update autogenerated format table to avoid using ASTC_HDR on
     9        platforms that don't have the enum.
     10
     11        * src/libANGLE/renderer/metal/gen_mtl_format_table.py:
     12        (gen_image_map_switch_astc_case_iosmac):
     13        (gen_image_map_switch_astc_case_tvos):
     14        (gen_image_map_switch_astc_case_tvos.gen_format_assign_code):
     15        (gen_image_map_switch_string):
     16        (gen_image_mtl_to_angle_switch_string):
     17        (gen_mtl_format_caps_init_string):
     18        (gen_image_map_switch_astc_case): Deleted.
     19        (gen_image_map_switch_astc_case.gen_format_assign_code): Deleted.
     20        * src/libANGLE/renderer/metal/mtl_format_map.json:
     21        * src/libANGLE/renderer/metal/mtl_format_table_autogen.mm:
     22        (rx::mtl::Format::MetalToAngleFormatID):
     23        (rx::mtl::Format::init):
     24        (rx::mtl::FormatTable::initNativeFormatCapsAutogen):
     25
    1262021-12-10  Michael Saboff  <msaboff@apple.com>
    227
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py

    r286603 r286899  
    365365
    366366# Generate format conversion switch case (ASTC LDR/HDR case)
    367 def gen_image_map_switch_astc_case(angle_format, angle_to_gl, angle_to_mtl_map):
     367def gen_image_map_switch_astc_case_iosmac(angle_format, angle_to_gl, angle_to_mtl_map):
    368368    gl_format = angle_to_gl[angle_format]
    369369
     
    382382    return gen_image_map_switch_case(angle_format, angle_format, angle_to_mtl_map,
    383383                                     gen_format_assign_code)
     384
     385def gen_image_map_switch_astc_case_watchos(angle_format, angle_to_gl, angle_to_mtl_map):
     386    gl_format = angle_to_gl[angle_format]
     387
     388    def gen_format_assign_code(actual_angle_format, angle_to_mtl_map):
     389        return image_format_assign_template1.format(
     390            actual_angle_format=actual_angle_format,
     391            mtl_format=angle_to_mtl_map[actual_angle_format] + "LDR",
     392            init_function=angle_format_utils.get_internal_format_initializer(
     393                gl_format, actual_angle_format))
     394
     395    return gen_image_map_switch_case(angle_format, angle_format, angle_to_mtl_map,
     396                                     gen_format_assign_code)
     397
    384398
    385399
     
    449463        switch_data += gen_image_map_switch_simple_case(angle_format, sim_override[angle_format],
    450464                                                        angle_to_gl, sim_angle_to_mtl)
     465    switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV\n"
    451466    for angle_format in sorted(astc_tpl_map.keys()):
    452         switch_data += gen_image_map_switch_astc_case(angle_format, angle_to_gl, astc_tpl_map)
     467        switch_data += gen_image_map_switch_astc_case_iosmac(angle_format, angle_to_gl, astc_tpl_map)
     468    switch_data += "#elif TARGET_OS_WATCH\n"
     469
     470    for angle_format in sorted(astc_tpl_map.keys()):
     471        switch_data += gen_image_map_switch_astc_case_watchos(angle_format, angle_to_gl, astc_tpl_map)
     472    switch_data += "#endif // TARGET_OS_IOS || TARGET_OS_TV \n "
    453473    # iOS specific
    454     switch_data += "#elif TARGET_OS_IOS || TARGET_OS_TV\n"
     474    switch_data += "#elif TARGET_OS_IPHONE\n"
    455475    for angle_format in sorted(ios_specific_map.keys()):
    456476        switch_data += gen_image_map_switch_simple_case(angle_format, angle_format, angle_to_gl,
     
    459479        switch_data += gen_image_map_switch_simple_case(angle_format, ios_override[angle_format],
    460480                                                        angle_to_gl, ios_angle_to_mtl)
     481    switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV\n"
    461482    for angle_format in sorted(astc_tpl_map.keys()):
    462         switch_data += gen_image_map_switch_astc_case(angle_format, angle_to_gl, astc_tpl_map)
    463     switch_data += "#endif\n"
     483        switch_data += gen_image_map_switch_astc_case_iosmac(angle_format, angle_to_gl, astc_tpl_map)
     484
     485    switch_data += "#elif TARGET_OS_WATCH\n"
     486
     487    for angle_format in sorted(astc_tpl_map.keys()):
     488        switch_data += gen_image_map_switch_astc_case_watchos(angle_format, angle_to_gl, astc_tpl_map)
     489    switch_data += "#endif // TARGET_OS_IOS || TARGET_OS_TV\n"
     490    switch_data += "#endif // TARGET_OS_IPHONE\n"
    464491
    465492    # Try to support all iOS formats on newer macOS with Apple GPU.
     
    476503    # ASTC LDR or HDR
    477504    for angle_format in sorted(astc_tpl_map.keys()):
    478         switch_data += gen_image_map_switch_astc_case(angle_format, angle_to_gl, astc_tpl_map)
    479     switch_data += "#endif\n"
     505        switch_data += gen_image_map_switch_astc_case_iosmac(angle_format, angle_to_gl, astc_tpl_map)
     506    switch_data += "#endif // TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600)) \n"
    480507
    481508    switch_data += "        default:\n"
     
    506533
    507534    # iOS + macOS 11.0+ specific
    508     switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV || (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))\n"
     535    switch_data += "#if TARGET_OS_IPHONE || (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))\n"
    509536    for angle_format in sorted(ios_specific_map.keys()):
    510537        # ETC1_R8G8B8_UNORM_BLOCK is a duplicated of ETC2_R8G8B8_UNORM_BLOCK
     
    516543        switch_data += case_image_mtl_to_angle_template.format(
    517544            mtl_format=astc_tpl_map[angle_format] + "LDR", angle_format=angle_format)
     545    switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX \n"
     546    for angle_format in sorted(astc_tpl_map.keys()):
    518547        switch_data += case_image_mtl_to_angle_template.format(
    519548            mtl_format=astc_tpl_map[angle_format] + "HDR", angle_format=angle_format)
    520     switch_data += "#endif  // TARGET_OS_IOS || TARGET_OS_TV || mac 11.0+\n"
     549    switch_data += "#endif // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX\n"
     550    switch_data += "#endif  // TARGET_OS_IPHONE || mac 11.0+\n"
    521551
    522552    switch_data += "        default:\n"
     
    587617    caps = map_image['caps']
    588618    mac_caps = map_image['caps_mac']
    589     ios_caps = map_image['caps_ios']
     619    ios_platform_caps = map_image['caps_ios_platform']
     620    ios_specific_caps = map_image['caps_ios_spcific']
    590621    caps_init_str = ''
    591622
     
    617648    caps_init_str += "#endif  // TARGET_OS_OSX || TARGET_OS_MACCATALYST\n"
    618649
    619     caps_init_str += "#if (TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV || \\\n"
     650    caps_init_str += "#if (TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST) || \\\n"
    620651    caps_init_str += "    (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))\n"
    621652
    622     caps_init_str += caps_to_cpp(ios_caps)
    623 
    624     caps_init_str += "#endif\n"
     653    caps_init_str += caps_to_cpp(ios_platform_caps)
     654   
     655    caps_init_str += "#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX\n"
     656    caps_init_str += caps_to_cpp(ios_specific_caps)
     657    caps_init_str += "#endif // TARGET_OS_IOS || TARGET_OS_TV || mac 11.0+ \n"
     658    caps_init_str += "#endif // TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST || mac 11.0+ \n"
    625659
    626660    return caps_init_str
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_map.json

    r286603 r286899  
    701701            }
    702702        },
    703         "caps_ios": {
     703        "caps_ios_platform": {
    704704            "MTLPixelFormatR8Unorm_sRGB":{
    705705                "filterable": "display->supportsAppleGPUFamily(1)",
     
    887887            "MTLPixelFormatASTC_12x12_sRGB":{
    888888                "filterable": "display->supportsAppleGPUFamily(2)"
    889             },
     889            }
     890        },
     891        "caps_ios_spcific" :
     892        {
    890893            "MTLPixelFormatASTC_4x4_HDR":{
    891894                "filterable": "display->supportsAppleGPUFamily(6)"
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm

    r286603 r286899  
    160160            return angle::FormatID::D24_UNORM_S8_UINT;
    161161#endif  // TARGET_OS_OSX || TARGET_OS_MACCATALYST
    162 #if TARGET_OS_IOS || TARGET_OS_TV || (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))
     162#if TARGET_OS_IPHONE || (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))
    163163        case MTLPixelFormatASTC_10x10_sRGB:
    164164            return angle::FormatID::ASTC_10x10_SRGB_BLOCK;
     
    237237        case MTLPixelFormatASTC_10x10_LDR:
    238238            return angle::FormatID::ASTC_10x10_UNORM_BLOCK;
    239         case MTLPixelFormatASTC_10x10_HDR:
    240             return angle::FormatID::ASTC_10x10_UNORM_BLOCK;
    241239        case MTLPixelFormatASTC_10x5_LDR:
    242             return angle::FormatID::ASTC_10x5_UNORM_BLOCK;
    243         case MTLPixelFormatASTC_10x5_HDR:
    244240            return angle::FormatID::ASTC_10x5_UNORM_BLOCK;
    245241        case MTLPixelFormatASTC_10x6_LDR:
    246242            return angle::FormatID::ASTC_10x6_UNORM_BLOCK;
    247         case MTLPixelFormatASTC_10x6_HDR:
    248             return angle::FormatID::ASTC_10x6_UNORM_BLOCK;
    249243        case MTLPixelFormatASTC_10x8_LDR:
    250             return angle::FormatID::ASTC_10x8_UNORM_BLOCK;
    251         case MTLPixelFormatASTC_10x8_HDR:
    252244            return angle::FormatID::ASTC_10x8_UNORM_BLOCK;
    253245        case MTLPixelFormatASTC_12x10_LDR:
    254246            return angle::FormatID::ASTC_12x10_UNORM_BLOCK;
    255         case MTLPixelFormatASTC_12x10_HDR:
    256             return angle::FormatID::ASTC_12x10_UNORM_BLOCK;
    257247        case MTLPixelFormatASTC_12x12_LDR:
    258             return angle::FormatID::ASTC_12x12_UNORM_BLOCK;
    259         case MTLPixelFormatASTC_12x12_HDR:
    260248            return angle::FormatID::ASTC_12x12_UNORM_BLOCK;
    261249        case MTLPixelFormatASTC_4x4_LDR:
    262250            return angle::FormatID::ASTC_4x4_UNORM_BLOCK;
    263         case MTLPixelFormatASTC_4x4_HDR:
    264             return angle::FormatID::ASTC_4x4_UNORM_BLOCK;
    265251        case MTLPixelFormatASTC_5x4_LDR:
    266             return angle::FormatID::ASTC_5x4_UNORM_BLOCK;
    267         case MTLPixelFormatASTC_5x4_HDR:
    268252            return angle::FormatID::ASTC_5x4_UNORM_BLOCK;
    269253        case MTLPixelFormatASTC_5x5_LDR:
    270254            return angle::FormatID::ASTC_5x5_UNORM_BLOCK;
    271         case MTLPixelFormatASTC_5x5_HDR:
    272             return angle::FormatID::ASTC_5x5_UNORM_BLOCK;
    273255        case MTLPixelFormatASTC_6x5_LDR:
    274             return angle::FormatID::ASTC_6x5_UNORM_BLOCK;
    275         case MTLPixelFormatASTC_6x5_HDR:
    276256            return angle::FormatID::ASTC_6x5_UNORM_BLOCK;
    277257        case MTLPixelFormatASTC_6x6_LDR:
    278258            return angle::FormatID::ASTC_6x6_UNORM_BLOCK;
    279         case MTLPixelFormatASTC_6x6_HDR:
    280             return angle::FormatID::ASTC_6x6_UNORM_BLOCK;
    281259        case MTLPixelFormatASTC_8x5_LDR:
    282             return angle::FormatID::ASTC_8x5_UNORM_BLOCK;
    283         case MTLPixelFormatASTC_8x5_HDR:
    284260            return angle::FormatID::ASTC_8x5_UNORM_BLOCK;
    285261        case MTLPixelFormatASTC_8x6_LDR:
    286262            return angle::FormatID::ASTC_8x6_UNORM_BLOCK;
     263        case MTLPixelFormatASTC_8x8_LDR:
     264            return angle::FormatID::ASTC_8x8_UNORM_BLOCK;
     265#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX
     266        case MTLPixelFormatASTC_10x10_HDR:
     267            return angle::FormatID::ASTC_10x10_UNORM_BLOCK;
     268        case MTLPixelFormatASTC_10x5_HDR:
     269            return angle::FormatID::ASTC_10x5_UNORM_BLOCK;
     270        case MTLPixelFormatASTC_10x6_HDR:
     271            return angle::FormatID::ASTC_10x6_UNORM_BLOCK;
     272        case MTLPixelFormatASTC_10x8_HDR:
     273            return angle::FormatID::ASTC_10x8_UNORM_BLOCK;
     274        case MTLPixelFormatASTC_12x10_HDR:
     275            return angle::FormatID::ASTC_12x10_UNORM_BLOCK;
     276        case MTLPixelFormatASTC_12x12_HDR:
     277            return angle::FormatID::ASTC_12x12_UNORM_BLOCK;
     278        case MTLPixelFormatASTC_4x4_HDR:
     279            return angle::FormatID::ASTC_4x4_UNORM_BLOCK;
     280        case MTLPixelFormatASTC_5x4_HDR:
     281            return angle::FormatID::ASTC_5x4_UNORM_BLOCK;
     282        case MTLPixelFormatASTC_5x5_HDR:
     283            return angle::FormatID::ASTC_5x5_UNORM_BLOCK;
     284        case MTLPixelFormatASTC_6x5_HDR:
     285            return angle::FormatID::ASTC_6x5_UNORM_BLOCK;
     286        case MTLPixelFormatASTC_6x6_HDR:
     287            return angle::FormatID::ASTC_6x6_UNORM_BLOCK;
     288        case MTLPixelFormatASTC_8x5_HDR:
     289            return angle::FormatID::ASTC_8x5_UNORM_BLOCK;
    287290        case MTLPixelFormatASTC_8x6_HDR:
    288291            return angle::FormatID::ASTC_8x6_UNORM_BLOCK;
    289         case MTLPixelFormatASTC_8x8_LDR:
    290             return angle::FormatID::ASTC_8x8_UNORM_BLOCK;
    291292        case MTLPixelFormatASTC_8x8_HDR:
    292293            return angle::FormatID::ASTC_8x8_UNORM_BLOCK;
    293 #endif  // TARGET_OS_IOS || TARGET_OS_TV || mac 11.0+
     294#endif // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX
     295#endif  // TARGET_OS_IPHONE || mac 11.0+
    294296        default:
    295297            return angle::FormatID::NONE;
     
    15501552            break;
    15511553
     1554#if TARGET_OS_IOS || TARGET_OS_TV
    15521555        case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
    15531556           
     
    18021805            break;
    18031806
    1804 #elif TARGET_OS_IOS || TARGET_OS_TV
     1807#elif TARGET_OS_WATCH
     1808        case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
     1809           
     1810            this->metalFormat = MTLPixelFormatASTC_10x10_LDR;
     1811            this->actualFormatId = angle::FormatID::ASTC_10x10_UNORM_BLOCK;
     1812            this->initFunction = nullptr;
     1813
     1814            this->swizzled = false;
     1815            break;
     1816
     1817        case angle::FormatID::ASTC_10x5_UNORM_BLOCK:
     1818           
     1819            this->metalFormat = MTLPixelFormatASTC_10x5_LDR;
     1820            this->actualFormatId = angle::FormatID::ASTC_10x5_UNORM_BLOCK;
     1821            this->initFunction = nullptr;
     1822
     1823            this->swizzled = false;
     1824            break;
     1825
     1826        case angle::FormatID::ASTC_10x6_UNORM_BLOCK:
     1827           
     1828            this->metalFormat = MTLPixelFormatASTC_10x6_LDR;
     1829            this->actualFormatId = angle::FormatID::ASTC_10x6_UNORM_BLOCK;
     1830            this->initFunction = nullptr;
     1831
     1832            this->swizzled = false;
     1833            break;
     1834
     1835        case angle::FormatID::ASTC_10x8_UNORM_BLOCK:
     1836           
     1837            this->metalFormat = MTLPixelFormatASTC_10x8_LDR;
     1838            this->actualFormatId = angle::FormatID::ASTC_10x8_UNORM_BLOCK;
     1839            this->initFunction = nullptr;
     1840
     1841            this->swizzled = false;
     1842            break;
     1843
     1844        case angle::FormatID::ASTC_12x10_UNORM_BLOCK:
     1845           
     1846            this->metalFormat = MTLPixelFormatASTC_12x10_LDR;
     1847            this->actualFormatId = angle::FormatID::ASTC_12x10_UNORM_BLOCK;
     1848            this->initFunction = nullptr;
     1849
     1850            this->swizzled = false;
     1851            break;
     1852
     1853        case angle::FormatID::ASTC_12x12_UNORM_BLOCK:
     1854           
     1855            this->metalFormat = MTLPixelFormatASTC_12x12_LDR;
     1856            this->actualFormatId = angle::FormatID::ASTC_12x12_UNORM_BLOCK;
     1857            this->initFunction = nullptr;
     1858
     1859            this->swizzled = false;
     1860            break;
     1861
     1862        case angle::FormatID::ASTC_4x4_UNORM_BLOCK:
     1863           
     1864            this->metalFormat = MTLPixelFormatASTC_4x4_LDR;
     1865            this->actualFormatId = angle::FormatID::ASTC_4x4_UNORM_BLOCK;
     1866            this->initFunction = nullptr;
     1867
     1868            this->swizzled = false;
     1869            break;
     1870
     1871        case angle::FormatID::ASTC_5x4_UNORM_BLOCK:
     1872           
     1873            this->metalFormat = MTLPixelFormatASTC_5x4_LDR;
     1874            this->actualFormatId = angle::FormatID::ASTC_5x4_UNORM_BLOCK;
     1875            this->initFunction = nullptr;
     1876
     1877            this->swizzled = false;
     1878            break;
     1879
     1880        case angle::FormatID::ASTC_5x5_UNORM_BLOCK:
     1881           
     1882            this->metalFormat = MTLPixelFormatASTC_5x5_LDR;
     1883            this->actualFormatId = angle::FormatID::ASTC_5x5_UNORM_BLOCK;
     1884            this->initFunction = nullptr;
     1885
     1886            this->swizzled = false;
     1887            break;
     1888
     1889        case angle::FormatID::ASTC_6x5_UNORM_BLOCK:
     1890           
     1891            this->metalFormat = MTLPixelFormatASTC_6x5_LDR;
     1892            this->actualFormatId = angle::FormatID::ASTC_6x5_UNORM_BLOCK;
     1893            this->initFunction = nullptr;
     1894
     1895            this->swizzled = false;
     1896            break;
     1897
     1898        case angle::FormatID::ASTC_6x6_UNORM_BLOCK:
     1899           
     1900            this->metalFormat = MTLPixelFormatASTC_6x6_LDR;
     1901            this->actualFormatId = angle::FormatID::ASTC_6x6_UNORM_BLOCK;
     1902            this->initFunction = nullptr;
     1903
     1904            this->swizzled = false;
     1905            break;
     1906
     1907        case angle::FormatID::ASTC_8x5_UNORM_BLOCK:
     1908           
     1909            this->metalFormat = MTLPixelFormatASTC_8x5_LDR;
     1910            this->actualFormatId = angle::FormatID::ASTC_8x5_UNORM_BLOCK;
     1911            this->initFunction = nullptr;
     1912
     1913            this->swizzled = false;
     1914            break;
     1915
     1916        case angle::FormatID::ASTC_8x6_UNORM_BLOCK:
     1917           
     1918            this->metalFormat = MTLPixelFormatASTC_8x6_LDR;
     1919            this->actualFormatId = angle::FormatID::ASTC_8x6_UNORM_BLOCK;
     1920            this->initFunction = nullptr;
     1921
     1922            this->swizzled = false;
     1923            break;
     1924
     1925        case angle::FormatID::ASTC_8x8_UNORM_BLOCK:
     1926           
     1927            this->metalFormat = MTLPixelFormatASTC_8x8_LDR;
     1928            this->actualFormatId = angle::FormatID::ASTC_8x8_UNORM_BLOCK;
     1929            this->initFunction = nullptr;
     1930
     1931            this->swizzled = false;
     1932            break;
     1933
     1934#endif // TARGET_OS_IOS || TARGET_OS_TV
     1935 #elif TARGET_OS_IPHONE
    18051936        case angle::FormatID::ASTC_10x10_SRGB_BLOCK:
    18061937           
     
    21632294            break;
    21642295
     2296#if TARGET_OS_IOS || TARGET_OS_TV
    21652297        case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
    21662298           
     
    24152547            break;
    24162548
    2417 #endif
     2549#elif TARGET_OS_WATCH
     2550        case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
     2551           
     2552            this->metalFormat = MTLPixelFormatASTC_10x10_LDR;
     2553            this->actualFormatId = angle::FormatID::ASTC_10x10_UNORM_BLOCK;
     2554            this->initFunction = nullptr;
     2555
     2556            this->swizzled = false;
     2557            break;
     2558
     2559        case angle::FormatID::ASTC_10x5_UNORM_BLOCK:
     2560           
     2561            this->metalFormat = MTLPixelFormatASTC_10x5_LDR;
     2562            this->actualFormatId = angle::FormatID::ASTC_10x5_UNORM_BLOCK;
     2563            this->initFunction = nullptr;
     2564
     2565            this->swizzled = false;
     2566            break;
     2567
     2568        case angle::FormatID::ASTC_10x6_UNORM_BLOCK:
     2569           
     2570            this->metalFormat = MTLPixelFormatASTC_10x6_LDR;
     2571            this->actualFormatId = angle::FormatID::ASTC_10x6_UNORM_BLOCK;
     2572            this->initFunction = nullptr;
     2573
     2574            this->swizzled = false;
     2575            break;
     2576
     2577        case angle::FormatID::ASTC_10x8_UNORM_BLOCK:
     2578           
     2579            this->metalFormat = MTLPixelFormatASTC_10x8_LDR;
     2580            this->actualFormatId = angle::FormatID::ASTC_10x8_UNORM_BLOCK;
     2581            this->initFunction = nullptr;
     2582
     2583            this->swizzled = false;
     2584            break;
     2585
     2586        case angle::FormatID::ASTC_12x10_UNORM_BLOCK:
     2587           
     2588            this->metalFormat = MTLPixelFormatASTC_12x10_LDR;
     2589            this->actualFormatId = angle::FormatID::ASTC_12x10_UNORM_BLOCK;
     2590            this->initFunction = nullptr;
     2591
     2592            this->swizzled = false;
     2593            break;
     2594
     2595        case angle::FormatID::ASTC_12x12_UNORM_BLOCK:
     2596           
     2597            this->metalFormat = MTLPixelFormatASTC_12x12_LDR;
     2598            this->actualFormatId = angle::FormatID::ASTC_12x12_UNORM_BLOCK;
     2599            this->initFunction = nullptr;
     2600
     2601            this->swizzled = false;
     2602            break;
     2603
     2604        case angle::FormatID::ASTC_4x4_UNORM_BLOCK:
     2605           
     2606            this->metalFormat = MTLPixelFormatASTC_4x4_LDR;
     2607            this->actualFormatId = angle::FormatID::ASTC_4x4_UNORM_BLOCK;
     2608            this->initFunction = nullptr;
     2609
     2610            this->swizzled = false;
     2611            break;
     2612
     2613        case angle::FormatID::ASTC_5x4_UNORM_BLOCK:
     2614           
     2615            this->metalFormat = MTLPixelFormatASTC_5x4_LDR;
     2616            this->actualFormatId = angle::FormatID::ASTC_5x4_UNORM_BLOCK;
     2617            this->initFunction = nullptr;
     2618
     2619            this->swizzled = false;
     2620            break;
     2621
     2622        case angle::FormatID::ASTC_5x5_UNORM_BLOCK:
     2623           
     2624            this->metalFormat = MTLPixelFormatASTC_5x5_LDR;
     2625            this->actualFormatId = angle::FormatID::ASTC_5x5_UNORM_BLOCK;
     2626            this->initFunction = nullptr;
     2627
     2628            this->swizzled = false;
     2629            break;
     2630
     2631        case angle::FormatID::ASTC_6x5_UNORM_BLOCK:
     2632           
     2633            this->metalFormat = MTLPixelFormatASTC_6x5_LDR;
     2634            this->actualFormatId = angle::FormatID::ASTC_6x5_UNORM_BLOCK;
     2635            this->initFunction = nullptr;
     2636
     2637            this->swizzled = false;
     2638            break;
     2639
     2640        case angle::FormatID::ASTC_6x6_UNORM_BLOCK:
     2641           
     2642            this->metalFormat = MTLPixelFormatASTC_6x6_LDR;
     2643            this->actualFormatId = angle::FormatID::ASTC_6x6_UNORM_BLOCK;
     2644            this->initFunction = nullptr;
     2645
     2646            this->swizzled = false;
     2647            break;
     2648
     2649        case angle::FormatID::ASTC_8x5_UNORM_BLOCK:
     2650           
     2651            this->metalFormat = MTLPixelFormatASTC_8x5_LDR;
     2652            this->actualFormatId = angle::FormatID::ASTC_8x5_UNORM_BLOCK;
     2653            this->initFunction = nullptr;
     2654
     2655            this->swizzled = false;
     2656            break;
     2657
     2658        case angle::FormatID::ASTC_8x6_UNORM_BLOCK:
     2659           
     2660            this->metalFormat = MTLPixelFormatASTC_8x6_LDR;
     2661            this->actualFormatId = angle::FormatID::ASTC_8x6_UNORM_BLOCK;
     2662            this->initFunction = nullptr;
     2663
     2664            this->swizzled = false;
     2665            break;
     2666
     2667        case angle::FormatID::ASTC_8x8_UNORM_BLOCK:
     2668           
     2669            this->metalFormat = MTLPixelFormatASTC_8x8_LDR;
     2670            this->actualFormatId = angle::FormatID::ASTC_8x8_UNORM_BLOCK;
     2671            this->initFunction = nullptr;
     2672
     2673            this->swizzled = false;
     2674            break;
     2675
     2676#endif // TARGET_OS_IOS || TARGET_OS_TV
     2677#endif // TARGET_OS_IPHONE
    24182678#if (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))
    24192679        case angle::FormatID::ASTC_10x10_SRGB_BLOCK:
     
    31373397            break;
    31383398
    3139 #endif
     3399#endif // TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))
    31403400        default:
    31413401            this->metalFormat = MTLPixelFormatInvalid;
     
    43804640
    43814641#endif  // TARGET_OS_OSX || TARGET_OS_MACCATALYST
    4382 #if (TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV || \
     4642#if (TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST) || \
    43834643    (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))
    43844644    setFormatCaps(MTLPixelFormatA1BGR5Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
     
    43864646    setFormatCaps(MTLPixelFormatABGR4Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
    43874647
     4648    setFormatCaps(MTLPixelFormatASTC_10x10_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4649
     4650    setFormatCaps(MTLPixelFormatASTC_10x10_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4651
     4652    setFormatCaps(MTLPixelFormatASTC_10x5_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4653
     4654    setFormatCaps(MTLPixelFormatASTC_10x5_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4655
     4656    setFormatCaps(MTLPixelFormatASTC_10x6_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4657
     4658    setFormatCaps(MTLPixelFormatASTC_10x6_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4659
     4660    setFormatCaps(MTLPixelFormatASTC_10x8_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4661
     4662    setFormatCaps(MTLPixelFormatASTC_10x8_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4663
     4664    setFormatCaps(MTLPixelFormatASTC_12x10_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4665
     4666    setFormatCaps(MTLPixelFormatASTC_12x10_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4667
     4668    setFormatCaps(MTLPixelFormatASTC_12x12_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4669
     4670    setFormatCaps(MTLPixelFormatASTC_12x12_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4671
     4672    setFormatCaps(MTLPixelFormatASTC_4x4_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4673
     4674    setFormatCaps(MTLPixelFormatASTC_4x4_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4675
     4676    setFormatCaps(MTLPixelFormatASTC_5x4_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4677
     4678    setFormatCaps(MTLPixelFormatASTC_5x4_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4679
     4680    setFormatCaps(MTLPixelFormatASTC_5x5_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4681
     4682    setFormatCaps(MTLPixelFormatASTC_5x5_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4683
     4684    setFormatCaps(MTLPixelFormatASTC_6x5_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4685
     4686    setFormatCaps(MTLPixelFormatASTC_6x5_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4687
     4688    setFormatCaps(MTLPixelFormatASTC_6x6_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4689
     4690    setFormatCaps(MTLPixelFormatASTC_6x6_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4691
     4692    setFormatCaps(MTLPixelFormatASTC_8x5_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4693
     4694    setFormatCaps(MTLPixelFormatASTC_8x5_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4695
     4696    setFormatCaps(MTLPixelFormatASTC_8x6_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4697
     4698    setFormatCaps(MTLPixelFormatASTC_8x6_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4699
     4700    setFormatCaps(MTLPixelFormatASTC_8x8_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4701
     4702    setFormatCaps(MTLPixelFormatASTC_8x8_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4703
     4704    setFormatCaps(MTLPixelFormatB5G6R5Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
     4705
     4706    setFormatCaps(MTLPixelFormatBGR5A1Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
     4707
     4708    setFormatCaps(MTLPixelFormatEAC_R11Snorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4709
     4710    setFormatCaps(MTLPixelFormatEAC_R11Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4711
     4712    setFormatCaps(MTLPixelFormatEAC_RG11Snorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4713
     4714    setFormatCaps(MTLPixelFormatEAC_RG11Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4715
     4716    setFormatCaps(MTLPixelFormatEAC_RGBA8, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4717
     4718    setFormatCaps(MTLPixelFormatEAC_RGBA8_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4719
     4720    setFormatCaps(MTLPixelFormatETC2_RGB8, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4721
     4722    setFormatCaps(MTLPixelFormatETC2_RGB8A1, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4723
     4724    setFormatCaps(MTLPixelFormatETC2_RGB8A1_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4725
     4726    setFormatCaps(MTLPixelFormatETC2_RGB8_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4727
     4728    setFormatCaps(MTLPixelFormatPVRTC_RGBA_2BPP, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4729
     4730    setFormatCaps(MTLPixelFormatPVRTC_RGBA_2BPP_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4731
     4732    setFormatCaps(MTLPixelFormatPVRTC_RGBA_4BPP, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4733
     4734    setFormatCaps(MTLPixelFormatPVRTC_RGBA_4BPP_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4735
     4736    setFormatCaps(MTLPixelFormatPVRTC_RGB_2BPP, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4737
     4738    setFormatCaps(MTLPixelFormatPVRTC_RGB_2BPP_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4739
     4740    setFormatCaps(MTLPixelFormatPVRTC_RGB_4BPP, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4741
     4742    setFormatCaps(MTLPixelFormatPVRTC_RGB_4BPP_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
     4743
     4744    setFormatCaps(MTLPixelFormatR8Unorm_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ display->supportsAppleGPUFamily(2), /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
     4745
     4746    setFormatCaps(MTLPixelFormatRG8Unorm_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ display->supportsAppleGPUFamily(2), /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
     4747
     4748#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX
    43884749    setFormatCaps(MTLPixelFormatASTC_10x10_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    43894750
    4390     setFormatCaps(MTLPixelFormatASTC_10x10_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4391 
    4392     setFormatCaps(MTLPixelFormatASTC_10x10_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4393 
    43944751    setFormatCaps(MTLPixelFormatASTC_10x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    43954752
    4396     setFormatCaps(MTLPixelFormatASTC_10x5_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4397 
    4398     setFormatCaps(MTLPixelFormatASTC_10x5_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4399 
    44004753    setFormatCaps(MTLPixelFormatASTC_10x6_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44014754
    4402     setFormatCaps(MTLPixelFormatASTC_10x6_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4403 
    4404     setFormatCaps(MTLPixelFormatASTC_10x6_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4405 
    44064755    setFormatCaps(MTLPixelFormatASTC_10x8_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44074756
    4408     setFormatCaps(MTLPixelFormatASTC_10x8_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4409 
    4410     setFormatCaps(MTLPixelFormatASTC_10x8_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4411 
    44124757    setFormatCaps(MTLPixelFormatASTC_12x10_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44134758
    4414     setFormatCaps(MTLPixelFormatASTC_12x10_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4415 
    4416     setFormatCaps(MTLPixelFormatASTC_12x10_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4417 
    44184759    setFormatCaps(MTLPixelFormatASTC_12x12_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44194760
    4420     setFormatCaps(MTLPixelFormatASTC_12x12_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4421 
    4422     setFormatCaps(MTLPixelFormatASTC_12x12_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4423 
    44244761    setFormatCaps(MTLPixelFormatASTC_4x4_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44254762
    4426     setFormatCaps(MTLPixelFormatASTC_4x4_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4427 
    4428     setFormatCaps(MTLPixelFormatASTC_4x4_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4429 
    44304763    setFormatCaps(MTLPixelFormatASTC_5x4_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44314764
    4432     setFormatCaps(MTLPixelFormatASTC_5x4_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4433 
    4434     setFormatCaps(MTLPixelFormatASTC_5x4_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4435 
    44364765    setFormatCaps(MTLPixelFormatASTC_5x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44374766
    4438     setFormatCaps(MTLPixelFormatASTC_5x5_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4439 
    4440     setFormatCaps(MTLPixelFormatASTC_5x5_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4441 
    44424767    setFormatCaps(MTLPixelFormatASTC_6x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44434768
    4444     setFormatCaps(MTLPixelFormatASTC_6x5_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4445 
    4446     setFormatCaps(MTLPixelFormatASTC_6x5_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4447 
    44484769    setFormatCaps(MTLPixelFormatASTC_6x6_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44494770
    4450     setFormatCaps(MTLPixelFormatASTC_6x6_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4451 
    4452     setFormatCaps(MTLPixelFormatASTC_6x6_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4453 
    44544771    setFormatCaps(MTLPixelFormatASTC_8x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44554772
    4456     setFormatCaps(MTLPixelFormatASTC_8x5_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4457 
    4458     setFormatCaps(MTLPixelFormatASTC_8x5_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4459 
    44604773    setFormatCaps(MTLPixelFormatASTC_8x6_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44614774
    4462     setFormatCaps(MTLPixelFormatASTC_8x6_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4463 
    4464     setFormatCaps(MTLPixelFormatASTC_8x6_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4465 
    44664775    setFormatCaps(MTLPixelFormatASTC_8x8_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    44674776
    4468     setFormatCaps(MTLPixelFormatASTC_8x8_LDR, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4469 
    4470     setFormatCaps(MTLPixelFormatASTC_8x8_sRGB, /** filterable*/ display->supportsAppleGPUFamily(2), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4471 
    4472     setFormatCaps(MTLPixelFormatB5G6R5Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
    4473 
    4474     setFormatCaps(MTLPixelFormatBGR5A1Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
    4475 
    4476     setFormatCaps(MTLPixelFormatEAC_R11Snorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4477 
    4478     setFormatCaps(MTLPixelFormatEAC_R11Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4479 
    4480     setFormatCaps(MTLPixelFormatEAC_RG11Snorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4481 
    4482     setFormatCaps(MTLPixelFormatEAC_RG11Unorm, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4483 
    4484     setFormatCaps(MTLPixelFormatEAC_RGBA8, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4485 
    4486     setFormatCaps(MTLPixelFormatEAC_RGBA8_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4487 
    4488     setFormatCaps(MTLPixelFormatETC2_RGB8, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4489 
    4490     setFormatCaps(MTLPixelFormatETC2_RGB8A1, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4491 
    4492     setFormatCaps(MTLPixelFormatETC2_RGB8A1_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4493 
    4494     setFormatCaps(MTLPixelFormatETC2_RGB8_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4495 
    4496     setFormatCaps(MTLPixelFormatPVRTC_RGBA_2BPP, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4497 
    4498     setFormatCaps(MTLPixelFormatPVRTC_RGBA_2BPP_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4499 
    4500     setFormatCaps(MTLPixelFormatPVRTC_RGBA_4BPP, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4501 
    4502     setFormatCaps(MTLPixelFormatPVRTC_RGBA_4BPP_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4503 
    4504     setFormatCaps(MTLPixelFormatPVRTC_RGB_2BPP, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4505 
    4506     setFormatCaps(MTLPixelFormatPVRTC_RGB_2BPP_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4507 
    4508     setFormatCaps(MTLPixelFormatPVRTC_RGB_4BPP, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4509 
    4510     setFormatCaps(MTLPixelFormatPVRTC_RGB_4BPP_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
    4511 
    4512     setFormatCaps(MTLPixelFormatR8Unorm_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ display->supportsAppleGPUFamily(2), /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
    4513 
    4514     setFormatCaps(MTLPixelFormatRG8Unorm_sRGB, /** filterable*/ display->supportsAppleGPUFamily(1), /** writable*/ display->supportsAppleGPUFamily(2), /** blendable*/ display->supportsAppleGPUFamily(1), /** multisample*/ display->supportsAppleGPUFamily(1), /** resolve*/ display->supportsAppleGPUFamily(1), /** colorRenderable*/ display->supportsAppleGPUFamily(1), /** depthRenderable*/ false);
    4515 
    4516 #endif
     4777#endif // TARGET_OS_IOS || TARGET_OS_TV || mac 11.0+
     4778#endif // TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST || mac 11.0+
    45174779
    45184780}
Note: See TracChangeset for help on using the changeset viewer.