Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (285376 => 285377)
--- trunk/Source/WebCore/CMakeLists.txt 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/CMakeLists.txt 2021-11-06 21:08:52 UTC (rev 285377)
@@ -1470,9 +1470,13 @@
list(APPEND WebCore_NON_SVG_IDL_FILES
Modules/WebGPU/GPU.idl
Modules/WebGPU/GPUAdapter.idl
+ Modules/WebGPU/GPUBuffer.idl
+ Modules/WebGPU/GPUBufferDescriptor.idl
+ Modules/WebGPU/GPUBufferUsage.idl
Modules/WebGPU/GPUDevice.idl
Modules/WebGPU/GPUDeviceDescriptor.idl
Modules/WebGPU/GPUFeatureName.idl
+ Modules/WebGPU/GPUMapMode.idl
Modules/WebGPU/GPUObjectBase.idl
Modules/WebGPU/GPUObjectDescriptorBase.idl
Modules/WebGPU/GPUPowerPreference.idl
Modified: trunk/Source/WebCore/ChangeLog (285376 => 285377)
--- trunk/Source/WebCore/ChangeLog 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/ChangeLog 2021-11-06 21:08:52 UTC (rev 285377)
@@ -1,5 +1,49 @@
2021-11-04 Myles C. Maxfield <[email protected]>
+ [WebGPU] Bindings part 2: Bring back Buffer bindings code
+ https://bugs.webkit.org/show_bug.cgi?id=232560
+
+ Reviewed by Alex Christensen.
+
+ This is the second chunk of bindings code, brought back from r280467.
+ This chunk includes the Buffer object. Its methods are just stubbed out
+ and do nothing - those implementations will come later.
+
+ No new tests because there is no behavior change yet.
+
+ * CMakeLists.txt:
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * Modules/WebGPU/GPUBuffer.cpp: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.cpp.
+ (WebCore::GPUBuffer::label const):
+ (WebCore::GPUBuffer::setLabel):
+ (WebCore::GPUBuffer::mapAsync):
+ (WebCore::GPUBuffer::getMappedRange):
+ (WebCore::GPUBuffer::unmap):
+ (WebCore::GPUBuffer::destroy):
+ * Modules/WebGPU/GPUBuffer.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.cpp.
+ (WebCore::GPUBuffer::create):
+ * Modules/WebGPU/GPUBuffer.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUBufferDescriptor.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.cpp.
+ * Modules/WebGPU/GPUBufferDescriptor.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUBufferUsage.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.cpp.
+ * Modules/WebGPU/GPUBufferUsage.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUDevice.cpp:
+ (WebCore::GPUDevice::destroy):
+ (WebCore::GPUDevice::createBuffer):
+ * Modules/WebGPU/GPUDevice.h:
+ * Modules/WebGPU/GPUDevice.idl:
+ * Modules/WebGPU/GPUIntegralTypes.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.cpp.
+ * Modules/WebGPU/GPUMapMode.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.cpp.
+ * Modules/WebGPU/GPUMapMode.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/applepay/ApplePayCancelEvent.cpp:
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/WebCoreBuiltinNames.h:
+
+2021-11-04 Myles C. Maxfield <[email protected]>
+
[WebGPU] Bindings part 1: Bring back Adapter/Device bindings code
https://bugs.webkit.org/show_bug.cgi?id=232550
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (285376 => 285377)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-11-06 21:08:52 UTC (rev 285377)
@@ -23,9 +23,13 @@
$(PROJECT_DIR)/DerivedSources.make
$(PROJECT_DIR)/Modules/WebGPU/GPU.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUAdapter.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUBuffer.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUBufferDescriptor.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUBufferUsage.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUDevice.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUDeviceDescriptor.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUFeatureName.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUMapMode.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUObjectBase.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUObjectDescriptorBase.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUPowerPreference.idl
Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (285376 => 285377)
--- trunk/Source/WebCore/DerivedSources-output.xcfilelist 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist 2021-11-06 21:08:52 UTC (rev 285377)
@@ -871,6 +871,12 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPU.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUAdapter.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUAdapter.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBuffer.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBuffer.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferDescriptor.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferDescriptor.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferUsage.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferUsage.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDevice.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDevice.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDeviceDescriptor.cpp
@@ -877,6 +883,8 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDeviceDescriptor.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUFeatureName.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUFeatureName.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUMapMode.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUMapMode.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUObjectBase.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUObjectBase.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUObjectDescriptorBase.cpp
Modified: trunk/Source/WebCore/DerivedSources.make (285376 => 285377)
--- trunk/Source/WebCore/DerivedSources.make 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/DerivedSources.make 2021-11-06 21:08:52 UTC (rev 285377)
@@ -55,9 +55,13 @@
JS_BINDING_IDLS := \
$(WebCore)/Modules/WebGPU/GPU.idl \
$(WebCore)/Modules/WebGPU/GPUAdapter.idl \
+ $(WebCore)/Modules/WebGPU/GPUBuffer.idl \
+ $(WebCore)/Modules/WebGPU/GPUBufferDescriptor.idl \
+ $(WebCore)/Modules/WebGPU/GPUBufferUsage.idl \
$(WebCore)/Modules/WebGPU/GPUDevice.idl \
$(WebCore)/Modules/WebGPU/GPUDeviceDescriptor.idl \
$(WebCore)/Modules/WebGPU/GPUFeatureName.idl \
+ $(WebCore)/Modules/WebGPU/GPUMapMode.idl \
$(WebCore)/Modules/WebGPU/GPUObjectBase.idl \
$(WebCore)/Modules/WebGPU/GPUObjectDescriptorBase.idl \
$(WebCore)/Modules/WebGPU/GPUPowerPreference.idl \
Modified: trunk/Source/WebCore/Modules/WebGPU/GPU.cpp (285376 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPU.cpp 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Modules/WebGPU/GPU.cpp 2021-11-06 21:08:52 UTC (rev 285377)
@@ -28,7 +28,7 @@
namespace WebCore {
-void GPU::requestAdapter(const GPURequestAdapterOptions&, RequestAdapterPromise&&)
+void GPU::requestAdapter(const std::optional<GPURequestAdapterOptions>&, RequestAdapterPromise&&)
{
}
Modified: trunk/Source/WebCore/Modules/WebGPU/GPU.h (285376 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPU.h 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Modules/WebGPU/GPU.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -28,6 +28,7 @@
#include "GPUAdapter.h"
#include "GPURequestAdapterOptions.h"
#include "JSDOMPromiseDeferred.h"
+#include <optional>
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
@@ -41,7 +42,7 @@
}
using RequestAdapterPromise = DOMPromiseDeferred<IDLNullable<IDLInterface<GPUAdapter>>>;
- void requestAdapter(const GPURequestAdapterOptions&, RequestAdapterPromise&&);
+ void requestAdapter(const std::optional<GPURequestAdapterOptions>&, RequestAdapterPromise&&);
private:
GPU() = default;
Modified: trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.cpp (285376 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.cpp 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.cpp 2021-11-06 21:08:52 UTC (rev 285377)
@@ -48,7 +48,7 @@
return false;
}
-void GPUAdapter::requestDevice(ScriptExecutionContext&, const GPUDeviceDescriptor&, RequestDevicePromise&&)
+void GPUAdapter::requestDevice(ScriptExecutionContext&, const std::optional<GPUDeviceDescriptor>&, RequestDevicePromise&&)
{
}
Modified: trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.h (285376 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.h 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -31,6 +31,7 @@
#include "GPUSupportedLimits.h"
#include "JSDOMPromiseDeferred.h"
#include "ScriptExecutionContext.h"
+#include <optional>
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
@@ -50,7 +51,7 @@
bool isFallbackAdapter() const;
using RequestDevicePromise = DOMPromiseDeferred<IDLInterface<GPUDevice>>;
- void requestDevice(ScriptExecutionContext&, const GPUDeviceDescriptor&, RequestDevicePromise&&);
+ void requestDevice(ScriptExecutionContext&, const std::optional<GPUDeviceDescriptor>&, RequestDevicePromise&&);
private:
GPUAdapter() = default;
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.cpp (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.cpp) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.cpp (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.cpp 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2021 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
+
+#include "config.h"
+#include "GPUBuffer.h"
+
+namespace WebCore {
+
+String GPUBuffer::label() const
+{
+ return StringImpl::empty();
+}
+
+void GPUBuffer::setLabel(String&&)
+{
+}
+
+void GPUBuffer::mapAsync(GPUMapModeFlags mode, std::optional<GPUSize64> offset, std::optional<GPUSize64> size, Ref<DeferredPromise>&&)
+{
+ UNUSED_PARAM(mode);
+ UNUSED_PARAM(offset);
+ UNUSED_PARAM(size);
+}
+
+Ref<JSC::ArrayBuffer> GPUBuffer::getMappedRange(std::optional<GPUSize64> offset, std::optional<GPUSize64> size)
+{
+ UNUSED_PARAM(offset);
+ UNUSED_PARAM(size);
+ return ArrayBuffer::create(nullptr, 0);
+}
+
+void GPUBuffer::unmap()
+{
+}
+
+void GPUBuffer::destroy()
+{
+}
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.h (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.h) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2021 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
+
+#include "GPUIntegralTypes.h"
+#include "GPUMapMode.h"
+#include "JSDOMPromiseDeferred.h"
+#include <_javascript_Core/ArrayBuffer.h>
+#include <cstdint>
+#include <optional>
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class GPUBuffer : public RefCounted<GPUBuffer> {
+public:
+ static Ref<GPUBuffer> create()
+ {
+ return adoptRef(*new GPUBuffer());
+ }
+
+ String label() const;
+ void setLabel(String&&);
+
+ void mapAsync(GPUMapModeFlags, std::optional<GPUSize64> offset, std::optional<GPUSize64> sizeForMap, Ref<DeferredPromise>&&);
+ Ref<JSC::ArrayBuffer> getMappedRange(std::optional<GPUSize64> offset, std::optional<GPUSize64> rangeSize);
+ void unmap();
+
+ void destroy();
+
+private:
+ GPUBuffer() = default;
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.idl (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUBuffer.idl 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#gpubuffer
+
+// https://bugs.webkit.org/show_bug.cgi?id=232548 These shouldn't need to be here.
+typedef [EnforceRange] unsigned long GPUMapModeFlags;
+typedef [EnforceRange] unsigned long long GPUSize64;
+
+[
+ EnabledBySetting=WebGPU,
+ ImplementationLacksVTable,
+ Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+ SecureContext
+]
+interface GPUBuffer {
+ Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size);
+ ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size);
+ undefined unmap();
+
+ undefined destroy();
+};
+GPUBuffer includes GPUObjectBase;
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUBufferDescriptor.h (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPU.cpp) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUBufferDescriptor.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUBufferDescriptor.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 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
+
+#include "GPUBufferUsage.h"
+#include "GPUIntegralTypes.h"
+#include "GPUObjectDescriptorBase.h"
+
+namespace WebCore {
+
+struct GPUBufferDescriptor : public GPUObjectDescriptorBase {
+ GPUSize64 size;
+ GPUBufferUsageFlags usage;
+ bool mappedAtCreation;
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUBufferDescriptor.idl (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUBufferDescriptor.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUBufferDescriptor.idl 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#dictdef-gpubufferdescriptor
+
+// https://bugs.webkit.org/show_bug.cgi?id=232548 These shouldn't need to be here.
+typedef [EnforceRange] unsigned long long GPUSize64;
+typedef [EnforceRange] unsigned long GPUBufferUsageFlags;
+
+[
+ EnabledBySetting=WebGPU
+]
+dictionary GPUBufferDescriptor : GPUObjectDescriptorBase {
+ required GPUSize64 size;
+ required GPUBufferUsageFlags usage;
+ boolean mappedAtCreation = false;
+};
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUBufferUsage.h (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPU.h) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUBufferUsage.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUBufferUsage.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2021 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
+
+#include "GPUIntegralTypes.h"
+#include <cstdint>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+using GPUBufferUsageFlags = uint32_t;
+
+class GPUBufferUsage : public RefCounted<GPUBufferUsage> {
+public:
+ static constexpr GPUFlagsConstant MAP_READ = 0x0001;
+ static constexpr GPUFlagsConstant MAP_WRITE = 0x0002;
+ static constexpr GPUFlagsConstant COPY_SRC = 0x0004;
+ static constexpr GPUFlagsConstant COPY_DST = 0x0008;
+ static constexpr GPUFlagsConstant INDEX = 0x0010;
+ static constexpr GPUFlagsConstant VERTEX = 0x0020;
+ static constexpr GPUFlagsConstant UNIFORM = 0x0040;
+ static constexpr GPUFlagsConstant STORAGE = 0x0080;
+ static constexpr GPUFlagsConstant INDIRECT = 0x0100;
+ static constexpr GPUFlagsConstant QUERY_RESOLVE = 0x0200;
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUBufferUsage.idl (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUBufferUsage.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUBufferUsage.idl 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#namespacedef-gpubufferusage
+
+typedef [EnforceRange] unsigned long GPUBufferUsageFlags;
+[
+ EnabledBySetting=WebGPU,
+ ImplementationLacksVTable,
+ Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+ SecureContext
+]
+interface GPUBufferUsage {
+ const GPUFlagsConstant MAP_READ = 0x0001;
+ const GPUFlagsConstant MAP_WRITE = 0x0002;
+ const GPUFlagsConstant COPY_SRC = 0x0004;
+ const GPUFlagsConstant COPY_DST = 0x0008;
+ const GPUFlagsConstant INDEX = 0x0010;
+ const GPUFlagsConstant VERTEX = 0x0020;
+ const GPUFlagsConstant UNIFORM = 0x0040;
+ const GPUFlagsConstant STORAGE = 0x0080;
+ const GPUFlagsConstant INDIRECT = 0x0100;
+ const GPUFlagsConstant QUERY_RESOLVE = 0x0200;
+};
Modified: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp (285376 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp 2021-11-06 21:08:52 UTC (rev 285377)
@@ -26,6 +26,11 @@
#include "config.h"
#include "GPUDevice.h"
+#include "GPUBuffer.h"
+#include "GPUBufferDescriptor.h"
+#include "GPUSupportedFeatures.h"
+#include "GPUSupportedLimits.h"
+
namespace WebCore {
GPUDevice::~GPUDevice() = default;
@@ -49,4 +54,13 @@
return GPUSupportedLimits::create();
}
+void GPUDevice::destroy()
+{
}
+
+Ref<GPUBuffer> GPUDevice::createBuffer(const GPUBufferDescriptor&)
+{
+ return GPUBuffer::create();
+}
+
+}
Modified: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h (285376 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -27,8 +27,6 @@
#include "ActiveDOMObject.h"
#include "EventTarget.h"
-#include "GPUSupportedFeatures.h"
-#include "GPUSupportedLimits.h"
#include "ScriptExecutionContext.h"
#include <wtf/Ref.h>
#include <wtf/text/WTFString.h>
@@ -35,6 +33,11 @@
namespace WebCore {
+class GPUBuffer;
+struct GPUBufferDescriptor;
+class GPUSupportedFeatures;
+class GPUSupportedLimits;
+
class GPUDevice : public ActiveDOMObject, public EventTargetWithInlineData {
public:
static Ref<GPUDevice> create(ScriptExecutionContext* scriptExecutionContext)
@@ -46,9 +49,14 @@
String label() const;
void setLabel(String&&);
+
Ref<GPUSupportedFeatures> features() const;
Ref<GPUSupportedLimits> limits() const;
+ void destroy();
+
+ Ref<GPUBuffer> createBuffer(const GPUBufferDescriptor&);
+
private:
GPUDevice(ScriptExecutionContext* scriptExecutionContext)
: ActiveDOMObject { scriptExecutionContext }
Modified: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl (285376 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl 2021-11-06 21:08:52 UTC (rev 285377)
@@ -35,6 +35,10 @@
[SameObject] readonly attribute GPUSupportedFeatures features;
[SameObject] readonly attribute GPUSupportedLimits limits;
+ undefined destroy();
+
+ GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
+
// FIXME: Add more here.
};
GPUDevice includes GPUObjectBase;
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUIntegralTypes.h (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPU.cpp) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUIntegralTypes.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUIntegralTypes.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2021 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
+
+#include <cstdint>
+
+namespace WebCore {
+
+using GPUBufferDynamicOffset = uint32_t;
+using GPUStencilValue = uint32_t;
+using GPUSampleMask = uint32_t;
+using GPUDepthBias = int32_t;
+
+using GPUSize64 = uint64_t;
+using GPUIntegerCoordinate = uint32_t;
+using GPUIndex32 = uint32_t;
+using GPUSize32 = uint32_t;
+using GPUSignedOffset32 = int32_t;
+
+using GPUFlagsConstant = uint32_t;
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUMapMode.h (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPU.cpp) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUMapMode.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUMapMode.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2021 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
+
+#include "GPUIntegralTypes.h"
+#include <cstdint>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+using GPUMapModeFlags = uint32_t;
+
+class GPUMapMode : public RefCounted<GPUMapMode> {
+public:
+ static constexpr GPUFlagsConstant READ = 0x0001;
+ static constexpr GPUFlagsConstant WRITE = 0x0002;
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUMapMode.idl (from rev 285376, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285377)
--- trunk/Source/WebCore/Modules/WebGPU/GPUMapMode.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUMapMode.idl 2021-11-06 21:08:52 UTC (rev 285377)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#namespacedef-gpumapmode
+
+typedef [EnforceRange] unsigned long GPUMapModeFlags;
+[
+ EnabledBySetting=WebGPU,
+ ImplementationLacksVTable,
+ Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+ SecureContext
+]
+interface GPUMapMode {
+ const GPUFlagsConstant READ = 0x0001;
+ const GPUFlagsConstant WRITE = 0x0002;
+};
Modified: trunk/Source/WebCore/Modules/applepay/ApplePayCancelEvent.cpp (285376 => 285377)
--- trunk/Source/WebCore/Modules/applepay/ApplePayCancelEvent.cpp 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayCancelEvent.cpp 2021-11-06 21:08:52 UTC (rev 285377)
@@ -29,6 +29,7 @@
#if ENABLE(APPLE_PAY)
#include "ApplePaySessionError.h"
+#include <wtf/IsoMallocInlines.h>
namespace WebCore {
Modified: trunk/Source/WebCore/Sources.txt (285376 => 285377)
--- trunk/Source/WebCore/Sources.txt 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/Sources.txt 2021-11-06 21:08:52 UTC (rev 285377)
@@ -23,6 +23,7 @@
Modules/WebGPU/GPU.cpp
Modules/WebGPU/GPUAdapter.cpp
+Modules/WebGPU/GPUBuffer.cpp
Modules/WebGPU/GPUDevice.cpp
Modules/WebGPU/GPUSupportedFeatures.cpp
Modules/WebGPU/GPUSupportedLimits.cpp
@@ -3072,9 +3073,13 @@
JSFormDataEvent.cpp
JSGPU.cpp
JSGPUAdapter.cpp
+JSGPUBuffer.cpp
+JSGPUBufferDescriptor.cpp
+JSGPUBufferUsage.cpp
JSGPUDevice.cpp
JSGPUDeviceDescriptor.cpp
JSGPUFeatureName.cpp
+JSGPUMapMode.cpp
JSGPUObjectBase.cpp
JSGPUObjectDescriptorBase.cpp
JSGPUPowerPreference.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (285376 => 285377)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-11-06 21:08:52 UTC (rev 285377)
@@ -7074,6 +7074,16 @@
1C6FD8B0250A35F100D6E920 /* FontCocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FontCocoa.cpp; sourceTree = "<group>"; };
1C81276F2734B3730068864F /* GPUSupportedFeatures.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUSupportedFeatures.cpp; sourceTree = "<group>"; };
1C8127712734B4130068864F /* GPUSupportedLimits.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUSupportedLimits.cpp; sourceTree = "<group>"; };
+ 1C8127832734C5F50068864F /* GPUBufferUsage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBufferUsage.h; sourceTree = "<group>"; };
+ 1C8127852734C5F60068864F /* GPUBuffer.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUBuffer.idl; sourceTree = "<group>"; };
+ 1C8127862734C5F60068864F /* GPUBufferUsage.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUBufferUsage.idl; sourceTree = "<group>"; };
+ 1C8127872734C5F70068864F /* GPUIntegralTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUIntegralTypes.h; sourceTree = "<group>"; };
+ 1C8127882734C5F70068864F /* GPUBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUBuffer.cpp; sourceTree = "<group>"; };
+ 1C8127892734C5F70068864F /* GPUBufferDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUBufferDescriptor.idl; sourceTree = "<group>"; };
+ 1C81278A2734C5F80068864F /* GPUMapMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUMapMode.h; sourceTree = "<group>"; };
+ 1C81278B2734C5F80068864F /* GPUBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBuffer.h; sourceTree = "<group>"; };
+ 1C81278C2734C5F80068864F /* GPUBufferDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBufferDescriptor.h; sourceTree = "<group>"; };
+ 1C81278D2734C5F90068864F /* GPUMapMode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUMapMode.idl; sourceTree = "<group>"; };
1C81B9560E97330800266E07 /* InspectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorController.h; sourceTree = "<group>"; };
1C81B9570E97330800266E07 /* InspectorController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorController.cpp; sourceTree = "<group>"; };
1C81B9580E97330800266E07 /* InspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorClient.h; sourceTree = "<group>"; };
@@ -19105,6 +19115,13 @@
1C28957E272F430A00B3E2B4 /* GPUAdapter.cpp */,
1C289572272F30DA00B3E2B4 /* GPUAdapter.h */,
1C28956B272F27A700B3E2B4 /* GPUAdapter.idl */,
+ 1C8127882734C5F70068864F /* GPUBuffer.cpp */,
+ 1C81278B2734C5F80068864F /* GPUBuffer.h */,
+ 1C8127852734C5F60068864F /* GPUBuffer.idl */,
+ 1C81278C2734C5F80068864F /* GPUBufferDescriptor.h */,
+ 1C8127892734C5F70068864F /* GPUBufferDescriptor.idl */,
+ 1C8127832734C5F50068864F /* GPUBufferUsage.h */,
+ 1C8127862734C5F60068864F /* GPUBufferUsage.idl */,
1C28957F272F43D800B3E2B4 /* GPUDevice.cpp */,
1C289573272F338D00B3E2B4 /* GPUDevice.h */,
1C28956E272F283800B3E2B4 /* GPUDevice.idl */,
@@ -19112,6 +19129,9 @@
1C28956C272F27DA00B3E2B4 /* GPUDeviceDescriptor.idl */,
1C289580272F47B000B3E2B4 /* GPUFeatureName.h */,
1C28956D272F280800B3E2B4 /* GPUFeatureName.idl */,
+ 1C8127872734C5F70068864F /* GPUIntegralTypes.h */,
+ 1C81278A2734C5F80068864F /* GPUMapMode.h */,
+ 1C81278D2734C5F90068864F /* GPUMapMode.idl */,
1C28955E272E64A500B3E2B4 /* GPUObjectBase.idl */,
1C289589272F5AC700B3E2B4 /* GPUObjectDescriptorBase.h */,
1C28955F272E6A9200B3E2B4 /* GPUObjectDescriptorBase.idl */,
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (285376 => 285377)
--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2021-11-06 20:50:48 UTC (rev 285376)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2021-11-06 21:08:52 UTC (rev 285377)
@@ -128,7 +128,10 @@
macro(FileSystemSyncAccessHandle) \
macro(GPU) \
macro(GPUAdapter) \
+ macro(GPUBuffer) \
+ macro(GPUBufferUsage) \
macro(GPUDevice) \
+ macro(GPUMapMode) \
macro(GPUSupportedFeatures) \
macro(GPUSupportedLimits) \
macro(Gamepad) \