Title: [239351] trunk
Revision
239351
Author
justin_...@apple.com
Date
2018-12-18 13:51:56 -0800 (Tue, 18 Dec 2018)

Log Message

[WebGPU] BindGroupLayout and Device::createBindGroupLayout
https://bugs.webkit.org/show_bug.cgi?id=192817

Reviewed by Dean Jackson.

Update bind-group-layouts to test new functionality.

Source/WebCore:

Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
* Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
(WebCore::WebGPUBindGroupLayout::create):
(WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
* Modules/webgpu/WebGPUBindGroupLayout.h: Added.
* Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroupLayout const): Added.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUDevice.idl:
* platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
(WebCore::GPUBindGroupLayout::tryCreate):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
* platform/graphics/gpu/GPUBindGroupLayout.h: Added.
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
* platform/graphics/gpu/GPUDevice.h:

Add files and symbols to project:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Missing includes that were previously provided via UnifiedSources:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* platform/sql/SQLiteFileSystem.h:

LayoutTests:

* webgpu/bind-group-layouts-expected.txt:
* webgpu/bind-group-layouts.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (239350 => 239351)


--- trunk/LayoutTests/ChangeLog	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/LayoutTests/ChangeLog	2018-12-18 21:51:56 UTC (rev 239351)
@@ -1,3 +1,15 @@
+2018-12-18  Justin Fan  <justin_...@apple.com>
+
+        [WebGPU] BindGroupLayout and Device::createBindGroupLayout
+        https://bugs.webkit.org/show_bug.cgi?id=192817
+
+        Reviewed by Dean Jackson.
+
+        Update bind-group-layouts to test new functionality.
+
+        * webgpu/bind-group-layouts-expected.txt:
+        * webgpu/bind-group-layouts.html:
+
 2018-12-18  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed test gardening after r239306 and r239338.

Modified: trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt (239350 => 239351)


--- trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt	2018-12-18 21:51:56 UTC (rev 239351)
@@ -1,3 +1,4 @@
 
-PASS Create WebGPUBindGroupLayoutDescriptor. 
+PASS Create a basic WebGPUBindGroupLayoutDescriptor. 
+PASS Create a basic WebGPUBindGroupLayout with a WebGPUDevice. 
 

Modified: trunk/LayoutTests/webgpu/bind-group-layouts.html (239350 => 239351)


--- trunk/LayoutTests/webgpu/bind-group-layouts.html	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/LayoutTests/webgpu/bind-group-layouts.html	2018-12-18 21:51:56 UTC (rev 239351)
@@ -1,7 +1,8 @@
 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebGPUEnabled=true ] -->
 <meta charset=utf-8>
-<title>Create WebGPUBindGroupLayoutDescriptor.</title>
+<title>Create WebGPUBindGroupLayout.</title>
 <body>
+<script src=""
 <script src=""
 <script src=""
 <script>
@@ -14,12 +15,16 @@
 }
 
 test(() => {
-    const bindGroupLayoutBinding = createBindGroupLayoutBinding();
-    const bindGroupLayoutDescriptor = { bindings: [bindGroupLayoutBinding] };
+    const bindGroupLayoutDescriptor = { bindings: [createBindGroupLayoutBinding()] };
     assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & WebGPUShaderStageBit.FRAGMENT, 0);
     assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & WebGPUShaderStageBit.VERTEX, 0);
     assert_equals(bindGroupLayoutDescriptor.bindings[0].type, "storageBuffer");
-});
+}, "Create a basic WebGPUBindGroupLayoutDescriptor.");
 
+promise_test(async () => {
+    const device = await window.getBasicDevice();
+    const bindGroupLayout = device.createBindGroupLayout({ bindings: [createBindGroupLayoutBinding()] });
+    assert_true(bindGroupLayout instanceof WebGPUBindGroupLayout, "createBindGroupLayout returned a WebGPUBindGroupLayout");
+}, "Create a basic WebGPUBindGroupLayout with a WebGPUDevice.");
 </script>
 </body>
\ No newline at end of file

Modified: trunk/Source/WebCore/CMakeLists.txt (239350 => 239351)


--- trunk/Source/WebCore/CMakeLists.txt	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/CMakeLists.txt	2018-12-18 21:51:56 UTC (rev 239351)
@@ -458,6 +458,7 @@
     Modules/webgpu/WebGPU.idl
     Modules/webgpu/WebGPUAdapter.idl
     Modules/webgpu/WebGPUAdapterDescriptor.idl
+    Modules/webgpu/WebGPUBindGroupLayout.idl
     Modules/webgpu/WebGPUBindGroupLayoutBinding.idl
     Modules/webgpu/WebGPUBindGroupLayoutDescriptor.idl
     Modules/webgpu/WebGPUBuffer.idl

Modified: trunk/Source/WebCore/ChangeLog (239350 => 239351)


--- trunk/Source/WebCore/ChangeLog	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/ChangeLog	2018-12-18 21:51:56 UTC (rev 239351)
@@ -1,3 +1,41 @@
+2018-12-18  Justin Fan  <justin_...@apple.com>
+
+        [WebGPU] BindGroupLayout and Device::createBindGroupLayout
+        https://bugs.webkit.org/show_bug.cgi?id=192817
+
+        Reviewed by Dean Jackson.
+
+        Update bind-group-layouts to test new functionality.
+
+        Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
+        * Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
+        (WebCore::WebGPUBindGroupLayout::create):
+        (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
+        * Modules/webgpu/WebGPUBindGroupLayout.h: Added.
+        * Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
+        * Modules/webgpu/WebGPUDevice.cpp:
+        (WebCore::WebGPUDevice::createBindGroupLayout const): Added.
+        * Modules/webgpu/WebGPUDevice.h:
+        * Modules/webgpu/WebGPUDevice.idl:
+        * platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
+        (WebCore::GPUBindGroupLayout::tryCreate):
+        (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
+        * platform/graphics/gpu/GPUBindGroupLayout.h: Added.
+        * platform/graphics/gpu/GPUDevice.cpp:
+        (WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
+        * platform/graphics/gpu/GPUDevice.h:
+
+        Add files and symbols to project:
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreBuiltinNames.h:
+
+        Missing includes that were previously provided via UnifiedSources:
+        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
+        * platform/sql/SQLiteFileSystem.h:
+
 2018-12-18  Youenn Fablet  <you...@apple.com>
 
         Make ReadableStreamXX constructs use PrivateIdentifier

Modified: trunk/Source/WebCore/DerivedSources.make (239350 => 239351)


--- trunk/Source/WebCore/DerivedSources.make	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/DerivedSources.make	2018-12-18 21:51:56 UTC (rev 239351)
@@ -375,6 +375,7 @@
     $(WebCore)/Modules/webgpu/WebGPU.idl \
     $(WebCore)/Modules/webgpu/WebGPUAdapter.idl \
     $(WebCore)/Modules/webgpu/WebGPUAdapterDescriptor.idl \
+    $(WebCore)/Modules/webgpu/WebGPUBindGroupLayout.idl \
     $(WebCore)/Modules/webgpu/WebGPUBindGroupLayoutBinding.idl \
     $(WebCore)/Modules/webgpu/WebGPUBindGroupLayoutDescriptor.idl \
     $(WebCore)/Modules/webgpu/WebGPUBuffer.idl \

Copied: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp (from rev 239350, trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp) (0 => 239351)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp	2018-12-18 21:51:56 UTC (rev 239351)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebGPUBindGroupLayout.h"
+
+#if ENABLE(WEBGPU)
+
+namespace WebCore {
+
+Ref<WebGPUBindGroupLayout> WebGPUBindGroupLayout::create(Ref<GPUBindGroupLayout>&& layout)
+{
+    return adoptRef(*new WebGPUBindGroupLayout(WTFMove(layout)));
+}
+
+WebGPUBindGroupLayout::WebGPUBindGroupLayout(Ref<GPUBindGroupLayout>&& layout)
+    : m_layout(WTFMove(layout))
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)

Copied: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.h (from rev 239350, trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h) (0 => 239351)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.h	2018-12-18 21:51:56 UTC (rev 239351)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEBGPU)
+
+#include "GPUBindGroupLayout.h"
+
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class WebGPUBindGroupLayout : public RefCounted<WebGPUBindGroupLayout> {
+public:
+    static Ref<WebGPUBindGroupLayout> create(Ref<GPUBindGroupLayout>&&);
+
+private:
+    explicit WebGPUBindGroupLayout(Ref<GPUBindGroupLayout>&&);
+
+    Ref<GPUBindGroupLayout> m_layout;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)

Copied: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.idl (from rev 239350, trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp) (0 => 239351)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.idl	2018-12-18 21:51:56 UTC (rev 239351)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+// https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl
+
+[
+    Conditional=WEBGPU,
+    EnabledAtRuntime=WebGPU,
+    ImplementationLacksVTable
+] interface WebGPUBindGroupLayout {
+};

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp (239350 => 239351)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp	2018-12-18 21:51:56 UTC (rev 239351)
@@ -33,6 +33,7 @@
 #include "GPURenderPipelineDescriptor.h"
 #include "GPUShaderModuleDescriptor.h"
 #include "Logging.h"
+#include "WebGPUBindGroupLayout.h"
 #include "WebGPUBuffer.h"
 #include "WebGPUCommandBuffer.h"
 #include "WebGPUPipelineStageDescriptor.h"
@@ -64,6 +65,12 @@
     return buffer ? WebGPUBuffer::create(buffer.releaseNonNull()) : nullptr;
 }
 
+Ref<WebGPUBindGroupLayout> WebGPUDevice::createBindGroupLayout(WebGPUBindGroupLayoutDescriptor&& descriptor) const
+{
+    auto layout = m_device->createBindGroupLayout(GPUBindGroupLayoutDescriptor { descriptor.bindings });
+    return WebGPUBindGroupLayout::create(WTFMove(layout));
+}
+
 RefPtr<WebGPUShaderModule> WebGPUDevice::createShaderModule(WebGPUShaderModuleDescriptor&& descriptor) const
 {
     // FIXME: What can be validated here?

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h (239350 => 239351)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h	2018-12-18 21:51:56 UTC (rev 239351)
@@ -29,6 +29,7 @@
 
 #include "GPUDevice.h"
 #include "WebGPUAdapter.h"
+#include "WebGPUBindGroupLayoutDescriptor.h"
 #include "WebGPUBufferDescriptor.h"
 #include "WebGPUQueue.h"
 
@@ -39,6 +40,7 @@
 namespace WebCore {
 
 class ScriptExecutionContext;
+class WebGPUBindGroupLayout;
 class WebGPUBuffer;
 class WebGPUCommandBuffer;
 class WebGPURenderPipeline;
@@ -56,6 +58,8 @@
 
     RefPtr<WebGPUBuffer> createBuffer(WebGPUBufferDescriptor&&) const;
 
+    Ref<WebGPUBindGroupLayout> createBindGroupLayout(WebGPUBindGroupLayoutDescriptor&&) const;
+
     RefPtr<WebGPUShaderModule> createShaderModule(WebGPUShaderModuleDescriptor&&) const;
     RefPtr<WebGPURenderPipeline> createRenderPipeline(WebGPURenderPipelineDescriptor&&) const;
 

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl (239350 => 239351)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl	2018-12-18 21:51:56 UTC (rev 239351)
@@ -35,6 +35,8 @@
 
     WebGPUBuffer createBuffer(WebGPUBufferDescriptor descriptor);
 
+    WebGPUBindGroupLayout createBindGroupLayout(WebGPUBindGroupLayoutDescriptor descriptor);
+
     WebGPUShaderModule createShaderModule(WebGPUShaderModuleDescriptor descriptor);
     WebGPURenderPipeline createRenderPipeline(WebGPURenderPipelineDescriptor descriptor);
 
@@ -47,7 +49,6 @@
     // WebGPUTexture createTexture(WebGPUTextureDescriptor descriptor);
     // WebGPUSampler createSampler(WebGPUSamplerDescriptor descriptor);
     //
-    // WebGPUBindGroupLayout createBindGroupLayout(WebGPUBindGroupLayoutDescriptor descriptor);
     // WebGPUPipelineLayout createPipelineLayout(WebGPUPipelineLayoutDescriptor descriptor);
     // WebGPUBindGroup createBindGroup(WebGPUBindGroupDescriptor descriptor);
     //

Modified: trunk/Source/WebCore/Sources.txt (239350 => 239351)


--- trunk/Source/WebCore/Sources.txt	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/Sources.txt	2018-12-18 21:51:56 UTC (rev 239351)
@@ -303,6 +303,7 @@
 Modules/webgpu/DOMWindowWebGPU.cpp
 Modules/webgpu/WebGPU.cpp
 Modules/webgpu/WebGPUAdapter.cpp
+Modules/webgpu/WebGPUBindGroupLayout.cpp
 Modules/webgpu/WebGPUBuffer.cpp
 Modules/webgpu/WebGPUCommandBuffer.cpp
 Modules/webgpu/WebGPUDevice.cpp
@@ -1741,6 +1742,7 @@
 platform/graphics/filters/SourceGraphic.cpp
 platform/graphics/filters/SpotLightSource.cpp
 
+platform/graphics/gpu/GPUBindGroupLayout.cpp
 platform/graphics/gpu/GPUDevice.cpp
 platform/graphics/gpu/legacy/GPULegacyBuffer.cpp
 platform/graphics/gpu/legacy/GPULegacyCommandBuffer.cpp
@@ -3225,6 +3227,7 @@
 JSWebGPU.cpp
 JSWebGPUAdapter.cpp
 JSWebGPUAdapterDescriptor.cpp
+JSWebGPUBindGroupLayout.cpp
 JSWebGPUBindGroupLayoutBinding.cpp
 JSWebGPUBindGroupLayoutDescriptor.cpp
 JSWebGPUBuffer.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (239350 => 239351)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-12-18 21:51:56 UTC (rev 239351)
@@ -13717,6 +13717,9 @@
 		D001D9AD21B0C81A0023B9BC /* WebGPUColor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUColor.idl; sourceTree = "<group>"; };
 		D001D9B021B0C8A80023B9BC /* WebGPURenderPassColorAttachmentDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderPassColorAttachmentDescriptor.h; sourceTree = "<group>"; };
 		D001D9B121B0C8A80023B9BC /* WebGPURenderPassColorAttachmentDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPURenderPassColorAttachmentDescriptor.idl; sourceTree = "<group>"; };
+		D003287921C8645B00622AA6 /* WebGPUBindGroupLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroupLayout.h; sourceTree = "<group>"; };
+		D003287A21C8645B00622AA6 /* WebGPUBindGroupLayout.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUBindGroupLayout.cpp; sourceTree = "<group>"; };
+		D003287B21C8645B00622AA6 /* WebGPUBindGroupLayout.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBindGroupLayout.idl; sourceTree = "<group>"; };
 		D00F5940216ECC7A000D71DB /* DOMWindowWebGPU.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMWindowWebGPU.h; sourceTree = "<group>"; };
 		D00F5941216ECC7A000D71DB /* DOMWindowWebGPU.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowWebGPU.cpp; sourceTree = "<group>"; };
 		D00F5942216ECC7A000D71DB /* DOMWindowWebGPU.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = DOMWindowWebGPU.idl; sourceTree = "<group>"; };
@@ -13731,6 +13734,8 @@
 		D00F595421701D8C000D71DB /* WebGPUDevice.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUDevice.idl; sourceTree = "<group>"; };
 		D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpaceSplitString.cpp; sourceTree = "<group>"; };
 		D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpaceSplitString.h; sourceTree = "<group>"; };
+		D02454D021C4A41C00B73628 /* GPUBindGroupLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBindGroupLayout.h; sourceTree = "<group>"; };
+		D02454D121C4A41C00B73628 /* GPUBindGroupLayout.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUBindGroupLayout.cpp; sourceTree = "<group>"; };
 		D02B83ED21C8397A00F85473 /* WebGPUBindGroupLayoutDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBindGroupLayoutDescriptor.idl; sourceTree = "<group>"; };
 		D02C26912181416D00D818E4 /* WebGPUAdapterDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUAdapterDescriptor.h; sourceTree = "<group>"; };
 		D02C26922181416D00D818E4 /* WebGPUAdapterDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUAdapterDescriptor.idl; sourceTree = "<group>"; };
@@ -18051,6 +18056,8 @@
 			children = (
 				D087CE3721ACA94200BDE174 /* cocoa */,
 				312FF8CE21A4C33F00EB199D /* legacy */,
+				D02454D121C4A41C00B73628 /* GPUBindGroupLayout.cpp */,
+				D02454D021C4A41C00B73628 /* GPUBindGroupLayout.h */,
 				D0B8BB0121C46E78000C7681 /* GPUBindGroupLayoutBinding.h */,
 				D083D98421C48050008E8EFF /* GPUBindGroupLayoutDescriptor.h */,
 				D0D8649221B760F2003C983C /* GPUBuffer.h */,
@@ -25563,6 +25570,9 @@
 				D00F5951216FFAC2000D71DB /* WebGPUAdapter.idl */,
 				D02C26912181416D00D818E4 /* WebGPUAdapterDescriptor.h */,
 				D02C26922181416D00D818E4 /* WebGPUAdapterDescriptor.idl */,
+				D003287A21C8645B00622AA6 /* WebGPUBindGroupLayout.cpp */,
+				D003287921C8645B00622AA6 /* WebGPUBindGroupLayout.h */,
+				D003287B21C8645B00622AA6 /* WebGPUBindGroupLayout.idl */,
 				D0B8BB0521C47256000C7681 /* WebGPUBindGroupLayoutBinding.h */,
 				D0B8BB0621C47256000C7681 /* WebGPUBindGroupLayoutBinding.idl */,
 				D083D98621C4813E008E8EFF /* WebGPUBindGroupLayoutDescriptor.h */,

Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (239350 => 239351)


--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h	2018-12-18 21:51:56 UTC (rev 239351)
@@ -190,6 +190,7 @@
     macro(WebGLVertexArrayObject) \
     macro(WebGPU) \
     macro(WebGPUAdapter) \
+    macro(WebGPUBindGroupLayout) \
     macro(WebGPUBuffer) \
     macro(WebGPUBufferUsage) \
     macro(WebGPUCommandBuffer) \

Copied: trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.cpp (from rev 239350, trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp) (0 => 239351)


--- trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.cpp	2018-12-18 21:51:56 UTC (rev 239351)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GPUBindGroupLayout.h"
+
+#if ENABLE(WEBGPU)
+
+namespace WebCore {
+
+Ref<GPUBindGroupLayout> GPUBindGroupLayout::create(GPUBindGroupLayoutDescriptor&& descriptor)
+{
+    return adoptRef(*new GPUBindGroupLayout(WTFMove(descriptor)));
+}
+
+GPUBindGroupLayout::GPUBindGroupLayout(GPUBindGroupLayoutDescriptor&& descriptor)
+    : m_descriptor(WTFMove(descriptor))
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)
+

Copied: trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.h (from rev 239350, trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h) (0 => 239351)


--- trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.h	2018-12-18 21:51:56 UTC (rev 239351)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEBGPU)
+
+#include "GPUBindGroupLayoutDescriptor.h"
+
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class GPUBindGroupLayout : public RefCounted<GPUBindGroupLayout> {
+public:
+    static Ref<GPUBindGroupLayout> create(GPUBindGroupLayoutDescriptor&&);
+
+private:
+    GPUBindGroupLayout(GPUBindGroupLayoutDescriptor&&);
+
+    GPUBindGroupLayoutDescriptor m_descriptor;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)

Modified: trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp (239350 => 239351)


--- trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp	2018-12-18 21:51:56 UTC (rev 239351)
@@ -28,6 +28,8 @@
 
 #if ENABLE(WEBGPU)
 
+#include "GPUBindGroupLayout.h"
+#include "GPUBindGroupLayoutDescriptor.h"
 #include "GPUBuffer.h"
 #include "GPUBufferDescriptor.h"
 #include "GPURenderPipeline.h"
@@ -42,6 +44,11 @@
     return GPUBuffer::create(*this, WTFMove(descriptor));
 }
 
+Ref<GPUBindGroupLayout> GPUDevice::createBindGroupLayout(GPUBindGroupLayoutDescriptor&& descriptor) const
+{
+    return GPUBindGroupLayout::create(WTFMove(descriptor));
+}
+
 RefPtr<GPUShaderModule> GPUDevice::createShaderModule(GPUShaderModuleDescriptor&& descriptor) const
 {
     return GPUShaderModule::create(*this, WTFMove(descriptor));

Modified: trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h (239350 => 239351)


--- trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h	2018-12-18 21:51:56 UTC (rev 239351)
@@ -41,10 +41,12 @@
 using PlatformDevice = MTLDevice;
 using PlatformDeviceSmartPtr = RetainPtr<MTLDevice>;
 
+class GPUBindGroupLayout;
 class GPUBuffer;
 class GPURenderPipeline;
 class GPUShaderModule;
 
+struct GPUBindGroupLayoutDescriptor;
 struct GPUBufferDescriptor;
 struct GPUShaderModuleDescriptor;
 struct GPURenderPipelineDescriptor;
@@ -55,6 +57,8 @@
 
     RefPtr<GPUBuffer> createBuffer(GPUBufferDescriptor&&) const;
 
+    Ref<GPUBindGroupLayout> createBindGroupLayout(GPUBindGroupLayoutDescriptor&&) const;
+
     RefPtr<GPUShaderModule> createShaderModule(GPUShaderModuleDescriptor&&) const;
     RefPtr<GPURenderPipeline> createRenderPipeline(GPURenderPipelineDescriptor&&) const;
 

Modified: trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h (239350 => 239351)


--- trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h	2018-12-18 21:51:56 UTC (rev 239351)
@@ -31,6 +31,7 @@
 #include <wtf/Lock.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/ThreadSafeRefCounted.h>
+#include <wtf/WeakPtr.h>
 #include <wtf/threads/BinarySemaphore.h>
 
 typedef struct opaqueCMSampleBuffer *CMSampleBufferRef;

Modified: trunk/Source/WebCore/platform/sql/SQLiteFileSystem.h (239350 => 239351)


--- trunk/Source/WebCore/platform/sql/SQLiteFileSystem.h	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/Source/WebCore/platform/sql/SQLiteFileSystem.h	2018-12-18 21:51:56 UTC (rev 239351)
@@ -31,6 +31,7 @@
 #ifndef SQLiteFileSystem_h
 #define SQLiteFileSystem_h
 
+#include <wtf/WallTime.h>
 #include <wtf/text/WTFString.h>
 
 struct sqlite3;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to