Title: [274660] trunk/Source/ThirdParty/ANGLE
Revision
274660
Author
[email protected]
Date
2021-03-18 12:06:50 -0700 (Thu, 18 Mar 2021)

Log Message

Metal-ANGLE can ASSERT because MTL signal event code is compiled out
https://bugs.webkit.org/show_bug.cgi?id=222859
<rdar://problem/75132180>

Reviewed by Ken Russell.

With the Metal backend enabled, the test
webgl/2.0.0/conformance2/state/gl-object-get-calls.html will
occasionally crash in mtl_command_buffer when it hits unreachable
code because ANGLE_MTL_EVENT_AVAILABLE hasn't been defined. This is
available on macOS 10.14 and above, so should be enabled.

At the same time, it doesn't make sense to call the method that has
unreachable code, so guard against that in mtl_command_buffer.

* src/libANGLE/renderer/metal/mtl_command_buffer.mm:
(rx::mtl::CommandBuffer::setPendingEvents):
* src/libANGLE/renderer/metal/mtl_common.h: Define ANGLE_MTL_EVENT_AVAILABLE.

Modified Paths

Diff

Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (274659 => 274660)


--- trunk/Source/ThirdParty/ANGLE/ChangeLog	2021-03-18 19:05:41 UTC (rev 274659)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog	2021-03-18 19:06:50 UTC (rev 274660)
@@ -1,3 +1,24 @@
+2021-03-06  Dean Jackson  <[email protected]>
+
+        Metal-ANGLE can ASSERT because MTL signal event code is compiled out
+        https://bugs.webkit.org/show_bug.cgi?id=222859
+        <rdar://problem/75132180>
+
+        Reviewed by Ken Russell.
+
+        With the Metal backend enabled, the test
+        webgl/2.0.0/conformance2/state/gl-object-get-calls.html will
+        occasionally crash in mtl_command_buffer when it hits unreachable
+        code because ANGLE_MTL_EVENT_AVAILABLE hasn't been defined. This is
+        available on macOS 10.14 and above, so should be enabled.
+
+        At the same time, it doesn't make sense to call the method that has
+        unreachable code, so guard against that in mtl_command_buffer.
+
+        * src/libANGLE/renderer/metal/mtl_command_buffer.mm:
+        (rx::mtl::CommandBuffer::setPendingEvents):
+        * src/libANGLE/renderer/metal/mtl_common.h: Define ANGLE_MTL_EVENT_AVAILABLE.
+
 2021-03-18  Kyle Piddington  <[email protected]>
 
         'MTLLanguageVersion1_0' is unavailable on Catalyst

Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.mm (274659 => 274660)


--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.mm	2021-03-18 19:05:41 UTC (rev 274659)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.mm	2021-03-18 19:06:50 UTC (rev 274660)
@@ -791,11 +791,13 @@
 
 void CommandBuffer::setPendingEvents()
 {
+#if ANGLE_MTL_EVENT_AVAILABLE
     for (const std::pair<mtl::SharedEventRef, uint64_t> &eventEntry : mPendingSignalEvents)
     {
         setEventImpl(eventEntry.first, eventEntry.second);
     }
     mPendingSignalEvents.clear();
+#endif
 }
 
 void CommandBuffer::setEventImpl(const mtl::SharedEventRef &event, uint64_t value)

Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_common.h (274659 => 274660)


--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_common.h	2021-03-18 19:05:41 UTC (rev 274659)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_common.h	2021-03-18 19:06:50 UTC (rev 274660)
@@ -296,11 +296,11 @@
 
 // NOTE: SharedEvent is only declared on iOS 12.0+ or mac 10.14+
 #if defined(__IPHONE_12_0) || defined(__MAC_10_14)
+#define ANGLE_MTL_EVENT_AVAILABLE 1
 using SharedEventRef = AutoObjCPtr<id<MTLSharedEvent>>;
-#define ANGLE_MTL_EVENT_AVAILABLE 1
 #else
-using SharedEventRef                                       = AutoObjCObj<NSObject>;
 #define ANGLE_MTL_EVENT_AVAILABLE 0
+using SharedEventRef = AutoObjCObj<NSObject>;
 #endif
 
 // The native image index used by Metal back-end,  the image index uses native mipmap level instead
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to