- Revision
- 287894
- Author
- [email protected]
- Date
- 2022-01-11 13:49:02 -0800 (Tue, 11 Jan 2022)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (287893 => 287894)
--- trunk/Source/ThirdParty/ANGLE/ChangeLog 2022-01-11 21:36:39 UTC (rev 287893)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog 2022-01-11 21:49:02 UTC (rev 287894)
@@ -1,3 +1,26 @@
+2022-01-11 Kyle Piddington <[email protected]>
+
+ 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):
+
2022-01-10 Alex Christensen <[email protected]>
Start using C++20
Modified: trunk/Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Metal_format_table.json (287893 => 287894)
--- trunk/Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Metal_format_table.json 2022-01-11 21:36:39 UTC (rev 287893)
+++ trunk/Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Metal_format_table.json 2022-01-11 21:49:02 UTC (rev 287894)
@@ -4,9 +4,9 @@
"src/libANGLE/renderer/angle_format_map.json":
"951e1bceaba86eecb5c23173e897d092",
"src/libANGLE/renderer/metal/gen_mtl_format_table.py":
- "cf0f32a98630ef4dabcf203c66d8e4ff",
+ "7915e5a079e7307ba046136857878a6f",
"src/libANGLE/renderer/metal/mtl_format_map.json":
"04a80596b75c287f525dac9769219cb2",
"src/libANGLE/renderer/metal/mtl_format_table_autogen.mm":
- "b413ae3c84956871988e5e01cc1c92ce"
+ "76319586335e93f945f99f9fecb03b0f"
}
\ No newline at end of file
Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py (287893 => 287894)
--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py 2022-01-11 21:36:39 UTC (rev 287893)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py 2022-01-11 21:49:02 UTC (rev 287894)
@@ -383,7 +383,7 @@
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,16 +462,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 += "#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()):
@@ -480,17 +480,17 @@
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.
@@ -547,11 +547,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"
@@ -657,9 +657,9 @@
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: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm (287893 => 287894)
--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm 2022-01-11 21:36:39 UTC (rev 287893)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm 2022-01-11 21:49:02 UTC (rev 287894)
@@ -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,7 +291,7 @@
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_IOS || TARGET_OS_OSX
#endif // TARGET_OS_IPHONE || mac 11.0+
default:
return angle::FormatID::NONE;
@@ -1556,7 +1556,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))
@@ -1809,7 +1809,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;
@@ -1936,7 +1936,7 @@
this->swizzled = false;
break;
-# endif // TARGET_OS_IOS || TARGET_OS_TV
+# endif // TARGET_OS_IOS
#elif TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST
case angle::FormatID::ASTC_10x10_SRGB_BLOCK:
@@ -2298,7 +2298,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))
@@ -2551,7 +2551,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;
@@ -2678,7 +2678,7 @@
this->swizzled = false;
break;
-# endif // TARGET_OS_IOS || TARGET_OS_TV
+# 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:
@@ -5056,7 +5056,7 @@
/** 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);
@@ -5113,7 +5113,7 @@
/** 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+
}