Changeset 286899 in webkit
- Timestamp:
- Dec 10, 2021, 7:24:50 PM (5 years ago)
- Location:
- trunk/Source/ThirdParty/ANGLE
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
src/libANGLE/renderer/metal/gen_mtl_format_table.py (modified) (9 diffs)
-
src/libANGLE/renderer/metal/mtl_format_map.json (modified) (2 diffs)
-
src/libANGLE/renderer/metal/mtl_format_table_autogen.mm (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/ANGLE/ChangeLog
r286896 r286899 1 2021-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 1 26 2021-12-10 Michael Saboff <msaboff@apple.com> 2 27 -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py
r286603 r286899 365 365 366 366 # 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):367 def gen_image_map_switch_astc_case_iosmac(angle_format, angle_to_gl, angle_to_mtl_map): 368 368 gl_format = angle_to_gl[angle_format] 369 369 … … 382 382 return gen_image_map_switch_case(angle_format, angle_format, angle_to_mtl_map, 383 383 gen_format_assign_code) 384 385 def 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 384 398 385 399 … … 449 463 switch_data += gen_image_map_switch_simple_case(angle_format, sim_override[angle_format], 450 464 angle_to_gl, sim_angle_to_mtl) 465 switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV\n" 451 466 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 " 453 473 # iOS specific 454 switch_data += "#elif TARGET_OS_I OS || TARGET_OS_TV\n"474 switch_data += "#elif TARGET_OS_IPHONE\n" 455 475 for angle_format in sorted(ios_specific_map.keys()): 456 476 switch_data += gen_image_map_switch_simple_case(angle_format, angle_format, angle_to_gl, … … 459 479 switch_data += gen_image_map_switch_simple_case(angle_format, ios_override[angle_format], 460 480 angle_to_gl, ios_angle_to_mtl) 481 switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV\n" 461 482 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" 464 491 465 492 # Try to support all iOS formats on newer macOS with Apple GPU. … … 476 503 # ASTC LDR or HDR 477 504 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" 480 507 481 508 switch_data += " default:\n" … … 506 533 507 534 # iOS + macOS 11.0+ specific 508 switch_data += "#if TARGET_OS_I OS || 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" 509 536 for angle_format in sorted(ios_specific_map.keys()): 510 537 # ETC1_R8G8B8_UNORM_BLOCK is a duplicated of ETC2_R8G8B8_UNORM_BLOCK … … 516 543 switch_data += case_image_mtl_to_angle_template.format( 517 544 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()): 518 547 switch_data += case_image_mtl_to_angle_template.format( 519 548 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" 521 551 522 552 switch_data += " default:\n" … … 587 617 caps = map_image['caps'] 588 618 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'] 590 621 caps_init_str = '' 591 622 … … 617 648 caps_init_str += "#endif // TARGET_OS_OSX || TARGET_OS_MACCATALYST\n" 618 649 619 caps_init_str += "#if (TARGET_OS_I OS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV|| \\\n"650 caps_init_str += "#if (TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST) || \\\n" 620 651 caps_init_str += " (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))\n" 621 652 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" 625 659 626 660 return caps_init_str -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_map.json
r286603 r286899 701 701 } 702 702 }, 703 "caps_ios ": {703 "caps_ios_platform": { 704 704 "MTLPixelFormatR8Unorm_sRGB":{ 705 705 "filterable": "display->supportsAppleGPUFamily(1)", … … 887 887 "MTLPixelFormatASTC_12x12_sRGB":{ 888 888 "filterable": "display->supportsAppleGPUFamily(2)" 889 }, 889 } 890 }, 891 "caps_ios_spcific" : 892 { 890 893 "MTLPixelFormatASTC_4x4_HDR":{ 891 894 "filterable": "display->supportsAppleGPUFamily(6)" -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm
r286603 r286899 160 160 return angle::FormatID::D24_UNORM_S8_UINT; 161 161 #endif // TARGET_OS_OSX || TARGET_OS_MACCATALYST 162 #if TARGET_OS_I OS || 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)) 163 163 case MTLPixelFormatASTC_10x10_sRGB: 164 164 return angle::FormatID::ASTC_10x10_SRGB_BLOCK; … … 237 237 case MTLPixelFormatASTC_10x10_LDR: 238 238 return angle::FormatID::ASTC_10x10_UNORM_BLOCK; 239 case MTLPixelFormatASTC_10x10_HDR:240 return angle::FormatID::ASTC_10x10_UNORM_BLOCK;241 239 case MTLPixelFormatASTC_10x5_LDR: 242 return angle::FormatID::ASTC_10x5_UNORM_BLOCK;243 case MTLPixelFormatASTC_10x5_HDR:244 240 return angle::FormatID::ASTC_10x5_UNORM_BLOCK; 245 241 case MTLPixelFormatASTC_10x6_LDR: 246 242 return angle::FormatID::ASTC_10x6_UNORM_BLOCK; 247 case MTLPixelFormatASTC_10x6_HDR:248 return angle::FormatID::ASTC_10x6_UNORM_BLOCK;249 243 case MTLPixelFormatASTC_10x8_LDR: 250 return angle::FormatID::ASTC_10x8_UNORM_BLOCK;251 case MTLPixelFormatASTC_10x8_HDR:252 244 return angle::FormatID::ASTC_10x8_UNORM_BLOCK; 253 245 case MTLPixelFormatASTC_12x10_LDR: 254 246 return angle::FormatID::ASTC_12x10_UNORM_BLOCK; 255 case MTLPixelFormatASTC_12x10_HDR:256 return angle::FormatID::ASTC_12x10_UNORM_BLOCK;257 247 case MTLPixelFormatASTC_12x12_LDR: 258 return angle::FormatID::ASTC_12x12_UNORM_BLOCK;259 case MTLPixelFormatASTC_12x12_HDR:260 248 return angle::FormatID::ASTC_12x12_UNORM_BLOCK; 261 249 case MTLPixelFormatASTC_4x4_LDR: 262 250 return angle::FormatID::ASTC_4x4_UNORM_BLOCK; 263 case MTLPixelFormatASTC_4x4_HDR:264 return angle::FormatID::ASTC_4x4_UNORM_BLOCK;265 251 case MTLPixelFormatASTC_5x4_LDR: 266 return angle::FormatID::ASTC_5x4_UNORM_BLOCK;267 case MTLPixelFormatASTC_5x4_HDR:268 252 return angle::FormatID::ASTC_5x4_UNORM_BLOCK; 269 253 case MTLPixelFormatASTC_5x5_LDR: 270 254 return angle::FormatID::ASTC_5x5_UNORM_BLOCK; 271 case MTLPixelFormatASTC_5x5_HDR:272 return angle::FormatID::ASTC_5x5_UNORM_BLOCK;273 255 case MTLPixelFormatASTC_6x5_LDR: 274 return angle::FormatID::ASTC_6x5_UNORM_BLOCK;275 case MTLPixelFormatASTC_6x5_HDR:276 256 return angle::FormatID::ASTC_6x5_UNORM_BLOCK; 277 257 case MTLPixelFormatASTC_6x6_LDR: 278 258 return angle::FormatID::ASTC_6x6_UNORM_BLOCK; 279 case MTLPixelFormatASTC_6x6_HDR:280 return angle::FormatID::ASTC_6x6_UNORM_BLOCK;281 259 case MTLPixelFormatASTC_8x5_LDR: 282 return angle::FormatID::ASTC_8x5_UNORM_BLOCK;283 case MTLPixelFormatASTC_8x5_HDR:284 260 return angle::FormatID::ASTC_8x5_UNORM_BLOCK; 285 261 case MTLPixelFormatASTC_8x6_LDR: 286 262 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; 287 290 case MTLPixelFormatASTC_8x6_HDR: 288 291 return angle::FormatID::ASTC_8x6_UNORM_BLOCK; 289 case MTLPixelFormatASTC_8x8_LDR:290 return angle::FormatID::ASTC_8x8_UNORM_BLOCK;291 292 case MTLPixelFormatASTC_8x8_HDR: 292 293 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+ 294 296 default: 295 297 return angle::FormatID::NONE; … … 1550 1552 break; 1551 1553 1554 #if TARGET_OS_IOS || TARGET_OS_TV 1552 1555 case angle::FormatID::ASTC_10x10_UNORM_BLOCK: 1553 1556 … … 1802 1805 break; 1803 1806 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 1805 1936 case angle::FormatID::ASTC_10x10_SRGB_BLOCK: 1806 1937 … … 2163 2294 break; 2164 2295 2296 #if TARGET_OS_IOS || TARGET_OS_TV 2165 2297 case angle::FormatID::ASTC_10x10_UNORM_BLOCK: 2166 2298 … … 2415 2547 break; 2416 2548 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 2418 2678 #if (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600)) 2419 2679 case angle::FormatID::ASTC_10x10_SRGB_BLOCK: … … 3137 3397 break; 3138 3398 3139 #endif 3399 #endif // TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600)) 3140 3400 default: 3141 3401 this->metalFormat = MTLPixelFormatInvalid; … … 4380 4640 4381 4641 #endif // TARGET_OS_OSX || TARGET_OS_MACCATALYST 4382 #if (TARGET_OS_I OS && !TARGET_OS_MACCATALYST) || TARGET_OS_TV|| \4642 #if (TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST) || \ 4383 4643 (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600)) 4384 4644 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); … … 4386 4646 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); 4387 4647 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 4388 4749 setFormatCaps(MTLPixelFormatASTC_10x10_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4389 4750 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 4394 4751 setFormatCaps(MTLPixelFormatASTC_10x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4395 4752 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 4400 4753 setFormatCaps(MTLPixelFormatASTC_10x6_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4401 4754 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 4406 4755 setFormatCaps(MTLPixelFormatASTC_10x8_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4407 4756 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 4412 4757 setFormatCaps(MTLPixelFormatASTC_12x10_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4413 4758 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 4418 4759 setFormatCaps(MTLPixelFormatASTC_12x12_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4419 4760 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 4424 4761 setFormatCaps(MTLPixelFormatASTC_4x4_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4425 4762 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 4430 4763 setFormatCaps(MTLPixelFormatASTC_5x4_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4431 4764 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 4436 4765 setFormatCaps(MTLPixelFormatASTC_5x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4437 4766 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 4442 4767 setFormatCaps(MTLPixelFormatASTC_6x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4443 4768 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 4448 4769 setFormatCaps(MTLPixelFormatASTC_6x6_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4449 4770 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 4454 4771 setFormatCaps(MTLPixelFormatASTC_8x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4455 4772 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 4460 4773 setFormatCaps(MTLPixelFormatASTC_8x6_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4461 4774 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 4466 4775 setFormatCaps(MTLPixelFormatASTC_8x8_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false); 4467 4776 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+ 4517 4779 4518 4780 }
Note:
See TracChangeset
for help on using the changeset viewer.