Title: [241207] trunk/Source/WebCore
Revision
241207
Author
[email protected]
Date
2019-02-08 13:39:20 -0800 (Fri, 08 Feb 2019)

Log Message

[Web GPU] Build fix for MTLStorageMode availability on different Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=194443

Unreviewed build fix.

For MTLTextures, MTLStorageModeManaged is only available on macOS. Other platforms,
if not using MTLStorageModePrivate, must use MTLStorageModeShared.

Behavior unchanged.

Patch by Justin Fan <[email protected]> on 2019-02-08

* platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
(WebCore::storageModeForPixelFormatAndSampleCount):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (241206 => 241207)


--- trunk/Source/WebCore/ChangeLog	2019-02-08 21:21:43 UTC (rev 241206)
+++ trunk/Source/WebCore/ChangeLog	2019-02-08 21:39:20 UTC (rev 241207)
@@ -1,3 +1,18 @@
+2019-02-08  Justin Fan  <[email protected]>
+
+        [Web GPU] Build fix for MTLStorageMode availability on different Cocoa platforms
+        https://bugs.webkit.org/show_bug.cgi?id=194443
+
+        Unreviewed build fix.
+
+        For MTLTextures, MTLStorageModeManaged is only available on macOS. Other platforms,
+        if not using MTLStorageModePrivate, must use MTLStorageModeShared.
+
+        Behavior unchanged.
+
+        * platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
+        (WebCore::storageModeForPixelFormatAndSampleCount):
+
 2019-02-08  Per Arne Vollan  <[email protected]>
 
         [WebVTT] Inline WebVTT styles should start with '::cue'

Modified: trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm (241206 => 241207)


--- trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm	2019-02-08 21:21:43 UTC (rev 241206)
+++ trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm	2019-02-08 21:39:20 UTC (rev 241207)
@@ -81,7 +81,11 @@
     if (format == MTLPixelFormatDepth32Float_Stencil8 || samples > 1)
         return MTLStorageModePrivate;
 
+#if PLATFORM(MAC)
     return MTLStorageModeManaged;
+#else
+    return MTLStorageModeShared;
+#endif
 }
 
 static RetainPtr<MTLTextureDescriptor> tryCreateMtlTextureDescriptor(const char* const functionName, const GPUTextureDescriptor&& descriptor)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to