Title: [240827] trunk/Source/WebCore
Revision
240827
Author
ryanhad...@apple.com
Date
2019-01-31 16:17:51 -0800 (Thu, 31 Jan 2019)

Log Message

[WebGPU] Build fix: disable MTLCopyAllDevices call on non-Mac platforms
https://bugs.webkit.org/show_bug.cgi?id=194120

Unreviewed build fix.

No new tests; no change in behavior.

Patch by Justin Fan <justin_...@apple.com> on 2019-01-31

* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
(WebCore::GPUDevice::create): Wrap problem code in #if PLATFORM(MAC).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (240826 => 240827)


--- trunk/Source/WebCore/ChangeLog	2019-01-31 23:58:25 UTC (rev 240826)
+++ trunk/Source/WebCore/ChangeLog	2019-02-01 00:17:51 UTC (rev 240827)
@@ -1,3 +1,15 @@
+2019-01-31  Justin Fan  <justin_...@apple.com>
+
+        [WebGPU] Build fix: disable MTLCopyAllDevices call on non-Mac platforms
+        https://bugs.webkit.org/show_bug.cgi?id=194120
+
+        Unreviewed build fix. 
+
+        No new tests; no change in behavior.
+
+        * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
+        (WebCore::GPUDevice::create): Wrap problem code in #if PLATFORM(MAC).
+
 2019-01-31  Simon Fraser  <simon.fra...@apple.com>
 
         Basic scrollability for async overflow scrolling on macOS

Modified: trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm (240826 => 240827)


--- trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm	2019-01-31 23:58:25 UTC (rev 240826)
+++ trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm	2019-02-01 00:17:51 UTC (rev 240827)
@@ -42,6 +42,7 @@
 
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
+#if PLATFORM(MAC)
     if (options && options->powerPreference == GPURequestAdapterOptions::PowerPreference::LowPower) {
         auto devices = adoptNS(MTLCopyAllDevices());
         
@@ -54,6 +55,7 @@
     }
     
     if (!devicePtr)
+#endif // PLATFORM(MAC)
         devicePtr = adoptNS(MTLCreateSystemDefaultDevice());
 
     END_BLOCK_OBJC_EXCEPTIONS;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to