Title: [287900] branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE
Revision
287900
Author
repst...@apple.com
Date
2022-01-11 15:38:17 -0800 (Tue, 11 Jan 2022)

Log Message

Cherry-pick r287894. rdar://problem/87417913

    ANGLE: ASTC-HDR is not available on TVOS
    https://bugs.webkit.org/show_bug.cgi?id=235076

    Reviewed by Dean Jackson.

    <rdar://87384038>
    This is a follow on patch to https://bugs.webkit.org/show_bug.cgi?id=234164,
    ASTC-HDR is only available on macOS and iOS, not tvOS or watchOS
    	This patch fixes an internal build.

    * scripts/code_generation_hashes/Metal_format_table.json:
    * src/libANGLE/renderer/metal/gen_mtl_format_table.py:
    (gen_image_map_switch_astc_case_tv_watchos):
    (gen_image_map_switch_string):
    (gen_image_mtl_to_angle_switch_string):
    (gen_image_map_switch_astc_case_watchos): Deleted.
    (gen_image_map_switch_astc_case_watchos.gen_format_assign_code): Deleted.
    * src/libANGLE/renderer/metal/mtl_format_table_autogen.mm:
    (rx::mtl::Format::MetalToAngleFormatID):
    (rx::mtl::Format::init):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287894 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/ChangeLog (287899 => 287900)


--- branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/ChangeLog	2022-01-11 23:25:09 UTC (rev 287899)
+++ branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/ChangeLog	2022-01-11 23:38:17 UTC (rev 287900)
@@ -1,3 +1,53 @@
+2022-01-11  Russell Epstein  <repst...@apple.com>
+
+        Cherry-pick r287894. rdar://problem/87417913
+
+    ANGLE: ASTC-HDR is not available on TVOS
+    https://bugs.webkit.org/show_bug.cgi?id=235076
+    
+    Reviewed by Dean Jackson.
+    
+    <rdar://87384038>
+    This is a follow on patch to https://bugs.webkit.org/show_bug.cgi?id=234164,
+    ASTC-HDR is only available on macOS and iOS, not tvOS or watchOS
+    	This patch fixes an internal build.
+    
+    * scripts/code_generation_hashes/Metal_format_table.json:
+    * src/libANGLE/renderer/metal/gen_mtl_format_table.py:
+    (gen_image_map_switch_astc_case_tv_watchos):
+    (gen_image_map_switch_string):
+    (gen_image_mtl_to_angle_switch_string):
+    (gen_image_map_switch_astc_case_watchos): Deleted.
+    (gen_image_map_switch_astc_case_watchos.gen_format_assign_code): Deleted.
+    * src/libANGLE/renderer/metal/mtl_format_table_autogen.mm:
+    (rx::mtl::Format::MetalToAngleFormatID):
+    (rx::mtl::Format::init):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-11  Kyle Piddington  <kpidding...@apple.com>
+
+            ANGLE: ASTC-HDR is not available on TVOS
+            https://bugs.webkit.org/show_bug.cgi?id=235076
+
+            Reviewed by Dean Jackson.
+
+            <rdar://87384038>
+            This is a follow on patch to https://bugs.webkit.org/show_bug.cgi?id=234164,
+            ASTC-HDR is only available on macOS and iOS, not tvOS or watchOS
+    	This patch fixes an internal build.
+
+            * scripts/code_generation_hashes/Metal_format_table.json:
+            * src/libANGLE/renderer/metal/gen_mtl_format_table.py:
+            (gen_image_map_switch_astc_case_tv_watchos):
+            (gen_image_map_switch_string):
+            (gen_image_mtl_to_angle_switch_string):
+            (gen_image_map_switch_astc_case_watchos): Deleted.
+            (gen_image_map_switch_astc_case_watchos.gen_format_assign_code): Deleted.
+            * src/libANGLE/renderer/metal/mtl_format_table_autogen.mm:
+            (rx::mtl::Format::MetalToAngleFormatID):
+            (rx::mtl::Format::init):
+
 2021-12-16  Alan Coon  <alanc...@apple.com>
 
         Cherry-pick r287137. rdar://problem/86476583

Modified: branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py (287899 => 287900)


--- branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py	2022-01-11 23:25:09 UTC (rev 287899)
+++ branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py	2022-01-11 23:38:17 UTC (rev 287900)
@@ -382,7 +382,8 @@
     return gen_image_map_switch_case(angle_format, angle_format, angle_to_mtl_map,
                                      gen_format_assign_code)
 
-def gen_image_map_switch_astc_case_watchos(angle_format, angle_to_gl, angle_to_mtl_map):
+
+def gen_image_map_switch_astc_case_tv_watchos(angle_format, angle_to_gl, angle_to_mtl_map):
     gl_format = angle_to_gl[angle_format]
 
     def gen_format_assign_code(actual_angle_format, angle_to_mtl_map):
@@ -462,14 +463,16 @@
     for angle_format in sorted(sim_override.keys()):
         switch_data += gen_image_map_switch_simple_case(angle_format, sim_override[angle_format],
                                                         angle_to_gl, sim_angle_to_mtl)
-    switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV\n"
+    switch_data += "#if TARGET_OS_IOS\n"
     for angle_format in sorted(astc_tpl_map.keys()):
-        switch_data += gen_image_map_switch_astc_case_iosmac(angle_format, angle_to_gl, astc_tpl_map)
-    switch_data += "#elif TARGET_OS_WATCH\n"
+        switch_data += gen_image_map_switch_astc_case_iosmac(angle_format, angle_to_gl,
+                                                             astc_tpl_map)
+    switch_data += "#elif TARGET_OS_WATCH || TARGET_OS_TV\n"
 
     for angle_format in sorted(astc_tpl_map.keys()):
-        switch_data += gen_image_map_switch_astc_case_watchos(angle_format, angle_to_gl, astc_tpl_map)
-    switch_data += "#endif // TARGET_OS_IOS || TARGET_OS_TV \n "
+        switch_data += gen_image_map_switch_astc_case_tv_watchos(angle_format, angle_to_gl,
+                                                                 astc_tpl_map)
+    switch_data += "#endif // TARGET_OS_IOS \n "
     # iOS specific
     switch_data += "#elif TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST\n"
     for angle_format in sorted(ios_specific_map.keys()):
@@ -478,15 +481,16 @@
     for angle_format in sorted(ios_override.keys()):
         switch_data += gen_image_map_switch_simple_case(angle_format, ios_override[angle_format],
                                                         angle_to_gl, ios_angle_to_mtl)
-    switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV\n"
+    switch_data += "#if TARGET_OS_IOS \n"
     for angle_format in sorted(astc_tpl_map.keys()):
         switch_data += gen_image_map_switch_astc_case_iosmac(angle_format, angle_to_gl, astc_tpl_map)
 
-    switch_data += "#elif TARGET_OS_WATCH\n"
+    switch_data += "#elif TARGET_OS_WATCH || TARGET_OS_TV\n"
 
     for angle_format in sorted(astc_tpl_map.keys()):
-        switch_data += gen_image_map_switch_astc_case_watchos(angle_format, angle_to_gl, astc_tpl_map)
-    switch_data += "#endif // TARGET_OS_IOS || TARGET_OS_TV\n"
+        switch_data += gen_image_map_switch_astc_case_tv_watchos(angle_format, angle_to_gl,
+                                                                 astc_tpl_map)
+    switch_data += "#endif // TARGET_OS_IOS \n"
     switch_data += "#endif // TARGET_OS_IPHONE\n"
 
     # Try to support all iOS formats on newer macOS with Apple GPU.
@@ -542,11 +546,11 @@
     for angle_format in sorted(astc_tpl_map.keys()):
         switch_data += case_image_mtl_to_angle_template.format(
             mtl_format=astc_tpl_map[angle_format] + "LDR", angle_format=angle_format)
-    switch_data += "#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX \n"
+    switch_data += "#if TARGET_OS_IOS || TARGET_OS_OSX \n"
     for angle_format in sorted(astc_tpl_map.keys()):
         switch_data += case_image_mtl_to_angle_template.format(
             mtl_format=astc_tpl_map[angle_format] + "HDR", angle_format=angle_format)
-    switch_data += "#endif // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX\n"
+    switch_data += "#endif // TARGET_OS_IOS || TARGET_OS_OSX\n"
     switch_data += "#endif  // TARGET_OS_IPHONE || mac 11.0+\n"
 
     switch_data += "        default:\n"
@@ -651,10 +655,10 @@
     caps_init_str += "    (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))\n"
 
     caps_init_str += caps_to_cpp(ios_platform_caps)
-    
-    caps_init_str += "#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX\n"
+
+    caps_init_str += "#if TARGET_OS_IOS || TARGET_OS_OSX\n"
     caps_init_str += caps_to_cpp(ios_specific_caps)
-    caps_init_str += "#endif // TARGET_OS_IOS || TARGET_OS_TV || mac 11.0+ \n"
+    caps_init_str += "#endif // TARGET_OS_IOS || mac 11.0+ \n"
     caps_init_str += "#endif // TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST || mac 11.0+ \n"
 
     return caps_init_str

Modified: branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm (287899 => 287900)


--- branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm	2022-01-11 23:25:09 UTC (rev 287899)
+++ branches/safari-613.1.12.1-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm	2022-01-11 23:38:17 UTC (rev 287900)
@@ -262,7 +262,7 @@
             return angle::FormatID::ASTC_8x6_UNORM_BLOCK;
         case MTLPixelFormatASTC_8x8_LDR:
             return angle::FormatID::ASTC_8x8_UNORM_BLOCK;
-#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX 
+#    if TARGET_OS_IOS || TARGET_OS_OSX
         case MTLPixelFormatASTC_10x10_HDR:
             return angle::FormatID::ASTC_10x10_UNORM_BLOCK;
         case MTLPixelFormatASTC_10x5_HDR:
@@ -291,8 +291,8 @@
             return angle::FormatID::ASTC_8x6_UNORM_BLOCK;
         case MTLPixelFormatASTC_8x8_HDR:
             return angle::FormatID::ASTC_8x8_UNORM_BLOCK;
-#endif // TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX
-#endif  // TARGET_OS_IPHONE || mac 11.0+
+#    endif  // TARGET_OS_IOS || TARGET_OS_OSX
+#endif      // TARGET_OS_IPHONE || mac 11.0+
         default:
             return angle::FormatID::NONE;
 
@@ -1551,7 +1551,7 @@
             this->swizzled = false;
             break;
 
-#if TARGET_OS_IOS || TARGET_OS_TV
+#    if TARGET_OS_IOS
         case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
             
             if (display->supportsAppleGPUFamily(6))
@@ -1804,7 +1804,7 @@
             this->swizzled = false;
             break;
 
-#elif TARGET_OS_WATCH
+#    elif TARGET_OS_WATCH || TARGET_OS_TV
         case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
             
             this->metalFormat = MTLPixelFormatASTC_10x10_LDR;
@@ -1931,8 +1931,8 @@
             this->swizzled = false;
             break;
 
-#endif // TARGET_OS_IOS || TARGET_OS_TV 
- #elif TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST
+#    endif  // TARGET_OS_IOS
+#elif TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST
         case angle::FormatID::ASTC_10x10_SRGB_BLOCK:
             
             this->metalFormat = MTLPixelFormatASTC_10x10_sRGB;
@@ -2293,7 +2293,7 @@
             this->swizzled = false;
             break;
 
-#if TARGET_OS_IOS || TARGET_OS_TV
+#    if TARGET_OS_IOS
         case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
             
             if (display->supportsAppleGPUFamily(6))
@@ -2546,7 +2546,7 @@
             this->swizzled = false;
             break;
 
-#elif TARGET_OS_WATCH
+#    elif TARGET_OS_WATCH || TARGET_OS_TV
         case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
             
             this->metalFormat = MTLPixelFormatASTC_10x10_LDR;
@@ -2673,9 +2673,9 @@
             this->swizzled = false;
             break;
 
-#endif // TARGET_OS_IOS || TARGET_OS_TV
-#endif // TARGET_OS_IPHONE
-#if (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600))
+#    endif  // TARGET_OS_IOS
+#endif      // TARGET_OS_IPHONE
+#if (TARGET_OS_OSX && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 110000))
         case angle::FormatID::ASTC_10x10_SRGB_BLOCK:
             
             this->metalFormat = MTLPixelFormatASTC_10x10_sRGB;
@@ -4745,7 +4745,7 @@
 
     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);
 
-#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX
+#if TARGET_OS_IOS || TARGET_OS_OSX
     setFormatCaps(MTLPixelFormatASTC_10x10_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
 
     setFormatCaps(MTLPixelFormatASTC_10x5_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
@@ -4774,7 +4774,7 @@
 
     setFormatCaps(MTLPixelFormatASTC_8x8_HDR, /** filterable*/ display->supportsAppleGPUFamily(6), /** writable*/ false, /** blendable*/ false, /** multisample*/ false, /** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);
 
-#endif // TARGET_OS_IOS || TARGET_OS_TV || mac 11.0+ 
+#endif // TARGET_OS_IOS || mac 11.0+ 
 #endif // TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST || mac 11.0+ 
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to