Diff
Modified: trunk/LayoutTests/ChangeLog (239836 => 239837)
--- trunk/LayoutTests/ChangeLog 2019-01-10 19:36:25 UTC (rev 239836)
+++ trunk/LayoutTests/ChangeLog 2019-01-10 19:59:15 UTC (rev 239837)
@@ -1,3 +1,16 @@
+2019-01-10 Justin Fan <justin_...@apple.com>
+
+ [WebGPU] Fix vertex-buffer-triangle-strip test and small update to GPURenderPipeline
+ https://bugs.webkit.org/show_bug.cgi?id=193289
+
+ Reviewed by Dean Jackson.
+
+ Fix broken test after pipeline layouts were added.
+
+ * webgpu/js/webgpu-functions.js:
+ (createBasicPipeline): Ensure pipeline layout is actually optional.
+ * webgpu/vertex-buffer-triangle-strip.html:
+
2019-01-10 John Wilander <wilan...@apple.com>
Override the session configuration for cookieAcceptPolicy
Modified: trunk/Source/WebCore/CMakeLists.txt (239836 => 239837)
--- trunk/Source/WebCore/CMakeLists.txt 2019-01-10 19:36:25 UTC (rev 239836)
+++ trunk/Source/WebCore/CMakeLists.txt 2019-01-10 19:59:15 UTC (rev 239837)
@@ -464,10 +464,13 @@
Modules/webgpu/WebGPU.idl
Modules/webgpu/WebGPUAdapter.idl
Modules/webgpu/WebGPUAdapterDescriptor.idl
+ Modules/webgpu/WebGPUBindGroupBinding.idl
+ Modules/webgpu/WebGPUBindGroupDescriptor.idl
Modules/webgpu/WebGPUBindGroupLayout.idl
Modules/webgpu/WebGPUBindGroupLayoutBinding.idl
Modules/webgpu/WebGPUBindGroupLayoutDescriptor.idl
Modules/webgpu/WebGPUBuffer.idl
+ Modules/webgpu/WebGPUBufferBinding.idl
Modules/webgpu/WebGPUBufferDescriptor.idl
Modules/webgpu/WebGPUBufferUsage.idl
Modules/webgpu/WebGPUColor.idl
Modified: trunk/Source/WebCore/ChangeLog (239836 => 239837)
--- trunk/Source/WebCore/ChangeLog 2019-01-10 19:36:25 UTC (rev 239836)
+++ trunk/Source/WebCore/ChangeLog 2019-01-10 19:59:15 UTC (rev 239837)
@@ -1,3 +1,41 @@
+2019-01-10 Justin Fan <justin_...@apple.com>
+
+ [WebGPU] Add BindGroupBinding, BindGroupDescriptor, and BufferBinding dictionaries from API
+ https://bugs.webkit.org/show_bug.cgi?id=193298
+
+ Reviewed by Dean Jackson.
+
+ No new tests. No change in behavior.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * Modules/webgpu/WebGPUBindGroupBinding.h: Added.
+ * Modules/webgpu/WebGPUBindGroupBinding.idl: Added.
+ * Modules/webgpu/WebGPUBindGroupDescriptor.h: Added.
+ * Modules/webgpu/WebGPUBindGroupDescriptor.idl: Added.
+ * Modules/webgpu/WebGPUBufferBinding.h: Added.
+ * Modules/webgpu/WebGPUBufferBinding.idl: Added.
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/gpu/GPUBindGroupBinding.h: Added.
+ * platform/graphics/gpu/GPUBindGroupDescriptor.h: Added.
+ * platform/graphics/gpu/GPUBufferBinding.h: Added.
+
+2019-01-09 Justin Fan <justin_...@apple.com>
+
+ [WebGPU] Fix vertex-buffer-triangle-strip test and small update to GPURenderPipeline
+ https://bugs.webkit.org/show_bug.cgi?id=193289
+
+ Reviewed by Dean Jackson.
+
+ Fix broken test after pipeline layouts were added, and a small refactoring to GPURenderPipeline to avoid
+ retaining its descriptor after creation.
+
+ * platform/graphics/gpu/GPURenderPipeline.h:
+ (WebCore::GPURenderPipeline::primitiveTopology const):
+ * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
+ (WebCore::GPURenderPipeline::GPURenderPipeline):
+
2019-01-09 Dean Jackson <d...@apple.com>
Safari Crashing in Version 12.0.1 (14606.2.104.1.1) WebCore::GraphicsLayerCA::updateBackdropFilters
Modified: trunk/Source/WebCore/DerivedSources.make (239836 => 239837)
--- trunk/Source/WebCore/DerivedSources.make 2019-01-10 19:36:25 UTC (rev 239836)
+++ trunk/Source/WebCore/DerivedSources.make 2019-01-10 19:59:15 UTC (rev 239837)
@@ -375,10 +375,13 @@
$(WebCore)/Modules/webgpu/WebGPU.idl \
$(WebCore)/Modules/webgpu/WebGPUAdapter.idl \
$(WebCore)/Modules/webgpu/WebGPUAdapterDescriptor.idl \
+ $(WebCore)/Modules/webgpu/WebGPUBindGroupBinding.idl \
+ $(WebCore)/Modules/webgpu/WebGPUBindGroupDescriptor.idl \
$(WebCore)/Modules/webgpu/WebGPUBindGroupLayout.idl \
$(WebCore)/Modules/webgpu/WebGPUBindGroupLayoutBinding.idl \
$(WebCore)/Modules/webgpu/WebGPUBindGroupLayoutDescriptor.idl \
$(WebCore)/Modules/webgpu/WebGPUBuffer.idl \
+ $(WebCore)/Modules/webgpu/WebGPUBufferBinding.idl \
$(WebCore)/Modules/webgpu/WebGPUBufferDescriptor.idl \
$(WebCore)/Modules/webgpu/WebGPUBufferUsage.idl \
$(WebCore)/Modules/webgpu/WebGPUColor.idl \
Added: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupBinding.h (0 => 239837)
--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupBinding.h (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupBinding.h 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2019 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 "WebGPUBufferBinding.h"
+#include "WebGPUTextureView.h"
+#include <wtf/Variant.h>
+
+namespace WebCore {
+
+using WebGPUBindingResource = Variant<RefPtr<WebGPUTextureView>, WebGPUBufferBinding>;
+
+struct WebGPUBindGroupBinding {
+ unsigned long binding;
+ WebGPUBindingResource resource;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)
Added: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupBinding.idl (0 => 239837)
--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupBinding.idl (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupBinding.idl 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2019 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
+
+typedef unsigned long u32;
+typedef (/*WebGPUSampler or */WebGPUTextureView or WebGPUBufferBinding) WebGPUBindingResource;
+
+[
+ Conditional=WEBGPU,
+ EnabledAtRuntime=WebGPU
+] dictionary WebGPUBindGroupBinding {
+ u32 binding;
+ WebGPUBindingResource resource;
+};
Added: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupDescriptor.h (0 => 239837)
--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupDescriptor.h (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupDescriptor.h 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2019 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 "WebGPUBindGroupBinding.h"
+#include "WebGPUBindGroupLayout.h"
+#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+struct WebGPUBindGroupDescriptor {
+ RefPtr<WebGPUBindGroupLayout> layout;
+ Vector<WebGPUBindGroupBinding> bindings;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)
Added: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupDescriptor.idl (0 => 239837)
--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupDescriptor.idl (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupDescriptor.idl 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2019 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
+] dictionary WebGPUBindGroupDescriptor {
+ WebGPUBindGroupLayout layout;
+ sequence<WebGPUBindGroupBinding> bindings;
+};
Added: trunk/Source/WebCore/Modules/webgpu/WebGPUBufferBinding.h (0 => 239837)
--- trunk/Source/WebCore/Modules/webgpu/WebGPUBufferBinding.h (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBufferBinding.h 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2019 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 "WebGPUBuffer.h"
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+struct WebGPUBufferBinding {
+ RefPtr<WebGPUBuffer> buffer;
+ unsigned long offset;
+ unsigned long size;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)
Added: trunk/Source/WebCore/Modules/webgpu/WebGPUBufferBinding.idl (0 => 239837)
--- trunk/Source/WebCore/Modules/webgpu/WebGPUBufferBinding.idl (rev 0)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBufferBinding.idl 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2019 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
+
+typedef unsigned long u32;
+
+[
+ Conditional=WEBGPU,
+ EnabledAtRuntime=WebGPU
+] dictionary WebGPUBufferBinding {
+ WebGPUBuffer buffer;
+ u32 offset;
+ u32 size;
+};
Modified: trunk/Source/WebCore/Sources.txt (239836 => 239837)
--- trunk/Source/WebCore/Sources.txt 2019-01-10 19:36:25 UTC (rev 239836)
+++ trunk/Source/WebCore/Sources.txt 2019-01-10 19:59:15 UTC (rev 239837)
@@ -3235,10 +3235,13 @@
JSWebGPU.cpp
JSWebGPUAdapter.cpp
JSWebGPUAdapterDescriptor.cpp
+JSWebGPUBindGroupBinding.cpp
+JSWebGPUBindGroupDescriptor.cpp
JSWebGPUBindGroupLayout.cpp
JSWebGPUBindGroupLayoutBinding.cpp
JSWebGPUBindGroupLayoutDescriptor.cpp
JSWebGPUBuffer.cpp
+JSWebGPUBufferBinding.cpp
JSWebGPUBufferDescriptor.cpp
JSWebGPUBufferUsage.cpp
JSWebGPUCommandBuffer.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (239836 => 239837)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-01-10 19:36:25 UTC (rev 239836)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-01-10 19:59:15 UTC (rev 239837)
@@ -13880,6 +13880,15 @@
D0BC54481443AC4A00E105DA /* CachedStyleSheetClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedStyleSheetClient.h; sourceTree = "<group>"; };
D0BD4F5A1408850F006839B6 /* DictationCommandIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictationCommandIOS.cpp; sourceTree = "<group>"; };
D0BD4F5B1408850F006839B6 /* DictationCommandIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DictationCommandIOS.h; sourceTree = "<group>"; };
+ D0BE104A21E6872F00E42A89 /* GPUBufferBinding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBufferBinding.h; sourceTree = "<group>"; };
+ D0BE104C21E68F1500E42A89 /* WebGPUBufferBinding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBufferBinding.h; sourceTree = "<group>"; };
+ D0BE104D21E68F1500E42A89 /* WebGPUBufferBinding.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBufferBinding.idl; sourceTree = "<group>"; };
+ D0BE104E21E695E200E42A89 /* GPUBindGroupBinding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBindGroupBinding.h; sourceTree = "<group>"; };
+ D0BE104F21E69F8300E42A89 /* WebGPUBindGroupBinding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroupBinding.h; sourceTree = "<group>"; };
+ D0BE105021E69F8300E42A89 /* WebGPUBindGroupBinding.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBindGroupBinding.idl; sourceTree = "<group>"; };
+ D0BE105121E6A70E00E42A89 /* GPUBindGroupDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBindGroupDescriptor.h; sourceTree = "<group>"; };
+ D0BE105221E6AA0D00E42A89 /* WebGPUBindGroupDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroupDescriptor.h; sourceTree = "<group>"; };
+ D0BE105321E6AA0D00E42A89 /* WebGPUBindGroupDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBindGroupDescriptor.idl; sourceTree = "<group>"; };
D0C419EB2183CFA2009EC1DE /* WebGPUPipelineStageDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUPipelineStageDescriptor.h; sourceTree = "<group>"; };
D0C419EC2183CFA2009EC1DE /* WebGPUPipelineStageDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUPipelineStageDescriptor.idl; sourceTree = "<group>"; };
D0C419F02183EB31009EC1DE /* WebGPUPipelineDescriptorBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUPipelineDescriptorBase.h; sourceTree = "<group>"; };
@@ -18079,10 +18088,13 @@
children = (
D087CE3721ACA94200BDE174 /* cocoa */,
312FF8CE21A4C33F00EB199D /* legacy */,
+ D0BE104E21E695E200E42A89 /* GPUBindGroupBinding.h */,
+ D0BE105121E6A70E00E42A89 /* GPUBindGroupDescriptor.h */,
D02454D021C4A41C00B73628 /* GPUBindGroupLayout.h */,
D0B8BB0121C46E78000C7681 /* GPUBindGroupLayoutBinding.h */,
D083D98421C48050008E8EFF /* GPUBindGroupLayoutDescriptor.h */,
D0D8649221B760F2003C983C /* GPUBuffer.h */,
+ D0BE104A21E6872F00E42A89 /* GPUBufferBinding.h */,
D0D8648721B64CAA003C983C /* GPUBufferDescriptor.h */,
D001D9AB21B0C7BF0023B9BC /* GPUColor.h */,
312FF8BD21A4C2F100EB199D /* GPUCommandBuffer.h */,
@@ -25624,6 +25636,10 @@
D00F5951216FFAC2000D71DB /* WebGPUAdapter.idl */,
D02C26912181416D00D818E4 /* WebGPUAdapterDescriptor.h */,
D02C26922181416D00D818E4 /* WebGPUAdapterDescriptor.idl */,
+ D0BE104F21E69F8300E42A89 /* WebGPUBindGroupBinding.h */,
+ D0BE105021E69F8300E42A89 /* WebGPUBindGroupBinding.idl */,
+ D0BE105221E6AA0D00E42A89 /* WebGPUBindGroupDescriptor.h */,
+ D0BE105321E6AA0D00E42A89 /* WebGPUBindGroupDescriptor.idl */,
D003287A21C8645B00622AA6 /* WebGPUBindGroupLayout.cpp */,
D003287921C8645B00622AA6 /* WebGPUBindGroupLayout.h */,
D003287B21C8645B00622AA6 /* WebGPUBindGroupLayout.idl */,
@@ -25634,6 +25650,8 @@
D0D8648D21B70676003C983C /* WebGPUBuffer.cpp */,
D0D8648C21B70676003C983C /* WebGPUBuffer.h */,
D0D8648E21B70676003C983C /* WebGPUBuffer.idl */,
+ D0BE104C21E68F1500E42A89 /* WebGPUBufferBinding.h */,
+ D0BE104D21E68F1500E42A89 /* WebGPUBufferBinding.idl */,
D0D8648221B61727003C983C /* WebGPUBufferDescriptor.h */,
D0D8648321B61727003C983C /* WebGPUBufferDescriptor.idl */,
D063AE3F21C05DDD000E6A35 /* WebGPUBufferUsage.h */,
Added: trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupBinding.h (0 => 239837)
--- trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupBinding.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupBinding.h 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2019 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 "GPUBufferBinding.h"
+#include "GPUTexture.h"
+#include <wtf/Variant.h>
+
+namespace WebCore {
+
+using GPUBindingResource = Variant<Ref<GPUTexture>, GPUBufferBinding>;
+
+struct GPUBindGroupBinding {
+ unsigned long binding;
+ GPUBindingResource resource;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)
Added: trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupDescriptor.h (0 => 239837)
--- trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupDescriptor.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupDescriptor.h 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2019 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 "GPUBindGroupBinding.h"
+#include "GPUBindGroupLayout.h"
+#include <wtf/Ref.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+struct GPUBindGroupDescriptor {
+ Ref<GPUBindGroupLayout> layout;
+ Vector<GPUBindGroupBinding> bindings;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)
Added: trunk/Source/WebCore/platform/graphics/gpu/GPUBufferBinding.h (0 => 239837)
--- trunk/Source/WebCore/platform/graphics/gpu/GPUBufferBinding.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUBufferBinding.h 2019-01-10 19:59:15 UTC (rev 239837)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2019 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 "GPUBuffer.h"
+#include <wtf/Ref.h>
+
+namespace WebCore {
+
+struct GPUBufferBinding {
+ Ref<GPUBuffer> buffer;
+ unsigned long offset;
+ unsigned long size;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGPU)