Title: [242619] trunk/Source/WebCore
Revision
242619
Author
justin_...@apple.com
Date
2019-03-07 16:18:59 -0800 (Thu, 07 Mar 2019)

Log Message

Unreviewed build fixes since MTLClampToBorderColor is only supported on macOS.

* Modules/webgpu/GPUSamplerDescriptor.idl:
* platform/graphics/gpu/GPUSamplerDescriptor.h:
* platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Forgot include.
* platform/graphics/gpu/cocoa/GPUSamplerMetal.mm:
(WebCore::mtlAddressModeForAddressMode):
(WebCore::tryCreateMtlSamplerState):
(WebCore::mtlBorderColorForBorderColor): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (242618 => 242619)


--- trunk/Source/WebCore/ChangeLog	2019-03-08 00:10:54 UTC (rev 242618)
+++ trunk/Source/WebCore/ChangeLog	2019-03-08 00:18:59 UTC (rev 242619)
@@ -1,5 +1,17 @@
 2019-03-07  Justin Fan  <justin_...@apple.com>
 
+        Unreviewed build fixes since MTLClampToBorderColor is only supported on macOS.
+
+        * Modules/webgpu/GPUSamplerDescriptor.idl:
+        * platform/graphics/gpu/GPUSamplerDescriptor.h:
+        * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Forgot include.
+        * platform/graphics/gpu/cocoa/GPUSamplerMetal.mm:
+        (WebCore::mtlAddressModeForAddressMode):
+        (WebCore::tryCreateMtlSamplerState):
+        (WebCore::mtlBorderColorForBorderColor): Deleted.
+
+2019-03-07  Justin Fan  <justin_...@apple.com>
+
         [Web GPU] GPUSampler implementation
         https://bugs.webkit.org/show_bug.cgi?id=195427
         <rdar://problem/48686011>

Modified: trunk/Source/WebCore/Modules/webgpu/GPUSamplerDescriptor.idl (242618 => 242619)


--- trunk/Source/WebCore/Modules/webgpu/GPUSamplerDescriptor.idl	2019-03-08 00:10:54 UTC (rev 242618)
+++ trunk/Source/WebCore/Modules/webgpu/GPUSamplerDescriptor.idl	2019-03-08 00:18:59 UTC (rev 242619)
@@ -29,8 +29,7 @@
 enum GPUAddressMode {
     "clamp-to-edge",
     "repeat",
-    "mirror-repeat",
-    "clamp-to-border-color"
+    "mirror-repeat"
 };
 
 enum GPUFilterMode {
@@ -38,12 +37,6 @@
     "linear"
 };
 
-enum GPUBorderColor {
-    "transparent-black",
-    "opaque-black",
-    "opaque-white"
-};
-
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU
@@ -58,5 +51,4 @@
     float lodMaxClamp = 0xffffffff; // TODO: What should this be? Was Number.MAX_VALUE.
     u32 maxAnisotropy = 1;
     GPUCompareFunction compareFunction = "never";
-    GPUBorderColor borderColor = "transparentBlack";
 };

Modified: trunk/Source/WebCore/platform/graphics/gpu/GPUSamplerDescriptor.h (242618 => 242619)


--- trunk/Source/WebCore/platform/graphics/gpu/GPUSamplerDescriptor.h	2019-03-08 00:10:54 UTC (rev 242618)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUSamplerDescriptor.h	2019-03-08 00:18:59 UTC (rev 242619)
@@ -36,7 +36,6 @@
         ClampToEdge,
         Repeat,
         MirrorRepeat,
-        ClampToBorderColor,
     };
 
     enum class FilterMode {
@@ -44,12 +43,6 @@
         Linear,
     };
 
-    enum class BorderColor {
-        TransparentBlack,
-        OpaqueBlack,
-        OpaqueWhite,
-    };
-
     AddressMode addressModeU { AddressMode::ClampToEdge };
     AddressMode addressModeV { AddressMode::ClampToEdge };
     AddressMode addressModeW { AddressMode::ClampToEdge };
@@ -60,7 +53,6 @@
     float lodMaxClamp { 0xffffffff };
     unsigned maxAnisotropy { 1 };
     GPUCompareFunction compareFunction { GPUCompareFunction::Never };
-    BorderColor borderColor { BorderColor::TransparentBlack };
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm (242618 => 242619)


--- trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm	2019-03-08 00:10:54 UTC (rev 242618)
+++ trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm	2019-03-08 00:18:59 UTC (rev 242619)
@@ -30,6 +30,7 @@
 
 #import "GPUBindGroup.h"
 #import "GPUBindGroupLayoutBinding.h"
+#import "GPUCommandBuffer.h"
 #import "Logging.h"
 #import <Metal/Metal.h>
 #import <wtf/BlockObjCExceptions.h>

Modified: trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUSamplerMetal.mm (242618 => 242619)


--- trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUSamplerMetal.mm	2019-03-08 00:10:54 UTC (rev 242618)
+++ trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUSamplerMetal.mm	2019-03-08 00:18:59 UTC (rev 242619)
@@ -46,27 +46,11 @@
         return MTLSamplerAddressModeRepeat;
     case GPUSamplerDescriptor::AddressMode::MirrorRepeat:
         return MTLSamplerAddressModeMirrorRepeat;
-    case GPUSamplerDescriptor::AddressMode::ClampToBorderColor:
-        return MTLSamplerAddressModeClampToBorderColor;
     }
 
     ASSERT_NOT_REACHED();
 }
 
-static MTLSamplerBorderColor mtlBorderColorForBorderColor(GPUSamplerDescriptor::BorderColor color)
-{
-    switch (color) {
-    case GPUSamplerDescriptor::BorderColor::TransparentBlack:
-        return MTLSamplerBorderColorTransparentBlack;
-    case GPUSamplerDescriptor::BorderColor::OpaqueBlack:
-        return MTLSamplerBorderColorOpaqueBlack;
-    case GPUSamplerDescriptor::BorderColor::OpaqueWhite:
-        return MTLSamplerBorderColorOpaqueWhite;
-    }
-
-    ASSERT_NOT_REACHED();
-}
-
 static MTLSamplerMinMagFilter mtlMinMagFilterForFilterMode(GPUSamplerDescriptor::FilterMode mode)
 {
     switch (mode) {
@@ -115,7 +99,6 @@
     [mtlDescriptor setRAddressMode:mtlAddressModeForAddressMode(descriptor.addressModeU)];
     [mtlDescriptor setSAddressMode:mtlAddressModeForAddressMode(descriptor.addressModeV)];
     [mtlDescriptor setTAddressMode:mtlAddressModeForAddressMode(descriptor.addressModeW)];
-    [mtlDescriptor setBorderColor:mtlBorderColorForBorderColor(descriptor.borderColor)];
     [mtlDescriptor setMinFilter:mtlMinMagFilterForFilterMode(descriptor.minFilter)];
     [mtlDescriptor setMagFilter:mtlMinMagFilterForFilterMode(descriptor.magFilter)];
     [mtlDescriptor setMipFilter:mtlMipFilterForFilterMode(descriptor.mipmapFilter)];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to